AnyLearn
All lessons
Scienceadvanced

Superposition and the qubit

The mathematical object behind a qubit — a complex unit vector in a two-dimensional Hilbert space — and why measurement collapses superposition. The structural difference between a quantum state and a classical bit, expressed in math.

Updated · AI-authored, review-gated · how lessons are made

Progress1 / 8

A classical bit, then a quantum bit

A classical bit is one of two values: 0 or 1. The bit's state is fully described by a single discrete choice. Every operation on classical bits — AND, OR, NOT, XOR — is a deterministic function from {0,1}n\{0, 1\}^n to {0,1}m\{0, 1\}^m.

A qubit generalizes this. Its state lives in a 2-dimensional complex vector space. The two basis vectors are written

∣0⟩=(10),∣1⟩=(01).|0\rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix}, \quad |1\rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix}.

A general qubit state is a complex linear combination

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

The coefficients α\alpha and β\beta are called amplitudes. The normalization condition ∣α∣2+∣β∣2=1|\alpha|^2 + |\beta|^2 = 1 says the state is a unit vector — a point on the unit sphere in C2\mathbb{C}^2. A qubit's state space is continuous, not discrete.

Sign in free to save your progress and earn certificates.

Full lesson text

All 8 steps on one page, for reading, reference, and search.

Show

1. A classical bit, then a quantum bit

A classical bit is one of two values: 0 or 1. The bit's state is fully described by a single discrete choice. Every operation on classical bits — AND, OR, NOT, XOR — is a deterministic function from {0,1}n\{0, 1\}^n to {0,1}m\{0, 1\}^m.

A qubit generalizes this. Its state lives in a 2-dimensional complex vector space. The two basis vectors are written

∣0⟩=(10),∣1⟩=(01).|0\rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix}, \quad |1\rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix}.

A general qubit state is a complex linear combination

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

The coefficients α\alpha and β\beta are called amplitudes. The normalization condition ∣α∣2+∣β∣2=1|\alpha|^2 + |\beta|^2 = 1 says the state is a unit vector — a point on the unit sphere in C2\mathbb{C}^2. A qubit's state space is continuous, not discrete.

2. Measurement collapses superposition

If a qubit is in state ∣ψ⟩=α∣0⟩+β∣1⟩|\psi\rangle = \alpha |0\rangle + \beta |1\rangle and you measure it in the standard basis, you do not observe α\alpha or β\beta. You observe one of two classical outcomes:

  • Outcome 0 with probability ∣α∣2|\alpha|^2.
  • Outcome 1 with probability ∣β∣2|\beta|^2.

The probabilities sum to 1 because of the normalization condition.

After the measurement, the qubit is no longer in superposition. Its new state is whichever basis vector was observed — ∣0⟩|0\rangle or ∣1⟩|1\rangle. This is the measurement postulate, and it is structurally important: a qubit holds a continuous-valued state, but each measurement extracts only one classical bit and destroys the rest of the information.

A single qubit measured once produces a sample from a distribution; it does not let you read off α\alpha or β\beta. Recovering the distribution requires preparing the same state many times and measuring each copy.

3. The Bloch sphere

A useful geometric picture of the qubit's state space comes from rewriting an arbitrary state as

∣ψ⟩=cos⁡(θ/2)∣0⟩+eiϕsin⁡(θ/2)∣1⟩,|\psi\rangle = \cos(\theta/2) |0\rangle + e^{i\phi} \sin(\theta/2) |1\rangle,

where θ∈[0,π]\theta \in [0, \pi] and ϕ∈[0,2π)\phi \in [0, 2\pi). (One global phase has been absorbed into the convention because it is not physically observable.) The pair (θ,ϕ)(\theta, \phi) are spherical coordinates of a point on a unit sphere — the Bloch sphere.

  • ∣0⟩|0\rangle is the north pole; ∣1⟩|1\rangle is the south pole.
  • 12(∣0⟩+∣1⟩)\frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) — equal superposition with phase 0 — sits on the equator.
  • 12(∣0⟩−∣1⟩)\frac{1}{\sqrt{2}}(|0\rangle - |1\rangle) sits on the opposite point of the equator.

The Bloch sphere is the natural picture for single-qubit dynamics: gates are rotations of the sphere. It also makes one fact visible — there are continuously many qubit states (every point on the sphere), but measurement returns only a binary outcome.

4. Why complex amplitudes, not real probabilities

A reasonable question: could a probabilistic classical bit (e.g., a coin with probability pp of heads) achieve the same effect? It cannot, and the reason is that quantum amplitudes are complex numbers, not non-negative real probabilities.

