> QUANTUM 02 :: superposition & measurement

Non-graded · offline · explore at your own pace

Same odds, different states

A qubit in superposition isn't secretly 0 or secretly 1. Its amplitudes set the odds of each answer, and they can also be negative. Two qubits can have identical odds and still behave completely differently, and that difference is where quantum computing gets its power.

Amplitude — the number attached to each basis state. Square it to get a probability. Unlike probabilities, amplitudes can be negative (or complex), which lets them cancel each other out.
PLUS STATE
|+⟩ = 1/√2|0⟩ + 1/√2|1⟩
|0⟩
50%
|1⟩
50%
MINUS STATE
|−⟩ = 1/√2|0⟩ − 1/√2|1⟩
|0⟩
50%
|1⟩
50%

Measure either one and you get 0 or 1 with a 50/50 chance. Yet they are different states. Section 03 shows how to tell them apart with certainty.

01 · Refresher

From amplitudes to probabilities

Click a term to see how it fits together.

|ψ⟩=α|0⟩ + β|1⟩=αβ
P(0) = |α|²  ·  P(1) = |β|²  ·  |α|² + |β|² = 1

02 · Measurement

Looking forces a choice, and the choice sticks

Measuring a qubit in superposition gives a random result weighted by the amplitudes. Afterward the qubit is no longer in superposition: it has collapsed to whatever you saw. Measure it again and you get the same answer every time.

Collapse — after a measurement, the state becomes the basis state that was observed. The original amplitudes are gone and cannot be recovered from that qubit.

Try it: prepare one qubit, then measure it repeatedly

Set the odds and prepare a qubit. The first measurement is random. Every measurement after that repeats it, until you prepare a fresh qubit.

P(read 0) for the next qubit50%
current state:

03 · The core idea

Interference: amplitudes can cancel

The Hadamard gate (H) turns |0⟩ into |+⟩, an even 50/50 blend. Apply H a second time and you might expect another coin flip. Instead you get |0⟩ every single time. The two paths leading to |1⟩ have opposite signs and cancel, while the paths to |0⟩ add up. That is interference, and every useful quantum algorithm is built on it.

Hadamard gate — sends |0⟩ to |+⟩ and |1⟩ to |−⟩. As a matrix it is (1/√2)·[[1, 1], [1, −1]]. Page 04 covers it with the other gates.

Try it: H, then H again

Pick a starting state and run 100 shots. Then turn on the "peek" to measure in the middle and see what happens to the interference.

Amplitude bookkeeping

04 · Choosing what to measure

Measurement bases

So far every measurement has asked "0 or 1?" That's the Z basis (also called the computational or rectilinear basis). You can also ask "plus or minus?" by applying H and then measuring. That's the X basis (the diagonal basis). A state that is certain in one basis is a pure coin flip in the other.

|+⟩=1/√21/√2 |−⟩=1/√2−1/√2
H=1/√21   11  −1 H|+⟩=|0⟩ ·H|−⟩=|1⟩
Z BASIS  (+)
Distinguishes |0⟩ from |1⟩ perfectly. |+⟩ and |−⟩ both look like 50/50 noise.
X BASIS  (×)
Distinguishes |+⟩ from |−⟩ perfectly. |0⟩ and |1⟩ both look like 50/50 noise.

05 · Security connection

A message that changes when someone reads it

Measurement disturbs the state, and the no-cloning theorem says nobody can copy an unknown quantum state to measure the copy instead. Put those together and you get a channel where an eavesdropper can't look without leaving a detectable disturbance, as long as the protocol checks for it and the public discussion between the two parties is authenticated.

No-cloning theorem — there is no physical process that takes an unknown qubit and produces two identical copies of it. An attacker can't photocopy a quantum message and read the copy at leisure.
Where this goes: BB84 quantum key distribution (page 07) encodes key bits in randomly chosen Z or X bases. An eavesdropper who guesses the wrong basis collapses the photon and introduces errors the legitimate users can detect.
SUMMARY SLIDESView the Quantum 02 slide deck: Superposition & Measurement
PREVIOUS01 · Bits vs. qubits