Quantum Outpost
foundations beginner · 22 min read ·

Superposition, Measurement, and the Born Rule

Measurement turns amplitudes into probabilities and destroys superposition. This tutorial walks through the Born rule, measurement in different bases, the no-cloning theorem, and why you can't just peek at a qubit without breaking it — with runnable Qiskit code.

Prerequisites: Tutorial 1: What Is a Qubit?

In the last tutorial we built a mathematical object — a unit vector in a 2-D complex space — and called it a qubit. We wrote down superpositions like +=12(0+1)|+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) and insisted they are real, distinct states, not just “the qubit secretly is 0 or 1.”

So how do you ever get an answer out of the thing? You measure it. Measurement is how the quantum world hands results back to the classical world, and it is the single weirdest operation in all of physics. This tutorial will make it less weird.

The Born rule, in one sentence

If a qubit is in the state

ψ  =  α0  +  β1,|\psi\rangle \;=\; \alpha\,|0\rangle \;+\; \beta\,|1\rangle,

and you measure it in the computational basis (which is the default), then:

You get the outcome 0 with probability α2|\alpha|^2, and the outcome 1 with probability β2|\beta|^2. After measurement, the state collapses to the corresponding basis vector (0|0\rangle or 1|1\rangle).

That rule is called the Born rule, and it is the postulate that connects quantum amplitudes to experimental probabilities. The normalization constraint α2+β2=1|\alpha|^2 + |\beta|^2 = 1 we imposed earlier is exactly the requirement that Born-rule probabilities sum to 1.

Three consequences follow immediately. Internalize all three.

  1. Measurement is destructive. After you measure, the superposition is gone. The qubit is now in 0|0\rangle or 1|1\rangle, not α0+β1\alpha|0\rangle + \beta|1\rangle.
  2. You can’t recover α\alpha and β\beta from a single measurement. You only ever get one classical bit. To estimate the amplitudes you need many copies of the state and repeated measurements.
  3. The global phase doesn’t matter. The states ψ|\psi\rangle and eiθψe^{i\theta}|\psi\rangle give identical measurement statistics in every basis. That’s why the Bloch sphere lives in 3 real dimensions, not 4.

Put it in code: measure, repeat, count

Let’s concretely verify the Born rule. Put a qubit in +|+\rangle and measure it 1024 times. We expect roughly 50/50.

from qiskit import QuantumCircuit
from qiskit_aer import AerSimulator

qc = QuantumCircuit(1, 1)   # 1 qubit, 1 classical bit to record the result
qc.h(0)                     # |0⟩ → |+⟩
qc.measure(0, 0)            # measure qubit 0 into classical bit 0

sim = AerSimulator()
result = sim.run(qc, shots=1024).result()
counts = result.get_counts()
print(counts)
# {'0': 512, '1': 512}   (roughly — you'll see small random variation)

Now try a weighted superposition. Use the RY gate, a rotation around the yy-axis of the Bloch sphere:

Ry(θ)0  =  cos ⁣θ20  +  sin ⁣θ21.R_y(\theta)\,|0\rangle \;=\; \cos\!\tfrac{\theta}{2}\,|0\rangle \;+\; \sin\!\tfrac{\theta}{2}\,|1\rangle.

Pick θ=π/3\theta = \pi/3 so that cos(π/6)0.866\cos(\pi/6) \approx 0.866 and sin(π/6)=0.5\sin(\pi/6) = 0.5. The Born rule predicts P(0)=0.8662=0.75P(0) = 0.866^2 = 0.75 and P(1)=0.52=0.25P(1) = 0.5^2 = 0.25:

import numpy as np

qc = QuantumCircuit(1, 1)
qc.ry(np.pi / 3, 0)
qc.measure(0, 0)

counts = sim.run(qc, shots=10_000).result().get_counts()
print({k: v / 10_000 for k, v in counts.items()})
# {'0': 0.7499, '1': 0.2501}  — matches the prediction to within shot noise

Measurement collapses the state

After you measure, the qubit is in an eigenstate of whatever you measured. Concretely: if the Born rule gave you outcome 0, the post-measurement state is 0|0\rangle. If it gave you 1, the post-measurement state is 1|1\rangle. Re-measuring immediately will give the same result with 100% certainty.

Demonstrate in code:

qc = QuantumCircuit(1, 2)   # 1 qubit, 2 classical bits
qc.h(0)                     # |+⟩
qc.measure(0, 0)            # first measurement — random 0 or 1
qc.measure(0, 1)            # second measurement — must match the first

counts = sim.run(qc, shots=4096).result().get_counts()
print(counts)
# {'00': 2048, '11': 2048}  — '01' and '10' never appear

