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 ∣0⟩|{0}\rangle and ∣1⟩|{1}\rangle, 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:

∣ψ⟩=α ∣0⟩+β ∣1⟩|\psi\rangle = \alpha\,|0\rangle + \beta\,|1\rangle

The numbers α\alpha (alpha) and β\beta (beta) are the amplitudes, and ∣ψ⟩|\psi\rangle (psi) is the usual name for "the state".

A Bloch sphere with three arrows: green pointing up to |0⟩, violet down to |1⟩, and amber out to |+⟩ on the equator.q1q2q3|0⟩|1⟩|+⟩|−⟩|+i⟩|−i⟩
Three qubits: one in ∣0⟩|{0}\rangle, one in ∣1⟩|{1}\rangle, and one in an equal superposition of the two, ∣+⟩|{+}\rangle.

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 α\alpha squared, and the chance of 1 is the size of β\beta squared:

P(0)=∣α∣2,P(1)=∣β∣2,∣α∣2+∣β∣2=1P(0) = |\alpha|^2, \qquad P(1) = |\beta|^2, \qquad |\alpha|^2 + |\beta|^2 = 1

The last part says the two chances add up to 100%. For example, the state with α=β=12\alpha = \beta = \tfrac{1}{\sqrt{2}} gives 0 or 1 with equal odds, since (12)2=12(\tfrac{1}{\sqrt{2}})^2 = \tfrac{1}{2}. That state has a name, ∣+⟩|{+}\rangle:

∣+⟩=12 ∣0⟩+12 ∣1⟩|{+}\rangle = \tfrac{1}{\sqrt{2}}\,|0\rangle + \tfrac{1}{\sqrt{2}}\,|1\rangle

After the measurement, the superposition is gone: the qubit is now in ∣0⟩|{0}\rangle or ∣1⟩|{1}\rangle, 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 ∣+⟩|{+}\rangle and its partner ∣−⟩|{-}\rangle:

∣+⟩=12 ∣0⟩+12 ∣1⟩,∣−⟩=12 ∣0⟩−12 ∣1⟩|{+}\rangle = \tfrac{1}{\sqrt{2}}\,|0\rangle + \tfrac{1}{\sqrt{2}}\,|1\rangle, \qquad |{-}\rangle = \tfrac{1}{\sqrt{2}}\,|0\rangle - \tfrac{1}{\sqrt{2}}\,|1\rangle

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 ∣1⟩|{1}\rangle. A Hadamard gate turns ∣+⟩|{+}\rangle into ∣0⟩|{0}\rangle and ∣−⟩|{-}\rangle into ∣1⟩|{1}\rangle, 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 −1-1 or ii changes nothing that any measurement can detect. So −∣1⟩-|1\rangle is the same physical state as ∣1⟩|{1}\rangle.

The app's State panel draws amplitudes in circle notation: one circle for ∣0⟩|{0}\rangle and one for ∣1⟩|{1}\rangle. 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 ∣0⟩|{0}\rangle and ∣1⟩|{1}\rangle, 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. ∣0⟩|{0}\rangle sits at the top, ∣1⟩|{1}\rangle at the bottom, and the equal superpositions such as ∣+⟩|{+}\rangle and ∣−⟩|{-}\rangle 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:

∣ψ⟩=α ∣0⟩+β ∣1⟩=[αβ],∣α∣2+∣β∣2=1|\psi\rangle = \alpha\,|0\rangle + \beta\,|1\rangle = \begin{bmatrix} \alpha \\ \beta \end{bmatrix}, \qquad |\alpha|^2 + |\beta|^2 = 1

Here ∣0⟩=[10]|0\rangle = \left[\begin{smallmatrix} 1 \\ 0 \end{smallmatrix}\right] and ∣1⟩=[01]|1\rangle = \left[\begin{smallmatrix} 0 \\ 1 \end{smallmatrix}\right]. Two vectors that differ only by a factor eiγe^{i\gamma} 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.