Measuring a qubit

Measuring a qubit gives 0 or 1, at random, with odds set by its state. On the Bloch sphere the odds are easy to read: they're the arrow's height.

An arrow at the top, ∣0⟩|{0}\rangle, gives 0 every time. At the bottom, ∣1⟩|{1}\rangle, it gives 1 every time. Anywhere on the equator it's a coin toss. In between, the higher the tip, the likelier 0.

A Bloch sphere with an arrow tilted 60 degrees from the top, and a level line from its tip across to the z axis at height one half.|0⟩|1⟩|+⟩|−⟩|+i⟩|−i⟩
Tilted 60° from ∣0⟩|{0}\rangle, the arrow's tip is at height z = 0.5, so P(0) = (1 + 0.5) / 2 = 75%.

Odds from the height

With the tip's height written z (from −1 at the bottom to 1 at the top), the chances are:

P(0)=1+z2,P(1)=1−z2P(0) = \frac{1 + z}{2}, \qquad P(1) = \frac{1 - z}{2}

The same numbers come from the amplitudes, P(0)=∣α∣2P(0) = |\alpha|^2 and P(1)=∣β∣2P(1) = |\beta|^2, or from the angle θ down from the top: P(0)=cos⁡2θ2P(0) = \cos^2\tfrac{\theta}{2}. All three agree, since cos⁡2θ2=1+cos⁡θ2\cos^2\tfrac{\theta}{2} = \tfrac{1 + \cos\theta}{2} and z=cos⁡θz = \cos\theta.

The phase, where the arrow points around the sphere, doesn't change these odds at all. Turning the arrow about the vertical axis keeps its height.

After the measurement

A measurement changes the qubit. If you got 0, the qubit is now ∣0⟩|{0}\rangle, and measuring it again gives 0 again; if you got 1, it's now ∣1⟩|{1}\rangle. The arrow jumps to the top or the bottom, and the superposition is gone. This is often called the state's collapse.

It's also why you can't read a qubit's state from one copy of it. One measurement gives one bit. To estimate the odds, and so the arrow's height, you prepare the same state many times and count how often 0 comes up.

Measuring along other axes

The usual measurement asks "∣0⟩|{0}\rangle or ∣1⟩|{1}\rangle?", the z axis. You can also ask "∣+⟩|{+}\rangle or ∣−⟩|{-}\rangle?" (the x axis) or "∣+i⟩|{+i}\rangle or ∣−i⟩|{-i}\rangle?" (y). The rule is the same with that axis's coordinate in place of z: for example P(+)=1+x2P({+}) = \tfrac{1 + x}{2}.

Hardware usually only measures along z, so other axes are measured by turning the sphere first. A Hadamard gate swaps the x and z axes: apply H, then measure, and "0" means the qubit was ∣+⟩|{+}\rangle and "1" means it was ∣−⟩|{-}\rangle.

Telling two states apart

Say someone hands you a qubit in one of two states you know, ∣0⟩|{0}\rangle or ∣+⟩|{+}\rangle, each equally likely, and you must say which. If the two were opposite on the sphere, one measurement along their axis would always get it right. These two aren't: they're 90° apart.

Then no measurement is right every time. The best you can do is measure along the axis parallel to the line from one arrow's tip to the other's, and name the state at the end of the axis you get. With the arrows an angle Θ\Theta apart, their coordinates along that axis are sin⁡Θ2\sin\tfrac{\Theta}{2} and −sin⁡Θ2-\sin\tfrac{\Theta}{2}, so the rule above gives the same chance of naming either one right:

P(right)=1+sin⁡Θ22P(\text{right}) = \frac{1 + \sin\frac{\Theta}{2}}{2}

For ∣0⟩|{0}\rangle and ∣+⟩|{+}\rangle, 90° apart, that's about 85%. Opposite states, 180° apart, give 100%, and two copies of the same state give 50%, a coin toss. No cleverer measurement does better; this limit is a theorem, due to Carl Helstrom. It's also where quantum cryptography starts: send bits as states that aren't opposite, and someone who intercepts them can't read them reliably.

Try it

The last link turns both states 45° about y, which brings the best axis for telling them apart onto z. q1 (∣0⟩|{0}\rangle) then shows P(0) = 85.4% and q2 (∣+⟩|{+}\rangle) shows P(1) = 85.4%: the chance of naming each one right.

Next: gates are rotations.