What is a qubit?
A qubit is the quantum version of a bit. A bit is always 0 or 1. A qubit can also be in a superposition: a combination of 0 and 1 with a direction to it. That direction is why a qubit's state can be drawn as an arrow on a sphere.
The two basic states of a qubit are written and , read "ket zero" and "ket one". The bracket notation is called a ket; it just marks something as a quantum state. Any other state of the qubit is a mix of these two, with a number in front of each:
The numbers (alpha) and (beta) are the amplitudes, and (psi) is the usual name for "the state".
What the amplitudes tell you
When you measure a qubit you always get a plain 0 or 1, never something in between. The amplitudes set the odds. The chance of 0 is the size of squared, and the chance of 1 is the size of squared:
The last part says the two chances add up to 100%. For example, the state with gives 0 or 1 with equal odds, since . That state has a name, :
After the measurement, the superposition is gone: the qubit is now in or , whichever you got. More in Measuring a qubit.
Phase: the part probabilities miss
Amplitudes are complex numbers, so each one has a size and an angle. The sizes give the probabilities. The angle between the two amplitudes is the relative phase, and it is just as much a part of the state. Take and its partner :
Measured right away, both give 0 or 1 with equal odds, so you can't tell them apart that way. Yet they are different states: the minus sign is a phase of 180° on . A Hadamard gate turns into and into , after which a measurement tells them apart every time.
The angle of the state as a whole, the global phase, is different: multiplying the whole state by a factor such as or changes nothing that any measurement can detect. So is the same physical state as .
The app's State panel draws amplitudes in circle notation: one circle for and one for . The filled area is the probability, and the line shows the phase, pointing up for a phase of 0 and turning counterclockwise as the phase grows.
From two numbers to one arrow
Two complex amplitudes sound like four numbers, but two of them are spoken for: the probabilities must add up to 1, and the global phase doesn't matter. What's left is two angles: how far the state is between and , and its relative phase. Two angles pick a point on a sphere, the way latitude and longitude pick a place on Earth.
That sphere is the Bloch sphere. sits at the top, at the bottom, and the equal superpositions such as and go around the equator. Every state of one qubit is a point on its surface, drawn as an arrow from the center.
The math, in one place
A qubit's state is a vector of two complex numbers with total probability 1:
Here and . Two vectors that differ only by a factor are the same state. Gates are 2×2 matrices that multiply this vector; see Gates are rotations.
Try it
Each link opens the sphere set up for you; the gates play after a moment.
In the app, the State panel shows the selected qubit's ket, its amplitudes in circle notation, and its probabilities, all moving as the arrow turns.