Search

Search papers and lessons

Qubit

Level 2 · 12 min read

A qubit is a two-level quantum system whose state is a pair of complex amplitudes; measuring it gives 0 or 1 with probabilities set by those amplitudes.

On this page

  • Colour = topic mix
  • Linear algebra
  • Quantum physics
  • Discrete math
  • Sign in to see your progress

TL;DR

A qubit is the quantum version of a bit: a system with exactly two basis states, usually written ∣0⟩|0\rangle and ∣1⟩|1\rangle. Unlike a classical bit, its state can be a weighted mix of both at once, described by two complex numbers called amplitudes. When you measure it you always get 0 or 1, and the amplitudes decide how likely each result is.

The mix is what makes qubits useful for computing: quantum algorithms work by steering amplitudes so that wrong answers cancel and right answers add up.

Where you'll see it: in quantum computers, where each qubit is a physical two-level system such as a trapped ion, a superconducting circuit or the spin of an electron, and in quantum cryptography, where the qubit is the unit of transmitted information.

Intuition

A bit that can be a little of both

A classical bit is a switch: off or on, 0 or 1. Its state is always one of two definite values. A qubit is also a two-level system, but its state is a direction in a space of arrows rather than one of two points. You can prepare it in ∣0⟩|0\rangle, in ∣1⟩|1\rangle, or in any blend of the two. The blend is not a hidden mixture of "either 0 or 1, we just don't know which". It is a genuine state that interferes with itself, which is the feature the rest of quantum computing depends on.

The blend is set by two complex numbers, which is why complex numbers are a prerequisite. Their sizes say how likely each outcome is, and their phases say how the two parts line up when they meet again, which is where interference comes from.

A picture: the sphere

Any qubit state can be drawn as a point on the surface of a ball, the Bloch sphere. The north pole is ∣0⟩|0\rangle, the south pole is ∣1⟩|1\rangle, and every other point is a blend. Points near the poles are almost certainly 0 or almost certainly 1. Points on the equator are a fifty-fifty mix. The plot below shows the simplest slice of this picture: the probability of getting 0 as the state moves from the north pole to the south.

00.511.522.5300.20.40.60.81θ (angle from the north pole, radians)probability
  • P(measure 0)
  • P(measure 1)
For the state cos(θ/2)|0⟩ + sin(θ/2)|1⟩, the two probabilities add to 1 at every angle. At θ = π/2 both are one half.

Why the idea exists

A bit with a continuous family of states is not new in itself: a spinning arrow has that too. What is new is that quantum physics lets such a two-level system be prepared, controlled and read out, and that the state is more than a probability table. Two qubits together do not hold two bits of information; they live in a space with four basis states, and the number of amplitudes doubles with each added qubit. That exponential growth is the reason a machine built from qubits can, for some problems, beat a classical computer, and the reason it is hard to simulate one.

The math

States

Definition: Qubit state

A qubit state is a unit vector in a two-dimensional Hilbert space with basis ∣0⟩|0\rangle and ∣1⟩|1\rangle:

∣ψ⟩=α ∣0⟩+β ∣1⟩,α,β∈C,∣α∣2+∣β∣2=1.|\psi\rangle = \alpha\,|0\rangle + \beta\,|1\rangle, \qquad \alpha, \beta \in \mathbb{C}, \qquad |\alpha|^2 + |\beta|^2 = 1.

Here α\alpha and β\beta are the amplitudes. The symbol ∣⋅∣|\cdot| is the modulus of a complex number, so ∣α∣2|\alpha|^2 is the squared size of α\alpha. The constraint ∣α∣2+∣β∣2=1|\alpha|^2 + |\beta|^2 = 1 says the state has length 1 in the Hilbert space, which is the normalisation that makes the probabilities below add up. The global phase of the whole state (multiplying α\alpha and β\beta by the same complex number of size 1) changes nothing physical, so only the relative phase between α\alpha and β\beta matters.

Measurement: the Born rule