The difference shows up in interference. Suppose two paths each contribute amplitude α\alpha to a final state ∣0⟩|0\rangle. The probability of measuring ∣0⟩|0\rangle depends on the sum:

P(0)=∣α+α∣2=∣2α∣2=4∣α∣2.P(0) = |\alpha + \alpha|^2 = |2\alpha|^2 = 4|\alpha|^2.

Now suppose the two paths have amplitudes α\alpha and −α-\alpha. Then

P(0)=∣α+(−α)∣2=0.P(0) = |\alpha + (-\alpha)|^2 = 0.

The two paths cancel. A classical probabilistic system has no analog of cancellation — probabilities only add, they never subtract. Quantum algorithms are designed to use this constructive and destructive interference to make wrong answers cancel while right answers add. This is the central engine of every quantum-algorithmic speedup.

5. Many qubits: the tensor product

A system of nn qubits lives in a Hilbert space of dimension 2n2^n, formed by the tensor product of nn copies of the single-qubit space:

H=C2⊗C2⊗⋯⊗C2⏟n times,dim⁡H=2n.\mathcal{H} = \underbrace{\mathbb{C}^2 \otimes \mathbb{C}^2 \otimes \cdots \otimes \mathbb{C}^2}_{n \text{ times}}, \quad \dim \mathcal{H} = 2^n.

The basis vectors are written ∣x1x2…xn⟩|x_1 x_2 \ldots x_n\rangle for xi∈{0,1}x_i \in \{0, 1\}, and a general state is a complex superposition over all 2n2^n basis vectors:

∣ψ⟩=∑x∈{0,1}nαx∣x⟩,∑∣αx∣2=1.|\psi\rangle = \sum_{x \in \{0,1\}^n} \alpha_x |x\rangle, \quad \sum |\alpha_x|^2 = 1.

The exponential. A 50-qubit state is described by 250≈10152^{50} \approx 10^{15} complex amplitudes. A 300-qubit state has more amplitudes than there are atoms in the observable universe. Classically simulating a general nn-qubit state requires storing all those amplitudes — exponential resources.

A quantum computer represents and manipulates this state directly in physical hardware. The cost of doing so on the hardware is polynomial in nn (one physical qubit per logical qubit, before error correction). This exponential resource difference is what makes the possibility of quantum speedup interesting. Whether any specific problem yields a useful speedup is a separate algorithmic question, addressed in a later lesson.

6. Single-qubit operations: unitary matrices

Quantum operations between measurements are unitary linear maps — they preserve the norm of the state vector. A unitary UU is a complex matrix with U†U=IU^\dagger U = I, where U†U^\dagger is the conjugate transpose.

The Pauli matrices are the standard examples for one qubit:

X=(0110),Y=(0−ii0),Z=(100−1).X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \quad Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}, \quad Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}.

XX is the quantum analog of classical NOT: X∣0⟩=∣1⟩X|0\rangle = |1\rangle, X∣1⟩=∣0⟩X|1\rangle = |0\rangle. ZZ flips the relative phase of ∣1⟩|1\rangle without flipping the bit. The Hadamard gate

H=12(111−1)H = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}

maps ∣0⟩↦12(∣0⟩+∣1⟩)|0\rangle \mapsto \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) and ∣1⟩↦12(∣0⟩−∣1⟩)|1\rangle \mapsto \frac{1}{\sqrt{2}}(|0\rangle - |1\rangle) — it creates equal superposition. Single-qubit gates are continuous (parameterized by rotation angles); a quantum circuit is built by composing them along with multi-qubit gates.

7. The no-cloning theorem

A short proof: suppose a universal cloner existed — a unitary UU such that for every state ∣ψ⟩|\psi\rangle,

U(∣ψ⟩⊗∣0⟩)=∣ψ⟩⊗∣ψ⟩.U(|\psi\rangle \otimes |0\rangle) = |\psi\rangle \otimes |\psi\rangle.

Apply UU to two distinct non-orthogonal states ∣ψ⟩|\psi\rangle and ∣ϕ⟩|\phi\rangle. Take inner products:

⟨ψ∣ϕ⟩=⟨ψ∣ϕ⟩⋅⟨0∣0⟩=⟨ψ∣ϕ⟩\langle \psi | \phi \rangle = \langle \psi | \phi \rangle \cdot \langle 0 | 0 \rangle = \langle \psi | \phi \rangle

on the left, and

⟨ψ∣ϕ⟩⋅⟨ψ∣ϕ⟩=⟨ψ∣ϕ⟩2\langle \psi | \phi \rangle \cdot \langle \psi | \phi \rangle = \langle \psi | \phi \rangle^2

