Skip to main content
All visualizations
Beginner

Superposition & Measurement

Build a quantum state, then find out what measuring it actually does.

Superposition & Measurement visualization

Bar height is the probability of that outcome. Press “Measure once” to collapse the state.

Basis stateAmplitudeProbability
|0⟩0.70750.0%
|1⟩0.70750.0%

Superposition is not “secretly one of them”

The bars above are not a bookkeeping device for ignorance. The state is a genuine weighted sum of every basis state at once, and the weights — the amplitudes — are numbers that can be negative or complex, not just probabilities between 0 and 1.

That is the whole difference. Two amplitudes of +0.707 and −0.707 can add up to zero. Two probabilities never can — probabilities only ever pile up. Cancellation is the thing a quantum computer has that a coin flip does not.

Measurement picks one, and the rest is gone

When you measure, outcome i appears with probability |amplitude_i|² — exactly the bar heights. Nothing about which one you get is stored anywhere beforehand.

Afterwards the state is that outcome: one bar at 100%, everything else at zero. Press Measure once a few times in a row and feel how genuinely random each answer is, then press Run 1000 shots and watch the distribution the bars predicted assemble itself out of that randomness.

Phase is invisible until it isn’t

Turn on Show phase. Two states can have identical bars and completely different dials — apply Z or S to a qubit in superposition and the heights do not budge while the hands swing. No single measurement can tell those states apart.

Now apply H twice to the same qubit. The first H splits |0⟩ into two equal amplitudes; the second one makes the |1⟩ contributions arrive with opposite signs, so they cancel and the state snaps back to |0⟩ with certainty. That cancellation is only possible because of the phase you could not measure — which is why every useful quantum algorithm spends its time arranging phases so that wrong answers cancel and right answers add.