You are reading without signing in. Sign in or continue as guest to take quizzes and keep XP.
Superposition and the Hadamard gate
Where superpositions come from, what phase is, and why H twice does nothing.
- Apply H to |0⟩ and |1⟩ by hand.
- Distinguish |+⟩ from |−⟩ even though both give 50/50 outcomes.
- Predict the result of H·H.
Superposition is not a mystery word; it is a direction in the vector space that is neither |0⟩ nor |1⟩. The Hadamard gate rotates the basis states onto two such directions.
Phase: the sign you cannot see directly
|+⟩ and |−⟩ both measure 0 or 1 with probability one half. The minus sign is a relative phase. It is invisible to a measurement in the computational basis but it decides what happens next: H|+⟩ = |0⟩ while H|−⟩ = |1⟩. Interference is just phases adding or cancelling.
See phase on the Q-sphere
Open the State tab. Both amplitudes have probability 0.5, yet the point for |1⟩ carries phase π (shown by its colour). Remove the Z gate and the phase disappears while the bars stay identical.
OPENQASM 3.0; include "stdgates.inc"; qubit[1] q; h q[0]; z q[0];
H twice
Interference, step by step
Start Debug Mode (F5) and step with F10. After the first H the probabilities are 50/50; after the second they are back to 100% on |0⟩.
OPENQASM 3.0; include "stdgates.inc"; qubit[1] q; h q[0]; h q[0];
What is H|−⟩?
Sign in to answer and earn XP; you will come back to this lesson.
Two states give identical measurement statistics in the computational basis. Can they still differ?
Sign in to answer and earn XP; you will come back to this lesson.
Superposition is a direction between |0⟩ and |1⟩; phase is the sign between the two parts. Measurement hides phase, gates use it. H puts a qubit in superposition and H again takes it out by interference.
Up next: Measurement