Intuition
Hadamard exchanges two pairs of basis directions. It maps |0⟩ to |+⟩ and |1⟩ to |−⟩. Applying it again maps those superpositions back to their computational basis states.
The two intermediate states have identical computational-basis histograms. Their distinction is coherence: one has equal signs, and the other has opposite signs. Hadamard turns that sign into a basis label.
Learning objectives
- Read the Hadamard matrix
- Derive H² = I
- Use Hadamard to read the X basis
Interactive exploration
Use the controls to change the state and see its calculated readout. You can return to this experiment as you work through the derivation.
Circuit composer
q0 = leftmost bit- H q0
- Z q0
- H q0
State at step 3
2 amplitudesEach shot independently prepares this step’s state. A dense simulator stores 2ⁿ complex amplitudes for n wires. The composer is capped at six wires.
Mathematical foundation
The columns are the images of the two computational basis states. Their squared norms are one and their inner product is zero.
Multiplying the matrices gives diagonal entries (1+1)/2 and off-diagonal entries (1−1)/2. Thus H is its own inverse.
Worked example
Insert Z between two Hadamards. First the state moves to |+⟩, then Z changes the sign to |−⟩, and the final H converts it to |1⟩. This conjugation realizes X on all states.
Guided experiment
Step through H–Z–H from |0⟩. Check the two middle rows of amplitudes and compare their identical probabilities.
Go to the controlsCompare with the expected result
The final Hadamard converts the middle sign difference into a deterministic output.
Understanding check
Circuit challenge
Prepare |+⟩ from |0⟩. Any circuit that creates the target state up to global phase is accepted.
Next steps
Want to keep your results? Start your learning journey
Open Circuit Composer