The two classical bits always agree. The first measurement “picked a side,” and the qubit stayed there. The H gate’s superposition is gone.

Measurement bases: the same qubit, a different question

Here’s the step most tutorials skip. When you “measure a qubit,” you are actually asking a specific question: “are you along the +z+z or z-z axis of the Bloch sphere?” That’s the computational (or ZZ-) basis, and it’s the default.

You can ask different questions. The XX-basis measurement asks “are you along +x+x or x-x?” — i.e., are you +|+\rangle or |-\rangle? Operationally, measuring in the XX-basis means: apply an HH gate, then measure in the ZZ-basis. The HH gate rotates the XX-axis of the Bloch sphere onto the ZZ-axis, converting the question.

Try it. A qubit in +|+\rangle measured in ZZ gives random 0/1 (50/50). The same qubit measured in XX gives 0 every time:

# Z-basis measurement of |+⟩: 50/50
qc_z = QuantumCircuit(1, 1)
qc_z.h(0)
qc_z.measure(0, 0)
print("Z-basis:", sim.run(qc_z, shots=1024).result().get_counts())
# Z-basis: {'0': 512, '1': 512}

# X-basis measurement of |+⟩: always 0
qc_x = QuantumCircuit(1, 1)
qc_x.h(0)            # prepare |+⟩
qc_x.h(0)            # rotate X-axis onto Z-axis for measurement
qc_x.measure(0, 0)
print("X-basis:", sim.run(qc_x, shots=1024).result().get_counts())
# X-basis: {'0': 1024}

The point: the same physical state can be random or deterministic, depending on what question you ask. This is very not-classical. Classical systems don’t care which coordinate system you use to describe them; quantum systems do.

This is also the basis (pun intended) of quantum cryptography. The BB84 protocol — the original quantum key distribution scheme from 1984 — is built entirely on the fact that measuring in the wrong basis scrambles the result in a way the eavesdropper can’t undo. We’ll build BB84 in the PQC track.

The no-cloning theorem

Classical bits can be copied arbitrarily: y = x just works. Qubits cannot. There is a short proof, and every quantum developer should be able to reproduce it in bar-napkin form.

Suppose there were a universal copying machine — a unitary operation UU such that for every state ψ|\psi\rangle,

U(ψ0)  =  ψψ.U\big(|\psi\rangle \otimes |0\rangle\big) \;=\; |\psi\rangle \otimes |\psi\rangle.

(Read ψ0|\psi\rangle \otimes |0\rangle as “the joint state of a data qubit in ψ|\psi\rangle and a blank qubit in 0|0\rangle.”)

Apply UU to two different states, ψ|\psi\rangle and φ|\varphi\rangle. Unitary operations preserve inner products, so

ψφ  =  ψφ2.\langle \psi | \varphi \rangle \;=\; \langle \psi | \varphi \rangle^2.

The only solutions are ψφ=0\langle \psi | \varphi \rangle = 0 (orthogonal) or ψφ=1\langle \psi | \varphi \rangle = 1 (identical). So no single unitary can clone arbitrary states. ∎

Consequences:

  • You can’t inspect a qubit without disturbing it. There’s no qubit.state accessor. The best you can do is measure, which collapses it.
  • Quantum states can’t be backed up. Decoherence is one-way.
  • Quantum key distribution is secure against passive eavesdropping — an attacker can’t copy the qubits in flight.
  • Quantum error correction has to work without copying. This is why it’s hard and took 30 years to develop.

The density matrix detour (skip on first read)

We’ve been describing qubits as state vectors ψ|\psi\rangle. This is called a pure state. In real hardware you often deal with mixed states — statistical ensembles of pure states, usually because of noise. Those need a richer object called a density matrix, written ρ\rho:

ρ  =  ipiψiψi\rho \;=\; \sum_i p_i\,|\psi_i\rangle\langle\psi_i|

For a pure state, ρ=ψψ\rho = |\psi\rangle\langle\psi| and ρ2=ρ\rho^2 = \rho. For a mixed state, tr(ρ2)<1\text{tr}(\rho^2) < 1.

The Born rule generalizes: the probability of outcome mm (with corresponding projector PmP_m) is tr(Pmρ)\text{tr}(P_m \rho).

You won’t need this until you start modeling noise, but keep the name in your pocket.

Reconstructing a state: quantum state tomography

Since a single measurement yields only one classical bit, how do you figure out what state a qubit is in from experimental data? You measure it many times, in many bases, and reconstruct.

