Pauli, Hadamard, phase and rotation gates on the Bloch sphere.
Every single-qubit gate, from a textbook X to an arbitrary microwave pulse, is a rotation of the Bloch sphere times a phase nobody can observe. In this lesson you will prove that, derive the rotation formula e−iθn^⋅σ/2 from the Pauli algebra, and learn to read H, S and T as rotations.
What you’ll learn
Show that every 2×2 unitary is eiα times an element of SU(2), and explain why the phase is unobservable for a standalone gate.
Derive Rn^(θ)=cos2θI−isin2θn^⋅σ from the Pauli product rule.
Prove that Rn^(θ) rotates the Bloch vector by θ about n^.
Express H, S, T and X as rotations and use conjugation identities such as HZH=X and TXT†=(X+Y)/2.
Unitaries, determinants and phases
A single-qubit gate is a 2×2unitary matrix, U†U=I. Unitarity says the columns of U are orthonormal, which is exactly what it takes to map normalized states to normalized states and to preserve every inner product ⟨ϕ∣ψ⟩. Taking determinants of U†U=I gives ∣detU∣2=1, so detU=e2iα for some real α.
DerivationThe shape of every single-qubit gate
V=e−iαU,detV=e−2iαdetU=1
Strip off a phase so that the determinant is 1: V lies in the special unitary group SU(2).
V=(abcd),∣a∣2+∣b∣2=1
The first column is a unit vector.
(cd)=λ(−b∗a∗),∣λ∣=1
In C2, the unit vectors orthogonal to (a,b) are exactly the phase multiples of (−b∗,a∗).
detV=λ(∣a∣2+∣b∣2)=λ=1
The determinant condition fixes that phase.
U=eiα(ab−b∗a∗),∣a∣2+∣b∣2=1
One phase plus three real parameters (a point of the unit sphere S3⊂C2).
The factor eiα is a global phase: U∣ψ⟩ and V∣ψ⟩ differ by an overall phase, so every measurement gives identical statistics. For a standalone gate only V∈SU(2) matters. Keep the phase in mind, though: it becomes physical as soon as the gate is controlled by another qubit.
Check your understanding
Which statement about U=eiπ/3X is true?
It is not unitary, because of the complex prefactor
As a standalone gate it is indistinguishable from X: every measurement statistic agrees on every input
It differs from X by a relative phase, which an interference experiment on one qubit could reveal
It agrees with X only on the input ∣0⟩
Show the answer
B. As a standalone gate it is indistinguishable from X: every measurement statistic agrees on every input
eiπ/3X∣ψ⟩ and X∣ψ⟩ differ by the same factor eiπ/3 for every ∣ψ⟩, and that factor has modulus 1, so all probabilities agree. (If the gate were controlled, the same factor would become a relative phase between the control's branches.)
The Pauli algebra
X=(0110),Y=(0i−i0),Z=(100−1)
The Pauli matrices, also written σ1,σ2,σ3.
Each Pauli is both hermitian and unitary, so each squares to the identity and has eigenvalues ±1. Their eigenstates are the six cardinal points of the Bloch sphere: ∣0⟩,∣1⟩ for Z, ∣±⟩ for X and ∣±i⟩ for Y. All of their algebra is packed into a single product rule:
σjσk=δjkI+iϵjklσl
So XY=iZ, YZ=iX, ZX=iY. Distinct Paulis anticommute, {σj,σk}=2δjkI, and [σj,σk]=2iϵjklσl.
Contracting the product rule with real vectors a,b gives the identity that drives everything below:
(a⋅σ)(b⋅σ)=(a⋅b)I+i(a×b)⋅σ
In particular (n^⋅σ)2=I for every unit vector n^.
Together with I, the Paulis form a basis of all 2×2 matrices that is orthogonal in the trace inner product Tr(A†B): every M=21(TrMI+∑jTr(Mσj)σj). A state's Bloch vector is just its list of Pauli coordinates, ∣ψ⟩⟨ψ∣=21(I+r⋅σ).
Think first Why does (n^⋅σ)2=I make exponentials of Paulis easy?
Every power collapses: even powers equal I and odd powers equal n^⋅σ. The exponential series therefore splits into two scalar series, which turn out to be cosine and sine. That is the next derivation.
Rotation gates
Physically, gates are generated by Hamiltonians: a constant drive 2ωn^⋅σ applied for a time t produces e−iωtn^⋅σ/2 (with ℏ=1). So the natural family of gates is the exponentials of Paulis, the rotation gatesRn^(θ) with θ=ωt.
cosπI−isinπn^⋅σ=−I. A full turn returns every Bloch vector but multiplies the state by −1; only a 4π turn gives +I. This is the two-to-one map SU(2)→SO(3). The sign is invisible for a lone gate, but a controlledRz(2π) acts as Z on the control.
H, S, T and friends as rotations
Every named gate is a rotation up to a global phase. Use Rn^(π)=−in^⋅σ for half-turns and Rz(φ)=e−iφ/2diag(1,eiφ) for phase gates:
Gate
Matrix
As a rotation
X, Y, Z
the Paulis
iRx(π), iRy(π), iRz(π): half-turns
H
21(111−1)=2X+Z
iRh^(π) with h^=(x^+z^)/2
P(φ)
diag(1,eiφ)
eiφ/2Rz(φ)
S=P(π/2)
diag(1,i)
eiπ/4Rz(π/2)
T=P(π/4)
diag(1,eiπ/4)
eiπ/8Rz(π/4), hence the old name "π/8 gate"
X
21(1+i1−i1−i1+i)
eiπ/4Rx(π/2)=HSH
Conjugation moves rotation axes. If a unitary V acts on Bloch vectors as the rotation V, the theorem above gives V(n^⋅σ)V†=(Vn^)⋅σ, and hence:
VRn^(θ)V†=RVn^(θ)
Conjugating a rotation rotates its axis. H swaps x^↔z^ and sends y^→−y^, so HXH=Z, HZH=X, HYH=−Y. S turns x^ into y^, so SXS†=Y and SYS†=−X.
How can you check that a gate sequence U equals X on every input with a single circuit? Feed it half of a Bell pair. Applying U to qubit 1 of ∣Φ+⟩=21(∣00⟩+∣11⟩) gives 21(∣0⟩⊗U∣0⟩+∣1⟩⊗U∣1⟩), which records both columns of U. So the output equals (I⊗X)∣Φ+⟩=21(∣01⟩+∣10⟩), up to phase, exactly when U=eiγX.
Check your understanding
Which rotation is TXT†?
A half-turn about x^
A half-turn about (x^+y^)/2
A half-turn about (x^+z^)/2
A quarter-turn about z^
Show the answer
B. A half-turn about (x^+y^)/2
T=eiπ/8Rz(π/4) and phases cancel in a conjugation, so TXT†=Rz(4π)XRz(4π)†=cos4πX+sin4πY=2X+Y: the x-axis turned 45° toward y. This is not a Pauli, which is why T is not a Clifford gate.
Every gate is a rotation
Counting parameters: one phase and three rotation parameters, matching dimU(2)=4. Preparing a state needs only two of them: every pure state equals Rz(φ)Ry(θ)∣0⟩ up to a global phase, as you just did with the ghost arrow.
python
from math import pi
from qiskit import QuantumCircuit
qc = QuantumCircuit(1)
qc.ry(pi / 3, 0) # latitude: theta = pi/3
qc.rz(3 * pi / 4, 0) # longitude: phi = 3pi/4
# The general gate U(theta, phi, lam) equals Rz(phi) Ry(theta) Rz(lam)
# up to a global phase; U(pi/2, 0, pi) is exactly the Hadamard.
qc.u(pi / 2, 0, pi, 0)
SDKs expose the same decomposition. Libraries differ in their global-phase conventions, which only matter once a gate is controlled.
Key takeaways
Every single-qubit gate is U=eiαRn^(θ): an unobservable global phase times a rotation of the Bloch sphere.
Rn^(θ)=e−iθn^⋅σ/2=cos2θI−isin2θn^⋅σ, because (n^⋅σ)2=I; it rotates Bloch vectors by θ about n^.
Up to phase, the Paulis are half-turns, H is a half-turn about (x^+z^)/2, S and T are z-rotations by π/2 and π/4, and X=HSH is an x-rotation by π/2.
Conjugation rotates axes, VRn^(θ)V†=RVn^(θ), giving HZH=X, SXS†=Y and TXT†=(X+Y)/2.
Rn^(2π)=−I: invisible for a lone gate, but a sign of the SU(2)→SO(3) double cover that matters once gates are controlled.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Question 1
What is Ry(π/2)∣0⟩?
∣+i⟩
∣−⟩
∣+⟩
∣1⟩
Show the answer
C.∣+⟩
Ry(2π)∣0⟩=cos4π∣0⟩+sin4π∣1⟩=∣+⟩: a quarter-turn about y tips the north pole onto +x^.
Question 2
Which of these equals the Hadamard gate exactly, with no extra phase?
Ry(π/2)
Ry(π/2)Z
Rz(π/2)Ry(π/2)
Rx(π/2)
Show the answer
B.Ry(π/2)Z
Ry(2π)Z=21(11−11)(100−1)=21(111−1)=H: first a half-turn about z, then a quarter-turn about y.
Question 3
Which property makes e−iθP/2=cos2θI−isin2θP hold for a Pauli matrix P?
P is traceless
P has real entries
P is Hermitian
P2=I
Show the answer
D.P2=I
With P2=I, every even power of P is I and every odd power is P, so the exponential series splits into the cosine and sine series. Any matrix with A2=I obeys the same formula.
Question 4
How many real parameters does a general gate U∈U(2) have, and how many of them affect the measurement statistics of a standalone gate?
4 and 3
3 and 2
8 and 4
4 and 4
Show the answer
A. 4 and 3
U=eiαRn^(θ): a phase plus three rotation parameters (axis and angle). The phase is global, so only the three rotation parameters matter for an uncontrolled gate.
Go deeper
Euler Decompositions· Every single-qubit unitary is three rotations: proof and practice.