In the last post, we built the Bloch sphere: every qubit state is a point on its surface. The north pole is , the south pole is , the equator is superposition. We have the map. Now we need operations: ways to move that point. But not every map from sphere to sphere is a valid quantum gate. The constraints are tight, and they have a name: unitarity. Understanding them is the same as understanding why the Hadamard works.
In this post
- 1Gates as rotations: why quantum operations must preserve the Bloch sphere
- 2Unitarity: the mathematical requirement that makes this precise
- 3The Hadamard geometrically: a 180° rotation, before we look at the matrix
- 4Try it: step through the circuit and watch the rotation on the sphere
- 5The matrix: the numbers, now that the geometry is in place
- 6Reading a quantum circuit: wires, boxes, and chaining gates
- 7Further reading: key references for this series
Gates as rotations
In the last post we established that a qubit’s state is a point on the surface of the Bloch sphere. The north pole is , the south pole is , and every other point is a superposition parametrized by and .
A quantum gate is an operation that moves that point. The question is: which moves are allowed?
Not all moves preserve what needs to be preserved. A quantum state is a unit vector; its amplitudes satisfy . That constraint is the requirement that probabilities sum to 1. Any gate that stretched or compressed the sphere would violate it: after the gate, the probabilities would no longer add up.
The operations that preserve the sphere are exactly the rigid rotations. A rotation moves the point without changing the fact that it’s on the sphere.
There is a second requirement: quantum mechanics is reversible. Every valid gate must be undoable. Rotations are reversible; we can always rotate back. A projection or a map that collapses two states to one would be irreversible and therefore not a valid gate.
Unitarity
The formal name for the class of operations that are rigid rotations on the Bloch sphere is unitary transformations. A matrix is unitary if:
where is the conjugate transpose of . This is the matrix statement of “rigid rotation,” and it implies two things directly:
Norm preservation: for any state , applying gives a state with the same norm. Probabilities still sum to 1.
Invertibility: . Every gate has an inverse, and that inverse is the conjugate transpose. To undo a gate, apply its conjugate transpose.
Every valid single-qubit gate is a unitary matrix. No more, no less. [1, §4.2]
A classical NOT gate is a special case: it swaps , which is a 180° rotation around the x-axis of the Bloch sphere. Quantum gates generalize this to rotations around any axis, by any angle.
The Hadamard geometrically
The gate is named after Jacques Hadamard (1865–1963), a French mathematician whose work touched prime number theory, partial differential equations, and the geometry of determinants. In an 1893 paper [3], Hadamard studied a question about how large the determinant of a real matrix can be relative to its entries, and showed that matrices with entries in achieve the maximum. These are now called Hadamard matrices. The case (up to the normalizing factor) is the gate we’re studying. The name carried into quantum computing through the canonical textbook by Nielsen and Chuang [1], and has since become universal.
The Hadamard gate, written , is a 180° rotation around the axis pointing in the direction, the diagonal halfway between the x and z axes of the Bloch sphere.
What this does to the named states:
- (north pole, ) maps to , the positive x-axis on the equator
- (south pole, ) maps to , the negative x-axis on the equator
- maps back to
- maps back to
Because a 180° rotation applied twice is the identity, is its own inverse: .
Notice what does to the north pole: it takes a state with certainty of measuring 0, and moves it to a state with 50/50 probability. This is why the Hadamard is the superposition-creation gate; nearly every quantum algorithm begins with one.
Physical grounding
A qubit is the quantum state of a physical spin-½ particle: an electron, an atomic nucleus, or the quantized flux in a superconducting loop. The Bloch sphere rotations above correspond to real magnetic pulses applied to that particle. The geometry carries a consequence: a full 360° physical rotation returns the Bloch sphere point to its start, but multiplies the underlying spinor by −1. That sign flip is unobservable on its own (global phase is not measurable) but becomes visible when two paths interfere. That mechanism is the subject of Post 3.
Try it
The widget connects circuit notation to the Bloch sphere in a single view. Step through the circuit and watch the rotation happen on the sphere. The dashed line is the rotation axis, the direction that rotates around.
Try both starting states. maps to ; maps to . Both land on the equator, but at opposite longitudes. They have identical measurement probabilities (both are 50/50) but different phases. That difference will matter in post 3.
drag sphere to orbit · click gate boxes to jump to that step
The matrix
With the geometry in place, the matrix is just a coordinate description of the same rotation. In the standard / basis:
Verify H|0⟩ = |+⟩
Verify H|1⟩ = |−⟩
Check unitarity: is real and symmetric, so . And:
Both properties confirm what the geometry told us: is its own inverse.
Reading a quantum circuit
The widget uses the standard notation for quantum circuits. Here is what we need.
A wire represents a qubit over time, read left to right. The qubit starts in a known state at the left end and evolves as gates act on it.
A box on the wire is a gate. The label names the gate: for Hadamard, for NOT, for the phase flip. Read a wire from left to right to see the sequence of operations.
A meter symbol at the end of a wire is a measurement. It collapses the qubit to a classical bit, 0 or 1, based on the outcome probabilities. The double wire after the meter carries that classical bit.
Gates in sequence compose: the output of one gate is the input to the next. The widget shows measure. The first H creates superposition; the second H undoes it. Stepping through makes H·H = I visible.
Order matters. Matrix multiplication is not commutative in general, and neither is gate composition. Applying then is not the same as then . As a worked example: , then , so followed by takes to . Compare that with , then (since is a eigenstate of ), so followed by takes to . The two results are different states with different phases. Order matters.
creates superposition, but superposition alone does not explain why quantum algorithms work. What matters is what happens to the phase, the longitude on the Bloch sphere, before measurement. and have the same measurement probabilities but different phases. That difference becomes visible when we apply another gate before measuring. Two paths can reinforce each other or cancel out, depending on their relative phase.
That mechanism is quantum interference.
Further reading
- Nielsen, M. A. & Chuang, I. L. (2000). Quantum Computation and Quantum Information. Cambridge University Press. The standard reference for quantum computing; chapters 1–4 cover the full arc of this series, including unitarity, gates, and circuit notation.
- Mermin, N. D. (2007). Quantum Computer Science: An Introduction. Cambridge University Press. A gentler introduction written for computer scientists, with careful attention to the classical analogy.
- Hadamard, J. (1893). Résolution d’une question relative aux déterminants. Bulletin des Sciences Mathématiques, 17, 240–246. The original paper introducing Hadamard’s determinant bound and the matrices that bear his name.
- Preskill, J. (1998). Lecture Notes for Physics 229: Quantum Information and Computation. California Institute of Technology. Preskill’s comprehensive course notes; the treatment of unitary evolution and the circuit model in chapter 1 is particularly clear.