Measurement
A qubit’s state is two amplitudes. So can we read those amplitudes out? We cannot, and the reason shapes everything else in quantum computing.
The Born rule
Section titled “The Born rule”When you measure a qubit in the state , you do not see or . You get a single classical bit:
- 0 with probability ,
- 1 with probability .
This is the Born rule, and it explains the normalisation condition from the last lesson. The two probabilities must add up to one, so .
You measure the state . What is the probability of getting 1?
The amplitude of is , and . The sign disappears when you square.
Measurement changes the state
Section titled “Measurement changes the state”The second half of the rule is just as important. After the measurement, the qubit is no longer in its old state:
- if you saw 0, the qubit is now in ,
- if you saw 1, the qubit is now in .
The amplitudes and are gone. Measuring again gives the same answer as the first time, with certainty, and tells you nothing new.
So one qubit gives you one bit, and only once. To estimate you need many fresh copies of the same state, measuring each one and counting.
Try it. Build the state , then press Measure ×100 a few times. Each press prepares the state afresh 100 times and measures each copy.
Starting from , make a state that gives 0 and 1 with equal probability.
This puzzle needs JavaScript.
The counts are close to 50 and 50 but not exactly, and they change every time. That randomness is not a limitation of the simulator. As far as anyone knows, it is a basic feature of nature.
Two states with the same statistics
Section titled “Two states with the same statistics”Now make and measure it.
Starting from , make the state .
This puzzle needs JavaScript.
Hint
turns into . So first get to .
The measurement counts for look just like the counts for : half zeros, half ones. If measurement is all we can do, are these two really different states?
They are, and you can prove it with a circuit. The gate , called the Hadamard gate, acts like this:
It also works in reverse: and . So if someone hands you a qubit that is either or , apply and then measure. You get 0 for and 1 for , every time.
The sign between the two terms is called a relative phase. A direct measurement cannot see it, but a gate applied before the measurement can turn it into something visible.
Interference
Section titled “Interference”Why does applying twice bring back to ? Follow the amplitudes:
Collect terms. The amplitude of is . The amplitude of is .
There are two routes to , and their amplitudes are equal and opposite, so they cancel. The two routes to add up. This is interference, and it cannot happen with probabilities, which are never negative. A coin flipped twice is still random. A qubit “flipped” twice with is certain.
The next puzzle uses interference to do something that looks impossible with the gates you are given.
Take to using only and . The gate leaves alone and sends to .
This puzzle needs JavaScript.
Hint
changes the sign of the amplitude, so it turns into . What does do to ?
On its own, does nothing you could ever see by measuring: it only changes a sign. Placed between two gates, that sign decides which paths cancel, and the outcome flips from certain 0 to certain 1.
Remember it
Section titled “Remember it”You measure . What is the probability of getting 0?
. This is the Born rule.
A measurement gives the outcome 1. What state is the qubit in afterwards?
. The original amplitudes are gone.
What does the Hadamard gate do to and to ?
and .
Measuring and directly gives the same 50/50 statistics. How can you tell them apart?
Apply first, then measure. always gives 0 and always gives 1.
What is applied twice, and why?
The identity. The two paths to have opposite amplitudes and cancel: interference.