Table of Contents

Qubit

Qubit is the quantum computing equivalent of a bit.

A classical bit can be 0 or 1. There are no probabilities involved at all, but we can assign them anyway. If a bit is 1, then it's 1 with 100% probability and 0 with 0% probability. Conversely, if a bit is 0, then it's 1 with 0% probability and 0 with 100% probability.

A qubit works in a similar way. It also has two states: $\lvert 0\rangle$ and $\lvert 1\rangle$, except the total probability is distributed between those two. A qubit is often in both states at the same time: a small amount in state $\lvert 0\rangle$ and a small amount in state $\lvert 1\rangle$. A qubit $\lvert\psi\rangle$ is written in the following form, using what is known as Dirac notation:

$$\lvert\psi\rangle = a\lvert 0\rangle + b\lvert 1\rangle$$

These probabilities $a$ and $b$ are not percentages. Rather, they are complex numbers called “probability amplitudes”. For example, a qubit might be in a state $\lvert 0\rangle$ with probability amplitude $a = \frac{\sqrt 2}{2} + i\frac{\sqrt 2}{2}$, and in state $\lvert 1\rangle$ with probability amplitude $b = \frac{\sqrt 2}{2} - i\frac{\sqrt 2}{2}$, all at the same time. The probability amplitudes evolve over time according to the Schrodinger equation. For eample, $a$ and $b$ can rotate or exchange magnitudes over time.

A qubit state continues to evolve as this weird object of two complex probabilities amplitudes – until it is measured. When a qubit is measured, it collapses to either $\lvert 0\rangle$ or $\lvert 1\rangle$ with 100% probability. At that point, there are no longer any probabilities or complex numbers inolved. The qubit behaves exactly like a classical bit and we might as well refer to $\lvert 0\rangle$ as 0, and $\lvert 1\rangle$ as 1.

But how do we know whether a qubit is going to collapse to 0 or 1 if $a$ and $b$ are complex numbers rather than percentages? The answer is given by the Born rule. The Born rule states that the real probability of measurement yielding a certain result is proportional to the square of the probability amplitude associated with that result.

$$P_0 = |a|^2 \qquad P_1 = |b|^2$$

We do, however, require the qubit always exists as at least something with 100% probability when we measure it i.e. a qubit can't half exist or exist with 150% probability. Therefore the square magnitudes must add up to 100% which in probability theory is written as $1$. This is also called the second axiom of probability:

$$|a|^2 + |b|^2 = 1$$