Measuring a qubit in the {∣0⟩,∣1⟩}\{|0\rangle, |1\rangle\} basis gives outcome 0 with probability ∣α∣2|\alpha|^2 and outcome 1 with probability ∣β∣2|\beta|^2. After the measurement the state is collapsed to the outcome you saw: ∣0⟩|0\rangle or ∣1⟩|1\rangle. This is the Born rule in its simplest form. A second measurement right after gives the same answer, but the amplitudes are gone; you cannot read them out from a single measurement.

The Bloch sphere

Every qubit state can be written, up to a global phase, as

∣ψ⟩=cos⁡ ⁣(θ2)∣0⟩+eiφsin⁡ ⁣(θ2)∣1⟩,0≤θ≤π,0≤φ<2π.|\psi\rangle = \cos\!\left(\tfrac{\theta}{2}\right)|0\rangle + e^{i\varphi}\sin\!\left(\tfrac{\theta}{2}\right)|1\rangle, \qquad 0 \le \theta \le \pi, \quad 0 \le \varphi \lt 2\pi.

The pair (θ,φ)(\theta, \varphi) are the polar and azimuthal angles of a point on the unit sphere. The probability of outcome 0 is cos⁡2(θ/2)\cos^2(\theta/2), which is the curve in the plot above. The factor 12\tfrac{1}{2} in the angle is not a typo: ∣0⟩|0\rangle and ∣1⟩|1\rangle are orthogonal states, yet they sit at opposite poles, an angle θ=π\theta = \pi apart on the sphere, while the amplitudes only rotate by π/2\pi/2. Angles on the sphere are twice the angles between the state vectors.

Two standard states

The states ∣+⟩=12(∣0⟩+∣1⟩)|+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) and ∣−⟩=12(∣0⟩−∣1⟩)|-\rangle = \frac{1}{\sqrt{2}}(|0\rangle - |1\rangle) sit on the equator, on opposite sides. They are the equal superpositions that the superposition principle makes available.

Worked examples

Example
A tilted qubit

Take ∣ψ⟩=32∣0⟩+12∣1⟩|\psi\rangle = \frac{\sqrt{3}}{2}|0\rangle + \frac{1}{2}|1\rangle.

  1. Check normalisation: ∣α∣2=(32)2=34|\alpha|^2 = \left(\frac{\sqrt{3}}{2}\right)^2 = \frac{3}{4} and ∣β∣2=(12)2=14|\beta|^2 = \left(\frac{1}{2}\right)^2 = \frac{1}{4}.
  2. Add them: 34+14=1\frac{3}{4} + \frac{1}{4} = 1. The state is valid.
  3. Probability of measuring 0 is 34=0.75\frac{3}{4} = 0.75; of measuring 1 is 14=0.25\frac{1}{4} = 0.25.
  4. Interpretation: the state leans towards ∣0⟩|0\rangle. Over many identical preparations, about three in four runs give 0.
Example
A Hadamard gate turns 0 into an equal mix

The Hadamard gate is the matrix H=12(111−1)H = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}. Apply it to ∣0⟩|0\rangle, which is the vector (1,0)(1, 0).

  1. Multiply the top row by the input: 12(1⋅1+1⋅0)=12\frac{1}{\sqrt{2}}(1 \cdot 1 + 1 \cdot 0) = \frac{1}{\sqrt{2}}.
  2. Multiply the bottom row by the input: 12(1⋅1+(−1)⋅0)=12\frac{1}{\sqrt{2}}(1 \cdot 1 + (-1) \cdot 0) = \frac{1}{\sqrt{2}}.
  3. The result is 12∣0⟩+12∣1⟩=∣+⟩\frac{1}{\sqrt{2}}|0\rangle + \frac{1}{\sqrt{2}}|1\rangle = |+\rangle.
  4. Measure it: each outcome has probability (12)2=12\left(\frac{1}{\sqrt{2}}\right)^2 = \frac{1}{2}.
  5. Apply HH again. The bottom row now contributes 12⋅12(1−1)=0\frac{1}{\sqrt{2}}\cdot\frac{1}{\sqrt{2}}(1 - 1) = 0 to the ∣1⟩|1\rangle amplitude, so the result is ∣0⟩|0\rangle with certainty.

