The Z gate, the S gate, and the T gate all leave ∣0⟩ unchanged and multiply the
amplitude of ∣1⟩ by a phase factor. On the Bloch sphere each of them is a pure rotation
about the z-axis — they differ only in how far they turn.
Phase gates as diagonal matrices
All three gates share the same structure:
Z=(100−1),S=(100i),T=(100eiπ/4).
Because the ∣0⟩ amplitude is always unchanged and ∣1⟩ picks up a phase, none of
these gates can ever shift probability from ∣0⟩ to ∣1⟩ or back. They are
phase-only operations.
The rotation angle
The general Rz(λ) gate is defined as
Rz(λ)=(e−iλ/200eiλ/2).
Up to a global phase (which is physically unobservable) we can match each phase gate to an
Rz rotation:
Z rotates by λ=π (a half-turn): the ∣1⟩ amplitude picks up eiπ=−1.
S rotates by λ=π/2 (a quarter-turn): the ∣1⟩ amplitude picks up eiπ/2=i.
T rotates by λ=π/4 (an eighth-turn): the ∣1⟩ amplitude picks up eiπ/4.
On the Bloch sphere, the north pole ∣0⟩ stays fixed and every equatorial state traces a
circular arc. Starting from ∣+⟩ on the +x axis, a T gate nudges the Bloch vector
45° toward the +y axis; an S gate advances it 90°; a Z gate flips it 180° to −x.
Gate relationships
Because the rotations compose by adding angles, the hierarchy is clear:
T2=S,S2=Z,T4=Z.
Each identity is just 4π+4π=2π (or doubling the angle again
for the next step). You can verify the first one by multiplying:
T2=(100eiπ/4)2=(100eiπ/2)=(100i)=S.
Try it
Apply two T gates in sequence to verify the identity T2=S. The grader compares the full
unitary matrix, so leaving the circuit empty will not pass.
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.