Level 2, Tinkerer

Complex number

The lower amplitude is 0.80 times i, so it carries an angle. The squares use only the sizes, 0.36 and 0.64, and the angle is absent from the chances.

A complex number has a real part and an imaginary part, so it carries a size and an angle. An amplitude may be complex, and the chance of a reading is the square of the size, which leaves the angle out of the click.

The imaginary unit i is the number whose square is minus one. The S gate multiplies the amplitude for 1 by i, and the Y gate brings in i and minus i as it swaps. A bare measurement in the 0-and-1 arrangement does not print those angles.

An example

Draw a flat map. Put the real part on the line across and the imaginary part on the line up. The number 0.64 + 0.48i sits 0.64 across and 0.48 up.

Its squared size is the real part squared plus the imaginary part squared. That is 0.4096 + 0.2304 = 0.64, so its size is 0.8, the long side of a right-angled triangle, as Pythagoras would have it.

Now put it in a qubit, with 0.6 for 0 and 0.64 + 0.48i for 1. The chances are 0.36 and 0.64, and they add to 1.

Now multiply by i. You get 0.64i + 0.48 × i × i, and since i × i = −1, that is −0.48 + 0.64i. The point has moved from 0.64 across and 0.48 up to 0.48 back and 0.64 up, a quarter turn anticlockwise. The size is still 0.8, since 0.2304 + 0.4096 = 0.64, so the chance has not moved.

Turn twice and you get a half turn, which is a minus sign. Turn four times and you are back at the start. That is why two presses of S make one Z.

What it is not

Imaginary does not mean pretend. Descartes used the word in 1637 for roots he could not draw, and it stuck. On this shelf the i is a quarter turn, and a chip makes that turn as easily as any other.

The chance is not the square of the number itself. Square 0.64 + 0.48i as you would any number and you get 0.1792 + 0.6144i, which is no kind of chance. The chance comes from the size.

And complex amplitudes are not a separate, stranger kind. Plus and minus are two points on the same map, at 0 and 180 degrees, and the rest fill in the circle.

The number a qubit carries for one outcome is an amplitude, and its angle is its phase. The S gate multiplies by i, and the Y gate uses i and −i at once. The note The sign is what cancels meets them at the end, and the qubit page shows the quarter turn.

Used in

Longer explanation: How to learn quantum computing

All the words