pub fn TGate(radix: usize) -> UnitaryExpressionExpand description
The one-qudit T gate (Clifford level 3).
Defined as the square root of the S gate:
$$ T|k\rangle = e^{i\pi k^2 / (2d)}|k\rangle $$
so that $T^2 = S$. For qubits ($d = 2$) this reproduces the standard T gate $T = \text{diag}(1,, e^{i\pi/4})$. For qutrits ($d = 3$), with ζ = e^{2πi/9}, this gives $T = \text{diag}(1, e^{i\pi/6}, e^{2i\pi/3})$; the Yeh–van de Wetering convention $T = \text{diag}(1, \zeta, \zeta^8)$ (Definition 8 ibid.) differs by a global phase, and both are in level 3 of the Clifford hierarchy.
The T gate is the standard resource gate for universal quantum computation beyond the Clifford group: it can be injected via magic states and its magic states are distillable.
References:
- Howard, M. & Vala, J. (2012). Qudit versions of the qubit π/8 gate. Physical Review A, 86(2), 022316.
- Cui, S. X., Gottesman, D. & Krishna, A. (2017). Diagonal gates in the Clifford hierarchy. Physical Review A, 95(1), 012329.