Curriculum / Quantum Foundations / Rotation Matrices
Rotation Matrices
Understand how single-qubit gates rotate states on the Bloch sphere.
Rotation Matrices on the Bloch Sphere
Every single-qubit gate is a rotation on the Bloch sphere. Understanding this gives you the ability to construct any gate from first principles.
The Three Rotation Axes
Rotation about X-axis by angle θ:
qc.rx(theta, qubit) # theta in radiansRotation about Y-axis by angle θ:
qc.ry(theta, qubit)Rotation about Z-axis by angle θ:
qc.rz(theta, qubit)Familiar Gates as Rotations
| Gate | Rotation |
|---|---|
| X | RX(π) |
| Y | RY(π) |
| Z | RZ(π) |
| H | RZ(π) then RY(π/2) |
| S | RZ(π/2) |
| T | RZ(π/4) |
The H row is a circuit-order sequence: apply RZ(π) first, then RY(π/2). As a matrix product that is RY(π/2)·RZ(π), which equals H up to a global phase: . The Pauli, S, and T rows also hold up to a global phase, since RZ uses the symmetric convention.
The Y gate in that table deserves a word, since this track has so far leaned on X and Z. Y is the third Pauli gate: a combined bit flip and phase flip (Y = iXZ), and it rotates about the Y axis exactly as X and Z rotate about theirs.
Key Insight
Any single-qubit unitary can be decomposed as:
for some angles α, β, γ and a global phase δ. This ZYZ decomposition is how quantum compilers translate arbitrary unitary matrices into physical gates.
Commutation and Non-Commutation
- •RX and RY do not commute: RX(θ)RY(φ) ≠ RY(φ)RX(θ) in general
- •RZ and RZ do commute: applying two Z-rotations is equivalent to one combined rotation
- •This is why gate ordering matters in quantum circuits!
How this lesson works
A guided reading lesson with interactive knowledge checks. Concepts are explained step by step with circuit diagrams and runnable examples, and you confirm understanding before moving on.
Part of: Quantum Foundations
Learn the basics: qubits, gates, superposition, and measurement.
Take this lesson free
Create a free account and start this lesson in your browser. No credit card, no installation.