Hadamard and Superposition
The Hadamard gate adds and subtracts the two amplitudes, then divides each by √2. It turns |0⟩ into an even superposition, and applying it twice undoes it. A phase placed between two H gates decides the final result. So H works as a phase detector, not a randomiser.
What does Hadamard actually compute?
Why care? H is the most-used gate in quantum computing. It is also the most misunderstood.
The Hadamard gate H is an add-and-subtract machine. It takes the amplitude pair (α, β) and gives back a new pair:
- the new |0⟩ amplitude is (α + β)/√2.
- the new |1⟩ amplitude is (α − β)/√2.
Start from |0⟩, with amplitudes (1, 0). H gives ((1 + 0)/√2, (1 − 0)/√2) = (0.7071, 0.7071). That is the state |+⟩. It is an even superposition. A superposition is simply a state with more than one non-zero amplitude.
Start from |1⟩, with amplitudes (0, 1). H gives ((0 + 1)/√2, (0 − 1)/√2) = (0.7071, −0.7071). That is the state |−⟩. Same histogram, opposite sign.
- Worked example: what happens if you apply H twice?
- Worked example: can H turn a hidden sign into a sure result?
- Run it: H then HINTERACTIVE
- Try this: insert a Z between the two H gatesINTERACTIVE
- Does Hadamard randomise the qubit?
- Where does this go next?
You’ve read the opening of chapter 7. Pro unlocks the other 6 sections — plus every chapter of every course, with circuits you can run right on the page. That’s $11.99 a month, about the price of a coffee, or $99.99 a year (save 30%). The first chapter of every course, and the whole math course, stay free.