S and T turn the sphere about the z axis: S by a quarter turn (90°), T by an eighth of a turn (45°). Like Z, they leave ∣0⟩ and ∣1⟩ in place and change only the phase, so they never change the odds of measuring 0 or 1.
They're called phase gates: each multiplies the amplitude of ∣1⟩ by a phase and leaves ∣0⟩ alone. S† and T† turn the other way.
From ∣+⟩ (dashed), S turns the arrow 90° to ∣+i⟩ (green), and T turns it 45° (violet).
Multiplying β by i=eiπ/2 adds 90° to the phase φ; multiplying by eiπ/4 adds 45°.
As rotations
S=eiπ/4Rz(90∘),T=eiπ/8Rz(45∘)
The factors in front are global phases, so S and T turn the sphere exactly like Rz(90∘) and Rz(45∘). The factor eiπ/8 is why T is also called the π/8 gate, though it turns the sphere by π/4.
Square roots of Z
Two quarter turns make a half turn, and two eighth turns make a quarter turn:
SS=Z,TT=S,T4=Z,T8=I
So S is a square root of Z and T a square root of S. Their inverses, S† and T†, turn back by 90° and 45°: S†S=I.
What they do to the six key states
S
Before
After S
On the sphere
∣0⟩
∣0⟩
stays put
∣1⟩
i∣1⟩
stays put
∣+⟩
∣+i⟩
+x → +y
∣−⟩
∣−i⟩
−x → −y
∣+i⟩
∣−⟩
+y → −x
∣−i⟩
∣+⟩
−y → +x
T
Before
After T
On the sphere
∣0⟩
∣0⟩
stays put
∣1⟩
eiπ/4∣1⟩
stays put
∣+⟩
21∣0⟩+21eiπ/4∣1⟩
to θ 90°, φ 45°
∣−⟩
21∣0⟩+21e−3iπ/4∣1⟩
to θ 90°, φ 225°
∣+i⟩
21∣0⟩+21e3iπ/4∣1⟩
to θ 90°, φ 135°
∣−i⟩
21∣0⟩+21e−iπ/4∣1⟩
to θ 90°, φ 315°
T moves the equator states off the six named points: ∣+⟩ goes to the state with φ = 45°, halfway between ∣+⟩ and ∣+i⟩.