# Matrix representation of the qutrit gate analogous to Pauli-$X$ gate

What is the qutrit gate analogous to the $$X$$ gate for qubits, i.e. NOT gate? and what is the matrix representation of that gate?

I have searched on the Internet but couldn't find anything related.

Edit:

I would like to know the state matrix of the Controlled T-Shift gate if possible.

• What would be the action of such a gate? A NOT gate for (qubit) systems makes perfect sense to me as it transforms $|0\rangle \to |1\rangle$ and $|1\rangle \to |0\rangle$. How is a NOT gate defined if you have three basis states $|0\rangle, |1\rangle, |2\rangle$? Dec 15, 2023 at 21:29
• I dont know honestly.I assumed that if there is a X Gate for qubits then there must be for qutrits as well. Dec 15, 2023 at 21:34
• If you scroll for a bit this blog post discusses the TShift gate which is the closest thing I can find to a Pauli X for qutrits -> pennylane.ai/qml/demos/tutorial_qutrits_bernstein_vazirani Dec 15, 2023 at 21:41
• Look at the clock and shift matrices en.wikipedia.org/wiki/…. X is a shift in higher dimensions. Dec 15, 2023 at 23:20
• @RootGroves Please keep one post limited to one question. You can make another post looking for a matrix representation of Controlled-NOT for qutrits. This helps other people searching for the same question in future to find the answer faster. Dec 15, 2023 at 23:59

Qutrit gates equivalent to Pauli $$X$$ gate for qubit would be generalized Pauli $$X$$ gates for a $$3$$-level system.

The action of generalized Pauli $$X$$ for $$n$$-level on the basis states is given by

$$X(x) |j\rangle = |x \oplus j \rangle \tag{1}\,,$$

where

• $$\{|j\rangle\} \equiv \{|0\rangle, |1\rangle, \cdots, |n-1\rangle\}$$ are the basis states of your system
• $$x$$ is the shift & $$x\in\{0,1,\cdots n-1\}$$
• $$\oplus$$ is the cyclic addition operator, meaning that the result of the addition is $$(x +j) \text{mod} (n)\,.$$

Hence, for qutrit, we have two gates. (Technically 3, but $$X(0)$$ is trivial)

Gate 1 : $$X(1)$$

• $$X(1)|0\rangle = |0\oplus1\rangle = |(0+1) \text{mod} (3)\rangle = |1\rangle$$
• $$X(1)|1\rangle = |1\oplus1\rangle = |(1 +1) \text{mod} (3)\rangle = |2\rangle$$
• $$X(1)|2\rangle = |2\oplus1\rangle = |(2+1) \text{mod} (3)\rangle = |0\rangle$$

Hence, the gate is

$$X(1) = \begin{bmatrix} 0&0&1\\ 1&0&0 \\ 0&1&0 \end{bmatrix}\tag{2}\,.$$

Gate 2 : $$X(2)$$

• $$X(2)|0\rangle = |0\oplus2\rangle = |(0+2) \text{mod} (3)\rangle = |2\rangle$$
• $$X(2)|1\rangle = |1\oplus2\rangle = |(1+2) \text{mod} (3)\rangle = |0\rangle$$
• $$X(2)|2\rangle = |2\oplus2\rangle = |(2 +2) \text{mod} (3)\rangle = |1\rangle$$

Hence, the gate is

$$X(2) = \begin{bmatrix} 0&1&0 \\0&0&1\\ 1&0&0 \end{bmatrix}\tag{3}\,.$$

• Cool generalisation :) thats useful to know. Dec 15, 2023 at 22:14
• @Callum Thank you. You can also find generalized qudit $Z$-operators in this comment of mine Dec 15, 2023 at 23:55
• Thanks, I'll check it out. Dec 15, 2023 at 23:55
• I think there's a minor typo in the last equation. It should be $X(2)$ rather than $X(1)$ right? Dec 15, 2023 at 23:56
• @Callum Oh yes. My bad. Fixed it. Thanks. Dec 16, 2023 at 0:05

To expand a bit on what I said in the comments it seems the closest thing to a Pauli $$X$$ or $$\text{NOT}$$ operation for qutrits is the so-called $$\text{TShift}$$ gate.

This gate has the following action on the computational basis states...

\begin{align} \text{TShift}|0 \rangle &= |1\rangle \\ \text{TShift}|1 \rangle &= |2\rangle \\ \text{TShift}|2 \rangle &= |0\rangle \\ \end{align}

Recall that the basis states for a qutrit system are defined as the following unit vectors

$$$$|0\rangle = \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix}\,, \quad |1\rangle = \begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix}\,, \quad |2\rangle = \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix}$$$$

A qutrit is defined as a linear combination of these basis states

$$$$|\psi\rangle = \alpha |0\rangle + \beta|1\rangle = \gamma |2\rangle\,, \quad |\alpha|^2 +|\beta|^2 + |\gamma|^2 = 1$$$$

You can see from the above that the $$(3 \times 3)$$ unitary matrix for this operation is the following

$$$$\text{TShift} = \begin{pmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{pmatrix}.$$$$

This was new to me as well actually. Hope this helps.

• I believe there is a mistake in the matrix. It should be $$\text{TShift} = \begin{bmatrix} 0&0&1\\ 1&0&0 \\ 0&1&0 \end{bmatrix}\tag{2}\,.$$ Because here,$|1\rangle \mapsto |0\rangle$ and $|2\rangle \mapsto |2\rangle$. Dec 17, 2023 at 9:35
• Ah yes, you’re correct. Thank you. Dec 17, 2023 at 11:52
• Fixed it, thanks :) Dec 17, 2023 at 11:55

The article Elementary gates of ternary quantum logic circuit defines three qutrit NOT gates: $$\begin{split} X^{(01)} &= \begin{pmatrix} 0 & 1 & 0\\ 1 & 0 & 0 \\ 0 & 0 & 1 \\ \end{pmatrix}\\ X^{(02)} &= \begin{pmatrix} 0 & 0 & 1\\ 0 & 1 & 0 \\ 1 & 0 & 0 \\ \end{pmatrix}\\ X^{(12)} &= \begin{pmatrix} 1 & 0 & 0\\ 0 & 0 & 1 \\ 0 & 1 & 0 \\ \end{pmatrix} \end{split}$$ I found this reference while reading Qudit Dicke state preparation, which also makes use of such qutrit NOT gates.