Simple Algorithm
Quantum Computing · Ground State · 15 min

Measurement

How quantum information becomes classical, and why you only get one look.

A qubit can be in infinitely many different states, yet when you look at it you get exactly one bit, and the look itself changes the qubit. Measurement is where quantum information becomes classical data, and every quantum algorithm has to plan around it.

What you’ll learn

  • Predict measurement probabilities from amplitudes with the Born rule.
  • Explain collapse, and why a single copy of a qubit reveals so little about its state.
  • Measure in the ZZ, XX and YY bases and connect the results to directions on the Bloch sphere.
  • Show how recording a qubit's value in the middle of a circuit destroys interference.
  • Compute an expectation value such as ⟨Z⟩\expval{Z} from outcome frequencies.

One look, one bit

The qubit below starts at the north pole, ∣0⟩\ket{0}. Press H to swing it onto the equator. It is now the superposition ∣+⟩=12(∣0⟩+∣1⟩)\ket{+} = \tfrac{1}{\sqrt2}(\ket{0}+\ket{1}): a perfectly definite state, described by two amplitudes.

Now look at it by pressing Measure. A measurement does not report the amplitudes. It reports a single classical bit, 00 or 11, and the arrow jumps to the matching pole.

The Born rule

For a qubit in the state ∣ψ⟩=α∣0⟩+β∣1⟩\ket{\psi} = \alpha\ket{0} + \beta\ket{1}, the odds are set by the squared magnitudes of the amplitudes. This is the Born rule:

P(0)=∣α∣2,P(1)=∣β∣2P(0) = \abs{\alpha}^2, \qquad P(1) = \abs{\beta}^2
For a state at polar angle θ\theta on the Bloch sphere, ∣ψ⟩=cos⁡θ2∣0⟩+eiφsin⁡θ2∣1⟩\ket{\psi}=\cos\tfrac{\theta}{2}\ket{0}+e^{i\varphi}\sin\tfrac{\theta}{2}\ket{1}, this reads P(0)=cos⁡2θ2P(0)=\cos^2\tfrac{\theta}{2}: the closer the arrow is to the north pole, the likelier a 00.
Predict before you look

A qubit sits at polar angle θ=60∘\theta = 60^\circ, a third of the way from the north pole to the south pole, so its amplitude on ∣1⟩\ket1 is β=sin⁡30∘=12\beta = \sin 30^\circ = \tfrac12. You prepare and measure 1000 copies. About how many 11s do you expect?

Show the answer

250 ones

P(1)=∣β∣2=(12)2=14P(1) = \abs{\beta}^2 = \left(\tfrac12\right)^2 = \tfrac14, so about 250250. An amplitude of 12\tfrac12 means a probability of 14\tfrac14, not 12\tfrac12. From run to run the count wobbles by about ±14\pm 14 (one standard deviation is 1000⋅14⋅34≈13.7\sqrt{1000\cdot\tfrac14\cdot\tfrac34}\approx 13.7).

Collapse: you only get one look

After a measurement the qubit is left in the state that matches the outcome: ∣0⟩\ket{0} if you saw 00, ∣1⟩\ket{1} if you saw 11. This update is called collapse. Whatever the amplitudes were before, that information is gone, except for the single bit you recorded.

That makes one qubit a stingy source of information. Measuring it again teaches you nothing new, because it just repeats its answer. And you cannot make backup copies beforehand: the no-cloning theorem forbids copying an unknown quantum state.

Think first A friend hands you one qubit in a state α∣0⟩+β∣1⟩\alpha\ket0+\beta\ket1 that only they know. You measure it and get 00. What have you learned about α\alpha and β\beta?

Almost nothing: only that α≠0\alpha \neq 0. Nearly every state can produce a 00. To estimate ∣α∣2\abs{\alpha}^2 you need many identically prepared copies and the fraction of 00s; to pin down the relative phase you also need other measurement bases (coming up next). Reconstructing a state this way is called state tomography.

Before the measurementAfter the measurement
Two continuous amplitudes α,β\alpha,\betaOne recorded bit
Outcome uncertain (unless α\alpha or β\beta is 00)Repeating the measurement gives the same bit
Superposition, able to interfereReplaced by ∣0⟩\ket0 or ∣1⟩\ket1
What one measurement in the {∣0⟩,∣1⟩}\{\ket0,\ket1\} basis does to a qubit.

Choosing a basis

"Is it 00 or 11?" is a question about the vertical axis of the Bloch sphere. You can ask about any axis. Measuring in the XX basis asks "is it ∣+⟩\ket{+} or ∣−⟩\ket{-}?"; the YY basis asks "is it ∣+i⟩\ket{+i} or ∣−i⟩\ket{-i}?". The two possible answers are always a pair of opposite points on the sphere.

