Superposition
A qubit can be in two states at once — but the interesting word in that sentence is not “two,” it's “at.” The amplitudes do the work.
The qubit essay ended with a small magic trick: press H
on |0⟩ and the probability bars split 50/50. That's
superposition, technically. But “50/50” is also what a fair
coin gives you, and a fair coin is not interesting. The
interesting part of superposition isn't that two probabilities
appear at once. It's what's underneath the bars.
Under the bars sits a pair of complex numbers
(α, β) — the amplitudes — and the
state of the qubit is the linear combination
α|0⟩ + β|1⟩. The probabilities you read off the bars
are |α|² and |β|²: the squared magnitudes.
Two different state vectors can give you the same bars and behave
completely differently the moment you apply another gate. The
amplitudes are the real story; the probabilities are a lossy
summary.
This page is going to make you feel that gap. We're going to press two buttons that move the amplitudes around without changing the bars, and then sweep a slider to watch the amplitudes vary continuously. Everything here runs the same in-browser simulator as the qubit page — open the StateVector readout, keep an eye on the signs.
Press a gate, then look past the bars
Start from |0⟩. Press H: bars split,
state vector reads (0.707, 0.707). So far this is the
qubit-essay story. Now press Z.
P(|0⟩) = …, P(|1⟩) = …
…
Try this: from |0⟩, press
H, then Z. The probability bars do not
budge. The state-vector readout, on the other hand, just went from
(0.707, 0.707) to (0.707, −0.707). The
|1⟩ amplitude flipped sign. That minus sign is not
cosmetic — it's a different physical state from the one you had a
moment ago. The bars cannot tell you that. Z can.
Try this: press H again. With no
minus sign you'd be back at |0⟩ (because
H · H = I). With the minus sign, you land on
|1⟩ instead — the bars swing all the way to the right.
The two amplitudes you couldn't distinguish by probability alone
behave oppositely under the next gate. This is the bare-bones
preview of interference: amplitudes can add or
cancel, and the sign tells you which.
A workable rule of thumb, then: magnitudes are what you measure; amplitudes are what evolves. Treat the bars as a status light. Treat the state vector as the wiring.
Amplitudes vary continuously
Discrete gates jump between named states. To get a feel for
amplitudes as numbers, sweep this Rx(θ)
slider. Each slider snapshots the state when you grab it, so
returning to θ = 0 always restores the state you
started from — these don't compound.
Try this: from |0⟩, sweep
Rx(θ) from 0 to π. The
|0⟩ amplitude shrinks smoothly to zero while the
|1⟩ amplitude grows. Halfway through, at
θ = π/2, the bars hit 50/50 — same statistical picture
as H|0⟩, but you got there with a continuous knob
instead of a button press, and the amplitudes are
imaginary, not real-and-positive. (Watch the
i in the StateVector readout.) Superposition isn't a
binary mode the qubit is “in”; it's a two-dimensional
continuum.
Try this: press H first, then sweep
Rx. The slider rotates the state vector around the
same axis the gate buttons act on, but starting from somewhere
other than |0⟩ — so the amplitudes mix differently.
There is no “the” superposition state; there's a whole
sphere of them, and you've just been touring a great circle.
Self-test
-
From
|0⟩, you applyHZH. What do the probability bars read, and what does the state vector read? Why are those two answers not contradictory? (Try it with the buttons. Then explain to yourself, in one sentence, what the middleZbought you.) -
Find two different positions of the
Rxslider that give the same probability bars but visibly different state-vector readouts. What would have to be true about a follow-up gate for those two states to behave differently under it?
Open it up
The starter below drops you into the sandbox with a single
H on one qubit — the canonical superposition state,
|+⟩. Add a Z after it to set up the sign
flip you've been poking at; or stack rotations and find your own
pair of indistinguishable-by-bars states. The next essay,
measurement, asks the obvious follow-up:
if amplitudes are what evolves and magnitudes are what you measure,
what is measurement actually doing to the wiring?
α|0⟩ + β|1⟩, formally
A single-qubit pure state is a unit vector in :
The basis vectors are orthonormal under the standard Hermitian inner product — the one-liner you'll lean on every time you compute a probability or a transition amplitude:
Amplitudes vs. probabilities. The Born rule
collapses the complex amplitude into a single
real probability .
That map is lossy in two ways: it discards the sign (and, more
generally, the global phase factor
) and it discards
the relative phase between
and
. Relative phase is what
Z changes on this page; it is invisible to the
probability bars and decisive for what the next gate does. Hold
onto this — every interference-driven algorithm is, at heart, a
careful choreography of relative phases.
For the math nerds
Two states and give identical measurement statistics in every basis and under every subsequent unitary — they are the same physical state, with different mathematical representatives. This is why we say single-qubit states live on the Bloch sphere (a 2-sphere) rather than on the unit sphere in (a 3-sphere): we quotient out the global-phase circle.
Relative phase is what survives that quotient. When you flipped
the sign of with
Z above, the global phase didn't change — the
relative phase between
and
rotated by
. That's the physically
observable change.