Interpretation: the second Hadamard made the two paths to ∣1⟩|1\rangle cancel. That cancellation is interference, and it is the mechanism every qubit algorithm uses.

Tradeoffs and failure modes

SituationProblemBetter choice
Storing a classical bitA qubit adds cost and fragility for no gainA classical bit
Keeping a qubit for a long timeIt loses its phase to the environment (decoherence)Error correction, or shorter circuits
Copying a qubit to check itThe no-cloning theorem forbids a general copy operationMeasure only what you must, or encode the state redundantly
Reading out the full stateOne measurement gives one bit, and collapses the stateRepeat the preparation many times and estimate the probabilities

The biggest practical failure is decoherence: the environment picks up information about the qubit, and the phase relationship between α\alpha and β\beta fades. Interference depends on that phase, so the algorithm stops working even though the probabilities look fine.

History

The mathematics of two-level quantum systems is older than the word. Felix Bloch's 1946 description of nuclear spins in a magnetic field gave the sphere picture that carries his name. In the early 1980s Richard Feynman argued that quantum systems are hard to simulate on classical computers and suggested that quantum machines could simulate them better. David Deutsch described a universal quantum computer in 1985. The term "qubit" was coined by Benjamin Schumacher in the mid-1990s, when quantum information theory was becoming a field of its own. It caught on because the two-level unit became the standard resource in quantum algorithms, quantum error correction and quantum communication.

Check yourself

QuestionWhat is the difference between a classical bit and a qubit in one sentence?Show answer

A bit is always definitely 0 or definitely 1, while a qubit can be in a state that is a weighted blend of ∣0⟩|0\rangle and ∣1⟩|1\rangle, described by two complex amplitudes whose squared sizes give the measurement probabilities.

QuestionA qubit has α=12\alpha = \frac{1}{2} and β=32\beta = \frac{\sqrt{3}}{2} (real and positive). What is the probability of measuring 1?Show answer

∣β∣2=(32)2=34=0.75|\beta|^2 = \left(\frac{\sqrt{3}}{2}\right)^2 = \frac{3}{4} = 0.75. Check: ∣α∣2+∣β∣2=14+34=1|\alpha|^2 + |\beta|^2 = \frac{1}{4} + \frac{3}{4} = 1, so the state is valid.

QuestionWhy does applying the Hadamard gate twice return ∣0⟩|0\rangle, even though one application gives a 50-50 measurement?Show answer

The first Hadamard puts equal amplitudes on ∣0⟩|0\rangle and ∣1⟩|1\rangle. The second adds the two paths that lead to ∣1⟩|1\rangle with opposite signs, so they cancel, while the paths to ∣0⟩|0\rangle add. The cancellation is interference, which a single measurement cannot reveal.

QuestionWhy can't you read out the amplitudes of an unknown qubit with one measurement?Show answer

A measurement returns 0 or 1 and collapses the state to that outcome, so the amplitudes are destroyed. Estimating them needs many preparations and measurements of the same state.

QuestionA quantum computer gets a qubit prepared in ∣+⟩|+\rangle and lets the phase rotate by π\pi, giving 12(∣0⟩−∣1⟩)\frac{1}{\sqrt{2}}(|0\rangle - |1\rangle). Which Bloch sphere point is this, and what does it measure?Show answer

It is ∣−⟩|-\rangle, on the equator at the opposite side from ∣+⟩|+\rangle. Measuring in the {∣0⟩,∣1⟩}\{|0\rangle, |1\rangle\} basis gives 0 or 1 with probability one half each, the same as ∣+⟩|+\rangle. The difference only shows up if you measure in a different basis, such as {∣+⟩,∣−⟩}\{|+\rangle, |-\rangle\}.

Sources