Try one state, ∣+⟩\ket{+}, with three different questions.

The rule behind these histograms: if the state's arrow makes an angle γ\gamma with the measurement axis, the outcome "along the axis" has probability cos⁡2γ2\cos^2\tfrac{\gamma}{2}. For ∣+⟩\ket{+} and the XX axis, γ=0\gamma = 0 and the probability is 11. For the ZZ or YY axis, γ=90∘\gamma = 90^\circ and cos⁡245∘=12\cos^2 45^\circ = \tfrac12.

Check your understanding

A qubit is in the state ∣−i⟩=12(∣0⟩−i∣1⟩)\ket{-i} = \tfrac{1}{\sqrt2}(\ket{0} - i\ket{1}). In which basis does a measurement give the same outcome every time?

  1. The ZZ basis
  2. The XX basis
  3. The YY basis
  4. None: a superposition always gives random outcomes
Show the answer

C. The YY basis

∣−i⟩\ket{-i} is one of the two YY-basis states (the −y-y point of the sphere), so a YY measurement returns "−i-i" with certainty. Relative to the ZZ and XX axes its arrow is at 90∘90^\circ, which gives 50/50.

Rotate, then measure

Most quantum hardware can only measure in the ZZ basis. To ask a different question, first rotate the state so that the axis you care about points along zz, then measure.

For the XX basis the rotation is the Hadamard gate: H∣+⟩=∣0⟩H\ket{+} = \ket{0} and H∣−⟩=∣1⟩H\ket{-} = \ket{1}. So "apply HH, then measure" is an XX measurement, with result 00 meaning ++ and result 11 meaning −-.

Looking destroys interference

Two Hadamards in a row do nothing: HH∣0⟩=∣0⟩HH\ket{0} = \ket{0}. The first HH splits the qubit into two branches, and the second recombines them so that the two contributions to ∣1⟩\ket{1} cancel. That cancellation is interference.

What if, between the two gates, a record is made of whether the qubit was 00 or 11? Nobody even has to read it. The circuit below compares an untouched qubit (top wire) with one whose value is copied onto a third "notebook" qubit by a CNOT gate (the dot joined to the ⊕\oplus).

The copy did to the middle qubit exactly what a measurement does: it forced the two branches apart, so they can no longer recombine. Any interaction that leaves a record has this effect, whether it is a detector click, a scattered photon or a stray spin in the chip. When the environment does it uncontrollably, it is called decoherence, the main enemy of quantum computers. It is also why algorithms save their measurements for the very end.

Averages, and what comes next

Physicists often label the outcomes +1+1 (for 00) and −1-1 (for 11). The average of many such results is the expectation value

⟨Z⟩=(+1) P(0)+(−1) P(1)=P(0)−P(1).\expval{Z} = (+1)\,P(0) + (-1)\,P(1) = P(0) - P(1).

It runs from +1+1 (always 00) through 00 (a fair coin) to −1-1 (always 11). The same recipe in the XX and YY bases gives ⟨X⟩\expval{X} and ⟨Y⟩\expval{Y}, and together the three averages are the coordinates of the qubit's arrow on the Bloch sphere.

Predict before you look

A qubit gives 00 in 80% of the shots. What is ⟨Z⟩\expval{Z}?

Show the answer

0.6

⟨Z⟩=P(0)−P(1)=0.8−0.2=0.6\expval{Z} = P(0) - P(1) = 0.8 - 0.2 = 0.6. Geometrically, that is the height of the arrow: cos⁡θ=2cos⁡2θ2−1=0.6\cos\theta = 2\cos^2\tfrac{\theta}{2} - 1 = 0.6.

