The Hadamard gate H is special: applying it twice returns every state exactly to where it
started. In matrix terms, H2=I, where I is the 2×2 identity. This makes H its own
inverse — mathematicians call such an operator Hermitian and unitary at the same time, or
equivalently, involutory.
So the claim follows directly from the matrix multiplication. On the Bloch sphere you can picture
H as a 180° rotation about the axis halfway between x and z. Rotating by 180° and then
rotating by 180° again brings every point back to its starting position — that is why two
applications cancel.
The ∣1⟩ terms cancel perfectly — this is destructive interference, and it is the same
mechanism that powers algorithms like Deutsch–Jozsa.
Try it
Build the two-Hadamard circuit and let the grader verify the full unitary. A circuit that applies H
only once — or applies no gates at all — will fail, because its unitary is not the identity.
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.