ψQuantum Playground
← All lessons·Lesson 2 of 6 · 7 min

Superposition & the Hadamard gate

How one gate turns certainty into a perfect quantum coin flip — and why that's not randomness.

The Hadamard gate

The Hadamard gate (H) is the workhorse of quantum computing. Applied to |0⟩ it produces (|0⟩ + |1⟩)/√2 — the equal superposition. On the Bloch sphere, it swings the arrow from the north pole down to the equator.

Try it: load the Superposition preset, then use the step slider to compare the state before and after the H gate. The probability bars jump from 100% |0⟩ to 50/50.

Superposition is not ignorance

It's tempting to think the qubit is 'secretly' 0 or 1 and we just don't know which. That's wrong — and provably so. A qubit in superposition genuinely has no definite value yet.

The proof is interference: apply H twice and you return to |0⟩ with certainty. If the qubit had secretly picked a value after the first H, the second H would leave it 50/50. Instead, the two paths that lead to |1⟩ have opposite amplitudes (+1/2 and −1/2) and cancel out perfectly.

This cancellation — destructive interference — has no classical counterpart, because classical probabilities can't be negative.

Why algorithms care

With n qubits in superposition, the state holds amplitudes for all 2ⁿ basis states at once. A 300-qubit register spans more configurations than there are atoms in the observable universe.

But there's a catch: measuring collapses everything to a single outcome. Quantum algorithms are the art of choreographing interference so wrong answers cancel and right answers reinforce before you measure.

Try it yourself
Watch two Hadamards cancel
Open in simulator →
Key takeaways
  • H turns |0⟩ into an equal superposition of |0⟩ and |1⟩.
  • Two H gates in a row cancel — proof that superposition isn't hidden randomness.
  • Algorithms exploit interference: wrong answers cancel, right answers add up.