on the right. Equating gives ⟨ψ∣ϕ⟩=⟨ψ∣ϕ⟩2\langle \psi | \phi \rangle = \langle \psi | \phi \rangle^2, so ⟨ψ∣ϕ⟩\langle \psi | \phi \rangle is either 0 or 1. The states must be orthogonal or identical — contradicting non-orthogonality.

Consequence. An unknown quantum state cannot be copied. This rules out a class of attacks (eavesdropping that requires reading a state and forwarding a copy), supports quantum key distribution, and constrains how error correction can work: you cannot back up a qubit by duplicating it. The error-correction lesson returns to this constraint.

8. What you can and cannot do with a single qubit

From the math established so far, several facts follow about single-qubit systems before any algorithm is run.

  • You can prepare any state ∣ψ⟩|\psi\rangle from ∣0⟩|0\rangle using single-qubit gates.
  • You can apply any continuous rotation on the Bloch sphere via combinations of XX, YY, ZZ rotations.
  • You can measure in any basis (rotate before measuring in the standard basis).
  • You cannot observe α\alpha and β\beta directly; one measurement returns one classical bit.
  • You cannot copy an unknown state.
  • You cannot distinguish two non-orthogonal states with certainty in a single measurement.
  • You cannot perform an operation that is non-unitary between measurements; the state stays on the unit sphere of its Hilbert space.

This constrained operational profile is what every quantum algorithm has to work within. Useful computation has to come from the structure of multi-qubit superpositions and the interference between paths — both subjects of the next lesson, which moves from one qubit to many and introduces entanglement.

Check your understanding

The lesson ends with a 5-question quiz. Take it in the player above to see your score.

  1. A qubit is in state $|\psi\rangle = \alpha|0\rangle + \beta|1\rangle$ with $|\alpha|^2 = 0.3$. What is the probability of measuring outcome 1 in the standard basis?
    • 0.3
    • 0.5
    • 0.7
    • It cannot be determined from the given information.
  2. Why does classical probability theory not allow the kind of interference that quantum amplitudes do?
    • Classical probability theory uses complex numbers but they always cancel.
    • Classical probabilities are non-negative real numbers and can only add; quantum amplitudes are complex and can subtract through phases, allowing destructive interference.
    • Classical probabilities are restricted to integers between 0 and 1.
    • Classical probability theory does not allow probabilities below 0.5.
  3. How many complex amplitudes describe a general state of an $n$-qubit system?
    • $n$.
    • $2n$.
    • $n^2$.
    • $2^n$.
  4. The no-cloning theorem states that:
    • Any quantum state can be perfectly copied by an appropriate unitary.
    • Orthogonal states can be copied but non-orthogonal states cannot.
    • No unitary can copy an unknown quantum state; cloning works only for known orthogonal states.
    • Quantum states cannot be measured.
  5. Which operation between measurements is *not* allowed on a qubit?
    • Applying a unitary that rotates the state on the Bloch sphere.
    • Composing two unitaries to form another unitary.
    • Applying a non-unitary linear map that shrinks the state vector's norm.
    • Preparing the state by applying gates to $|0\rangle$.

Related lessons

Science
intermediate

Why Aircraft Fly: Lift, Circulation, and the Equal Transit Time Myth

Why the popular equal-transit explanation of lift is wrong, and what actually happens: flow turning, pressure from curved streamlines, Bernoulli used correctly, circulation and the Kutta condition, thin-airfoil theory and stall, a worked airliner example, and the tip vortices behind induced drag.

11 steps·~17 min
Science
intermediate

Boundary Layers and Turbulence: Where Viscosity Refuses to Vanish

Why inviscid theory predicts zero drag, and how Prandtl's boundary layer fixed it. Work through layer thickness on a real wing, separation and wakes, Reynolds' pipe experiment and the onset of turbulence, the drag crisis behind golf-ball dimples, Kolmogorov's cascade, the closure problem, and why turbulence limits simulation.

11 steps·~17 min
Science
advanced

The Navier-Stokes Equations: Newton's Second Law for a Fluid

Build the equations of fluid motion from conservation of mass and momentum: the continuum idea, the material derivative, viscosity, the Navier-Stokes equations term by term, an exact pipe-flow solution, the Reynolds number, vorticity, and the Millennium Prize question that is still open.

12 steps·~18 min
History
intermediate

The Productivity Paradox: What Changed, and How Slowly

Revised estimates put British growth during the classic Industrial Revolution far lower than the name implies, and real wages barely moved for half a century while output per worker rose sharply. This lesson works through the numbers, explains why a transformative technology can take decades to show up in the statistics, and separates what is measured from what is inferred.

10 steps·~15 min