For a single qubit, three measurements suffice: expectation values in the XX, YY, and ZZ bases. Those three numbers determine the Bloch-sphere coordinates (rx,ry,rz)(r_x, r_y, r_z) and hence the state.

from qiskit.quantum_info import Statevector, DensityMatrix, Pauli

qc = QuantumCircuit(1)
qc.ry(np.pi / 3, 0)     # some arbitrary state
state = Statevector.from_instruction(qc)
rho = DensityMatrix(state)

# Expectation values <X>, <Y>, <Z>
bloch = [rho.expectation_value(Pauli(p)).real for p in ["X", "Y", "Z"]]
print("Bloch vector:", bloch)
# Bloch vector: [0.866..., 0.0, 0.5]

Interpret: the state sits on the Bloch sphere at (rx,ry,rz)=(sinπ/3,0,cosπ/3)(0.866,0,0.5)(r_x, r_y, r_z) = (\sin\pi/3, 0, \cos\pi/3) \approx (0.866, 0, 0.5). That matches our Ry(π/3)0R_y(\pi/3)|0\rangle preparation.

Real-hardware tomography is the same idea, done with shot-noise-limited estimates of each expectation value.

Exercises

1. Born-rule prediction

A qubit is prepared in the state ψ=120+321|\psi\rangle = \frac{1}{2}|0\rangle + \frac{\sqrt{3}}{2}|1\rangle. What are the probabilities of outcomes 0 and 1 in the computational basis? What’s the post-measurement state after each outcome?

Show answer

P(0)=(1/2)2=1/4P(0) = (1/2)^2 = 1/4; P(1)=(3/2)2=3/4P(1) = (\sqrt{3}/2)^2 = 3/4. Post-measurement states are 0|0\rangle and 1|1\rangle respectively.

2. Measurement-basis intuition

Prepare 0|0\rangle. Measure in the XX-basis (apply HH, then measure). What do you get? Why?

Show answer

You get 0 and 1 with equal probability. Reason: in the XX-basis, 0|0\rangle is 12(++)\frac{1}{\sqrt{2}}(|+\rangle + |-\rangle) — a superposition — so the Born rule gives 50/50. The same physical state is deterministic in ZZ and random in XX.

3. Code

Write a function estimate_bloch_z(circuit, shots=4096) that returns the estimated Z=P(0)P(1)\langle Z \rangle = P(0) - P(1) for the qubit produced by circuit. Test it on 0|0\rangle (should return ≈ +1), 1|1\rangle (≈ −1), +|+\rangle (≈ 0).

Show answer
def estimate_bloch_z(base: QuantumCircuit, shots: int = 4096) -> float:
    qc = base.copy()
    qc.measure_all()                     # add measurement to all qubits
    counts = sim.run(qc, shots=shots).result().get_counts()
    n0 = counts.get("0", 0)
    n1 = counts.get("1", 0)
    return (n0 - n1) / shots

qc0 = QuantumCircuit(1)                     ;  print(estimate_bloch_z(qc0))   # ≈ +1
qc1 = QuantumCircuit(1); qc1.x(0)            ;  print(estimate_bloch_z(qc1))   # ≈ −1
qcp = QuantumCircuit(1); qcp.h(0)            ;  print(estimate_bloch_z(qcp))   # ≈  0

4. Think: why no-cloning matters for error correction

Classical error correction often just duplicates: y = x; z = x;, then majority-vote. Why can’t quantum error correction use the same trick? Sketch one alternative idea, without writing the full surface code.

Show answer

No-cloning forbids “copy the unknown qubit into two more registers.” Instead, QEC entangles the data qubit with a set of ancilla qubits so that a single logical qubit is spread across many physical ones. Errors are then detected by measuring parity checks on the ancillas — these are syndrome measurements that tell you which error occurred without ever measuring the data qubit itself. Track 6 covers this in detail.

What you should take away

  • Born rule: the probability of an outcome equals the squared magnitude of the corresponding amplitude.
  • Measurement collapses: the post-measurement state is the basis vector of the outcome.
  • Different bases ask different questions. Measuring in the XX-basis is H then measure. Measuring in the YY-basis is SDG then H then measure.
  • No-cloning: an unknown quantum state cannot be copied. This underwrites quantum cryptography and shapes how QEC works.
  • Global phases are physically unobservable. Relative phases are the whole point.

Next: what happens when you have more than one qubit. That’s where entanglement shows up — and where classical intuition finally runs out.


Weekly dispatch

Quantum, for people who already code.

One serious tutorial per week, plus the industry moves that actually matter. No hype, no hand-waving.

Free. Unsubscribe anytime. We will never sell your email.