Excited State lessonWhat you will be able to do
The Born Rule & Projective MeasurementUse projectors to compute probabilities and post-measurement states, measure one qubit out of many, and prove why overlapping states can never be told apart perfectly.
Observables, Bases & Expectation ValuesTreat measurable quantities as Hermitian matrices, compute ⟨A⟩=⟨ψ∣A∣ψ⟩\expval{A} = \bra{\psi}A\ket{\psi}, and measure in any basis.
Density Matrices & Mixed StatesDescribe a qubit you are uncertain about, with states that live inside the Bloch ball.
Generalized Measurements (POVMs)Go beyond projectors: measurements with more outcomes than dimensions, and the best possible ways to distinguish states.
The four Excited State lessons of this topic. Each opens into Rydberg-level deep dives, from why the Born rule must hold (Gleason's theorem) to uncertainty relations, contextuality and the measurement problem.

Key takeaways

  • Measuring a qubit returns one classical bit. The Born rule gives the odds: P(0)=∣α∣2P(0)=\abs{\alpha}^2 and P(1)=∣β∣2P(1)=\abs{\beta}^2.
  • Measurement collapses the state onto the outcome, so repeating it repeats the answer, and one copy reveals almost nothing about the amplitudes.
  • You can measure along any axis of the Bloch sphere. In practice you rotate first and then measure in ZZ (apply HH for the XX basis).
  • A state that is certain in one basis is random in the complementary ones (ZZ, XX, YY).
  • Any record of a qubit's value, even one nobody reads, destroys interference. That is decoherence, and it is why algorithms measure at the end.
  • Averages of ±1\pm1 outcomes are expectation values, and ⟨X⟩,⟨Y⟩,⟨Z⟩\expval{X},\expval{Y},\expval{Z} are the coordinates of the Bloch vector.

Check yourself

In the interactive lesson these are scored with your confidence, and what you miss comes back for review.

Question 1

A qubit is in the state 13∣0⟩+i23 ∣1⟩\tfrac{1}{\sqrt3}\ket{0} + i\sqrt{\tfrac23}\,\ket{1}. What is the probability of measuring 11?

  1. 13\tfrac13
  2. 23\sqrt{\tfrac23}
  3. 23\tfrac23
  4. −23-\tfrac23
Show the answer

C. 23\tfrac23

P(1)=∣i2/3∣2=∣i∣2⋅23=23P(1) = \abs{i\sqrt{2/3}}^2 = \abs{i}^2\cdot\tfrac23 = \tfrac23. The factor ii is a phase: it has magnitude 11 and does not change the odds.

Question 2

Why can't you learn the amplitudes α\alpha and β\beta of a single qubit by measuring it over and over?

  1. After the first measurement it has collapsed, so later measurements just repeat the first result
  2. Because every measurement outcome is a 50/50 coin flip
  3. Because measuring always destroys the qubit
  4. You can, as long as you measure quickly enough
Show the answer

A. After the first measurement it has collapsed, so later measurements just repeat the first result

The first measurement replaces the state by ∣0⟩\ket0 or ∣1⟩\ket1. Every later measurement in the same basis reports that same bit, so you learn nothing new. Estimating amplitudes requires many freshly prepared copies.

Question 3

You measure the state ∣0⟩\ket{0} in the XX basis. What do you get?

  1. ++ with certainty
  2. ++ or −-, each with probability 12\tfrac12
  3. −- with certainty
  4. 00 with certainty, because the state is ∣0⟩\ket0
Show the answer

B. ++ or −-, each with probability 12\tfrac12

∣0⟩\ket0 points along zz, at 90∘90^\circ to the XX axis, so each outcome has probability cos⁡245∘=12\cos^2 45^\circ = \tfrac12. Equivalently, H∣0⟩=∣+⟩H\ket0 = \ket+, which a ZZ measurement reads as 50/50.

Question 4

A qubit starts in ∣0⟩\ket0 and goes through HH, then a measurement, then another HH, then a final measurement. What is the probability that the final result is 11?

  1. 00, because HHHH does nothing
  2. 14\tfrac14
  3. 11
  4. 12\tfrac12
Show the answer

D. 12\tfrac12

The middle measurement leaves ∣0⟩\ket0 or ∣1⟩\ket1. The second HH turns either one into an equal superposition, so the final result is 50/50. Without the middle measurement the branches would interfere and give 00 every time.

Question 5

For which of these states is ⟨Z⟩=0\expval{Z} = 0?

  1. ∣0⟩\ket0
  2. ∣1⟩\ket1
  3. ∣+i⟩\ket{+i}
  4. cos⁡π8∣0⟩+sin⁡π8∣1⟩\cos\tfrac{\pi}{8}\ket0 + \sin\tfrac{\pi}{8}\ket1
Show the answer

C. ∣+i⟩\ket{+i}

∣+i⟩\ket{+i} lies on the equator, so P(0)=P(1)=12P(0) = P(1) = \tfrac12 and ⟨Z⟩=0\expval{Z} = 0. Every equator state has ⟨Z⟩=0\expval{Z}=0.

Go deeper

Further reading

  • M. A. Nielsen & I. L. Chuang, Quantum Computation and Quantum Information, §1.2 and §2.2.3 (Cambridge, 10th anniv. ed., 2010).
  • J. Preskill, Caltech Ph219/CS219 lecture notes, Ch. 2 "Foundations I: States and Ensembles" and Ch. 3 "Foundations II: Measurement and Evolution".