Building H from Rotations
The Hadamard gate looks like a special object in most introductions, defined by its matrix and left at that. But it is also a perfectly ordinary rotation — one that can be expressed as a short sequence of and gates. Understanding this connection deepens your intuition for the Bloch sphere and is the first step toward decomposing arbitrary single-qubit unitaries.
H as a Bloch-sphere rotation
On the Bloch sphere every single-qubit gate is a rotation. The Hadamard gate corresponds to a rotation by around the axis , the diagonal between the - and -axes. Applying it once maps north pole to equator and back, which is why .
Decomposing H into RY and RZ
Any rotation around a tilted axis can be decomposed into a sequence of axis-aligned rotations. One compact decomposition of is:
where is an unobservable global phase.
We can verify this by multiplying the matrices. The two rotation matrices are
Their product (applied right-to-left, first then ) is
The scalar factor is a global phase — it has no effect on any measurement outcome or on the action of the gate as a unitary operation. Up to that phase, the two-gate sequence is exactly .
Why this matters
No real quantum processor ships a native Hadamard gate; hardware exposes a small set of rotation primitives. Compilers translate higher-level gates — including — into sequences of native rotations. The decomposition above is exactly the kind of identity a quantum compiler uses when targeting a backend whose native single-qubit gate is, say, and (or and ).
Try it
Implement using only rotation gates. The grader checks the full unitary matrix up to global phase — doing nothing will fail because the identity differs from .
Sign in on the full site to ask questions and join the discussion.