The T gate, also called the π/8 gate, is the diagonal single-qubit unitary
T=(100eiπ/4)=eiπ/8(e−iπ/800eiπ/8).
The second form, factoring out the global phase eiπ/8, explains the historical name: T is a
rotation by π/4 about the z-axis of the Bloch sphere, i.e. T=eiπ/8Rz(π/4) where
Rz(θ)=e−iθZ/2. Note that T2=S=diag(1,i), the phase gate, and
S2=Z. So T is a "square root of S" and a "fourth root of Z."
Where T sits in the Clifford hierarchy
The Clifford hierarchy organizes gates by how they conjugate Paulis. Level C(1) is the
Pauli group itself; level C(k) consists of unitaries U such that UPU†∈C(k−1) for every Pauli P. The Clifford group is C(2). The T gate lives at
level three:
TXT†=21(X+Y),TZT†=Z.
Conjugating X by T produces a Clifford (here 21(X+Y), which is in C(2)),
not a Pauli — so T∈C(3)∖C(2). This is the formal sense in which T
is the first "non-Clifford" gate, and why {H,S,CNOT,T} achieves universality that
{H,S,CNOT} cannot.
The associated magic state
To each gate in C(3) we can associate a resource state by applying it to a stabilizer
state. For T the natural choice is
∣T⟩≡T∣+⟩=21(∣0⟩+eiπ/4∣1⟩).
This is the T-type magic state. On the Bloch sphere it points along the direction
n^=(cos4π,sin4π,0)=(21,21,0),
i.e. it lies in the equatorial xy-plane, bisecting the +X and +Y axes. It is a pure state on the
Bloch sphere — yet, as the next lessons show, no Clifford circuit can prepare it from ∣0⟩.
That is exactly its value.
Why this matters for fault tolerance
We saw in the previous lesson that T cannot generally be made transversal. But preparing the fixed
state ∣T⟩ is a state-preparation task that can be done offline and then cleaned up by distillation.
Gate teleportation (next lessons) lets us spend one ∣T⟩ to enact one logical T. So the entire
non-Clifford content of a universal fault-tolerant computation is bottled up in copies of this one
single-qubit state.[^gottesman-chuang]
Try it
Prepare the magic state ∣T⟩=T∣+⟩ on a single qubit, starting from ∣0⟩. The grader
checks your full state vector against the reference, so getting the relative phase eiπ/4 right is
essential.
[^gottesman-chuang]: Gottesman, Chuang, Quantum Teleportation is a Universal Computational Primitive, arXiv:quant-ph/9908010.
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.