XGate

Function XGate 

Source
pub fn XGate(radix: usize) -> UnitaryExpression
Expand description

The one-qudit shift (X) gate. This is a Weyl-Heisenberg gate.

This gate shifts the state of a qudit up by one level modulo. For example, the shift gate on a qubit is the Pauli-X gate. The shift gate on a qutrit is the following matrix:

$$ \begin{pmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \\ \end{pmatrix} $$

The shift gate is generally given by the following formula:

$$ \begin{equation} X = \sum_a |a + 1 mod d ><a| \end{equation} $$

where d is the number of levels (2 levels is a qubit, 3 levels is a qutrit, etc.)

References: - https://arxiv.org/pdf/2302.07966.pdf