Chapter 2

Measurement

In the last chapter we set the arrow ourselves, so we knew where it pointed. Now the honest case: the qubit is handed to you ready-made. How do you find out where its arrow points?

Directly, you can't. A qubit has no little window through which to see the arrow. There is a single action: ask the question "zero or one?" and get one bit. That action is called measurement, and it is cruder than you'd like.

0measurements0zeros0ones

A question that breaks things

Try it yourself. Here is a qubit with its arrow at 60°. Measure it, then measure it again without preparing it anew.

The arrow is prepared. No answers yet.

Dashed: where the arrow stood before the first question. Solid: where it is now.

The first answer is random. The second, third, tenth are not: they repeat the first. Measurement doesn't peek at the arrow, it moves it. After the answer "zero" the qubit really is in zero, whatever was there before.

Amplitude

Now let us write the state so that the chances can be read from the notation. Start with the arrow on the equator, at the point |+⟩: zero and one come up equally often.

|+⟩ = 1/√2 |0⟩ + 1/√2 |1⟩

It reads: “one over root two ket zero, plus one over root two ket one”. |0⟩ and |1⟩ are the two possible answers. The number in front of each is called its amplitude. The plus says that both answers take part in the state; such a sum is called a superposition. The word means only “a sum with numbers”, nothing more.

Why the square root? Because of the rule that ties the notation to experiment: the chance of an answer is the square of its amplitude.

(1/√2)² = 1/2

Why the square and not the number itself? We do not derive this. That is how the world works, and every experiment confirms it.

From numbers to letters

Take another state and read its chances straight from the notation.

0.6 |0⟩ + 0.8 |1⟩0.6² = 0.36 0.8² = 0.64

Zero comes up in 36% of measurements, one in 64%. Together exactly a hundred.

The numbers could be different, so the general form uses letters: α, “alpha”, is the amplitude of zero, and β, “beta”, is the amplitude of one.

α |0⟩ + β |1⟩

The letters are not completely free. There is no third answer: one of the two always comes up. So the chance of zero and the chance of one add up to one, that is, to a hundred percent.

α² + β² = 1

After a measurement the notation gets simpler. If zero came up, the amplitudes became 1 and 0, and the state is now just |0⟩. If one came up, it is |1⟩.

Where α and β come from

It remains to connect the amplitudes with the tilt of the arrow. The rule: the amplitude of zero is the cosine of half the tilt, the amplitude of one is the sine of half the tilt. Move the tilt and watch the numbers.

α = cos(θ/2) β = sin(θ/2)
α = cos(30°) = 0.87α² = 0.75β = sin(30°) = 0.5β² = 0.25
you get 075%
you get 125%
The amplitudes are computed from the tilt; the chances are their squares.

Why half? On the sphere the way from |0⟩ to |1⟩ is half a turn, 180°. Over the same journey the amplitudes go from “all in zero” to “all in one”, which is a quarter turn, 90°. One path is half as long as the other, hence half the angle. This shows that the ends and the middle agree; the formula itself we take as a rule.

How many times to ask

Since one answer isn't enough, what's left is statistics: prepare many identical qubits and count the share of zeros. Add measurements and watch the share close in on the true chance.

0measurements—share of zeros75%true chance
Horizontally: the number of measurements, each tick ten times larger. Dashed: the chance set by the arrow's tilt.

At first the line thrashes about: three answers in a row can turn out to be zeros by chance. Then it settles, but slowly. To make the estimate ten times sharper you need a hundred times more measurements.

Show me the math

If the chance of zero is p, then after N measurements the share of zeros differs from p by √(p(1−p)/N) on average. For p = 0.5 and N = 100 that is 5%, for N = 10,000 it is 0.5%.

What measurement cannot see

And even endless statistics gives you only one number of the two: the tilt. All arrows at the same height answer the same, whichever way they are turned. To get at the turn, you will have to rotate the arrow before measuring. With what is in the next chapter.

What to remember

  • Measurement is the only way to learn anything about a qubit, and it answers with one bit.
  • The answer is random, and afterwards the arrow stands at a pole: the former state is erased.
  • Chances are found by statistics over many identical qubits. Precision grows slowly: as the square root of the number of measurements.
  • A state is written α|0⟩ + β|1⟩. The numbers α and β are amplitudes; their squares are the chances.

Test yourself

The problems are optional: solve them now or come back to them later.

1

Two boxes

not solved

In one box the arrow is just above the equator, at 80°; in the other just below, at 100°. Which is which is unknown. Measure both and decide which box has the higher arrow.

Box Anot measured yet
Box Bnot measured yet

The difference between the boxes is small. A dozen measurements won't show it.

2

The second question

not solved

The arrow lay on the equator. It was measured and the result was one. It was measured again right away. What comes up?

3

The price of precision

not solved

A hundred measurements give the share of zeros with an error of about 5%. How many measurements does it take to bring the error down to 0.5%?

We have learned to measure, but so far we have set the arrow by hand. In a real computer it is rotated by commands, and those commands have a name: gates.