---
# System prepended metadata

title: Qutrit Operation Interfaces

---

# Qutrit Operation Interfaces

### X and Z gates
```python
'''
    Qutrit ternary X gate

    @param wires            wire(s) to perform operation on
    @param permutation      string defining which X permutation to use
                            Can be '+1', '-1', '01', '02', '12'
'''
qml.QutritX(permutation='+1', wires)
```
```python
'''
    Qutrit Z(a, b) phase gate.
    Z(a, b) \ket{0} = \ket{0}
    Z(a, b) \ket{1} = \omega^a \ket{1}
    Z(a, b) \ket{2} = \omega^b \ket{2}
    
    @param wires    wire(s) to perform operation on
    @param a        Real number. Phase exponent to apply to \ket{1} state
    @param b        Real number. Phase exponent to apply to \ket{2} state
'''
qml.QutritZ(a=1, b=2, wires)
```

```python
'''
    Qutrit X phase gate.
    X(a, b) = H Z(a, b) H^{\dagger}
    
    @param wires    wire(s) to perform operation on
    @param a        Real number. Phase exponent to apply to \ket{1} state
    @param b        Real number. Phase exponent to apply to \ket{2} state
'''
qml.QutritPhaseX(a=1, b=2, wires)
```

### Qutrit rotations
```python
'''
    Qutrit rotation gate
    
    @param wires    wire(s) to perform operation on
    @param theta    tensor-like with 8 real-valued elements,
                    which are the angles of rotation
'''
qml.QutritRot(theta, wires)
```

### Clifford+T gate set
```python
'''
    Qutrit Hadamard gate. Implements the unitary
                 [ 1      1        1    ]
    \frac{-1j}{3}[ 1   \omega  \omega^2 ]
                 [ 1  \omega^2  \omega  ]
    The qutrit Hadamard maps \ket{0} to \ket{+}, \ket{1} to
    \ket{\omega}, \ket{2} to \ket{\omega^2},
    where \omega = exp(2*\pi*1j/3)
    
    @param wires    wire(s) to perform operation on
    
'''
qml.QutritHadamard(wires)
```

```python
'''
    Qutrit S gate. Implements the unitary
             [ 1     0     0   ]
    \sigma^8 [ 0     1     0   ]
             [ 0     0  \omega ]
    where \sigma = \omega^{1/3}
    
    @param wires    wire(s) to perform operation on
'''
qml.QutritS(wires)
```

```python
'''
    2-Qutrit controlled X gate.
    CX \ket{i, j} = \ket{i, i + j}, where the addition is taken
    modulo 3
    
    @param wires    wire(s) to perform operation on. wires[0] is the
                    control wire, and wires[1] is the target wire
'''
qml.QutritCX(wires)
```

```python
'''
    Qutrit T gate = Z(1/3, -1/3). Implements the unitary
    [ 1       0       0     ]
    [ 0    \sigma     0     ]
    [ 0       0    \sigma^8 ]
        
    @param wires    wire(s) to perform operation on
'''
qml.QutritT(wires)
```

###  