Quantum Sandbox logo

Quantum Sandbox

An Interactive Quantum Circuit Playground

All Lessons Sandbox
Part 1: Foundations 10 min read

Measurement

Every quantum computation ends with a measurement. Understanding what happens in that moment - and why it is irreversible - is essential to understanding how quantum algorithms actually produce answers.

The moment everything collapses

You have a qubit in superposition: some mixture of |0⟩ and |1⟩. You want to know what it is. So you measure it. And the superposition - the careful, precise quantum state you have been manipulating with gates - is instantly gone.

Measurement collapses the qubit. The moment you measure, the qubit jumps into one of the two classical states: either 0 or 1. Which one it jumps to is determined by the amplitudes. If the qubit had a 70% amplitude for |0⟩ (meaning 70% probability), it will collapse to |0⟩ about 70% of the time and to |1⟩ about 30% of the time - across many repeated trials. Think of a spinning coin balanced on its edge: while it spins, it is not "heads" or "tails," it is some blend of both possibilities. The instant it lands, that blend resolves into one definite face - and you cannot un-land it.

After the collapse, the qubit is in a definite classical state. All the quantum information about the phase and superposition is gone. This is called the measurement problem, and it is one of the deepest mysteries in physics. Why does the act of observation cause this collapse? Physicists have several interpretations of what is actually happening, and they still argue about it. But the math - what the probabilities are and how collapse works - is precise and experimentally verified.

Born's rule: connecting amplitudes to probabilities

The rule that converts amplitudes to measurement probabilities is called Born's rule, named after physicist Max Born. It states: the probability of measuring a particular outcome is the square of the magnitude of the corresponding amplitude.

If the amplitude for |0⟩ is a complex number α, then the probability of measuring 0 is |α|² (the magnitude of α, squared). The same for |1⟩: probability equals |β|². Since probabilities must sum to 1, we always have |α|² + |β|² = 1. This is called normalization - the state vector is always normalized. It is the same bookkeeping rule as slicing a pie: however you cut the amplitudes between the two outcomes, the squared pieces always add back up to one whole pie.

The amplitude itself can be negative or complex, but probabilities are always positive real numbers between 0 and 1. This is why phase - the imaginary part and sign of the amplitude - does not directly appear in measurement outcomes but still matters enormously for interference.

Repeated measurement and sampling

Because measurement is probabilistic, a single measurement of a qubit in superposition tells you very little. You get one random outcome. To verify the actual state, you must prepare the same quantum state many times and measure it many times, collecting statistics. It is like trying to figure out if a coin is weighted by flipping it once - one flip tells you almost nothing, but a thousand flips reveal the true odds.

This is a fundamental constraint on quantum computing: you cannot simply "read out" the full state of a qubit. The state is rich with information - amplitudes, phases - but a single measurement only reveals one classical bit (0 or 1). Quantum algorithms are engineered so that the final state, right before measurement, makes the correct answer have very high probability. You still measure randomly, but the right answer is overwhelmingly likely.

Try it in the Sandbox
Watch the collapse in action
  1. Start: qubit is in |+⟩. Bloch sphere on the equator, 50/50 probabilities.
  2. Click Measure. The qubit collapses to |0⟩ or |1⟩, Bloch sphere jumps to a pole.
  3. Click Measure again. Same result. A collapsed qubit stays classical until reset.
  4. Click Reset State, then measure ten times and count your 0s and 1s.
  5. Switch preset to |0⟩ and measure. A definite state always collapses the same way.

The no-cloning theorem

Here is a surprising consequence of how measurement works: you cannot copy a qubit. If you could, you could copy the state, measure the copy, and leave the original intact, learning the full quantum state without destroying it. But the math of quantum mechanics does not allow copying an unknown quantum state. This is called the no-cloning theorem.

In classical computing, copying is free - you copy files all the time. In quantum computing, each qubit's state is unique and cannot be duplicated. This has profound implications for quantum error correction (which we cover in Lesson 9) and for quantum cryptography (Lesson 14).

How quantum algorithms deal with measurement

Given that measurement destroys superposition, quantum algorithm design is largely about answering one question: how do you engineer the quantum state so that, right before you measure, the answer you want has an overwhelmingly high probability?

This is where interference - the topic of Lesson 4 - becomes essential. The algorithm needs to guide the quantum calculation so that all the paths that lead to wrong answers destructively interfere (cancel each other out), while all the paths leading to the correct answer constructively interfere (reinforce each other). It is similar to noise-cancelling headphones, but run in reverse and aimed at answers instead of sound waves: wrong-answer waves are arranged to cancel each other out, while the right-answer wave is arranged to build up. Then you measure, get the answer with high probability, and you are done.

This interference-based amplification of correct answers is the core design principle behind most useful quantum algorithms.

Key takeaway

Measurement collapses a qubit's superposition into a single definite classical state (0 or 1) with probabilities determined by the amplitudes squared. This collapse is irreversible and destroys all quantum information - which is why quantum algorithms must be designed so the correct answer has very high probability before measurement.

Knowledge check · Question 1 of 4

A qubit is in a superposition where it has a 75% chance of measuring as |0⟩. You measure it and get |0⟩. You then measure again immediately. What do you get?

After measurement, the qubit collapses to a definite classical state. Measuring again gives the same result with 100% certainty - the superposition is gone, and you now have a classical bit.
Knowledge check · Question 2 of 4

A qubit's amplitude for |1⟩ is α = -0.6i (a negative imaginary number). According to Born's rule, what is the probability of measuring |1⟩?

Born's rule says probability equals the squared magnitude of the amplitude, |α|². For α = -0.6i, the magnitude is 0.6, and squaring it gives 0.36 - a positive real probability, regardless of the amplitude's sign or phase.
Knowledge check · Question 3 of 4

Why can't you simply measure a qubit once, write down its amplitudes, and call it done - the way you'd read a value out of a classical variable?

A single measurement collapses the qubit and gives only one classical outcome. To estimate the underlying amplitudes, you must prepare and measure the same state many times and look at the statistics across trials.
Knowledge check · Question 4 of 4

Why can't you make a perfect copy of an unknown qubit's state by measuring it and then preparing a fresh qubit in the same state?

Measurement only gives one classical bit and destroys the original superposition in the process, so you never get enough information to prepare an identical copy. This impossibility is exactly what the no-cloning theorem states.