Course Home

Understanding the Qubit

An interactive guide to the fundamental unit of quantum information

Why Quantum Computing?

Classical computers encode everything as sequences of 0s and 1s. They've taken us incredibly far — but some problems remain stubbornly out of reach: simulating molecules for drug discovery, breaking modern encryption, or optimizing complex logistics.

Quantum computers approach computation differently. Instead of bits locked to 0 or 1, they use qubits that exploit the strange rules of quantum mechanics — superposition, interference, and entanglement — to explore many possibilities in parallel.

This module introduces the qubit: the fundamental building block that makes it all possible.

Classical Bit vs. Qubit

In classical computing, information is stored in bits. A bit is always in one of two definite states: 0 or 1.

A qubit (quantum bit) is the quantum-mechanical analogue of a classical bit. The key difference? A qubit can exist in a superposition of both states simultaneously.

0
Classical Bit
Always 0 or 1
?
Qubit
Both until measured
Key Insight: A qubit can exist in a superposition of |0⟩ and |1⟩ simultaneously. Only when we measure it does it "choose" one outcome.
What does the |⟩ notation mean?

This is Dirac notation (also called "bra-ket" notation), the standard way physicists write quantum states:

  • |0⟩ and |1⟩ are ket vectors — they represent quantum states
  • The | and are just brackets, like parentheses
  • |0⟩ means "the quantum state labeled 0" — think of it as "definitely 0"
  • |ψ⟩ (psi) is the conventional name for an arbitrary quantum state

Don't worry if it looks strange at first — it's simply a compact way to write quantum states. You'll get used to it quickly!

Think of It Like a Coin

A classical bit is like a coin lying on a table — it's heads (0) or tails (1). A qubit is like a coin spinning in the air: it's in a combination of both until it lands.

0
Classical: click to flip (always definite)
vs.
?
Quantum: click to "measure" (collapses!)

Bit vs. Qubit Comparison

PropertyClassical BitQubit
Possible values0 or 1Superposition of |0⟩ and |1⟩
State space{0, 1} — two pointsSurface of Bloch sphere (continuous)
Reading the valueNon-destructiveCollapses the superposition
CopyingFreely copyableNo-cloning theorem forbids it
OperationsLogic gates (AND, OR, NOT)Unitary transformations (rotations)
CorrelationsClassical correlationsEntanglement (non-classical)

How Are Qubits Made?

Qubits can be physically realized in many ways:

Superconducting

Tiny circuits cooled near absolute zero. Used by IBM and Google.

Trapped Ions

Individual atoms held by electromagnetic fields. Used by IonQ and Quantinuum.

Photonic

Photon polarization encodes |0⟩ and |1⟩. Used by Xanadu and PsiQuantum.

Spin Qubits

Electron spin in quantum dots. Compatible with semiconductor fabrication.

Beyond Single Qubits

Once you understand single qubits, the next frontier is multi-qubit systems:

Entanglement: Two qubits can be correlated in ways impossible classically. Measuring one instantly determines the other, regardless of distance. This is the key resource for quantum algorithms and quantum teleportation.

With $n$ qubits, the state space has $2^n$ dimensions — exponential growth that gives quantum computers their power for certain problems.

But first, let's master single-qubit measurements — the topic of the next module.

Next: Measurements → Skip ahead: Multi-Qubit Systems

Superposition: The Heart of Quantum

A classical bit is like a light switch — it's either on or off. A qubit is more like a dial that can point anywhere between "off" and "on". The magic is that until you look at it (measure), the qubit genuinely holds both possibilities at once, weighted by numbers called amplitudes.

Mathematically, we write this as:

$$|\psi\rangle = \alpha|0\rangle + \beta|1\rangle$$

The numbers α and β are complex-valued amplitudes. Their squared magnitudes give probabilities, and they must add up to 1:

$$|\alpha|^2 + |\beta|^2 = 1$$
What do the amplitudes mean?
• |α|² = probability of measuring |0⟩
• |β|² = probability of measuring |1⟩
• The phase (angle) of α and β affects quantum interference — it's invisible to a single measurement, but crucial when combining quantum operations

Explore Superposition Interactively

Drag the slider to change the probability of measuring |0⟩ vs |1⟩:

|0⟩ 50% 50% |1⟩
0.707 |0⟩ + 0.707 |1⟩
0 π/2 π 3π/2
Phase = 0°: the |1⟩ amplitude is positive real. This is the |+⟩ state when probabilities are 50/50.
|ψ⟩ = 0.707|0⟩ + 0.707|1⟩

Bloch Sphere Parameterization

Any pure qubit state can be written using two angles:

$$|\psi\rangle = \cos\!\left(\tfrac{\theta}{2}\right)|0\rangle \;+\; e^{i\phi}\sin\!\left(\tfrac{\theta}{2}\right)|1\rangle$$

where:

  • θ (theta) is the polar angle — controls the probability balance (0 to π)
  • φ (phi) is the azimuthal angle — controls the relative phase (0 to 2π)

This maps every qubit state to a point on the surface of a sphere — the Bloch sphere. Explore it in the next tab!

What You Learned

  • A qubit state is |ψ⟩ = α|0⟩ + β|1⟩ where |α|² + |β|² = 1
  • Amplitudes are complex numbers that encode probability and phase
  • The probability of measuring |0⟩ is |α|², and |1⟩ is |β|²
  • Any single-qubit state can be parameterized by two angles θ and φ

Interactive Bloch Sphere

The Bloch sphere is a geometric representation of any single-qubit pure state. Drag to rotate the view. Use sliders to change the qubit state.

|ψ⟩ = |0⟩
≈ |0⟩ (North pole)
|0⟩
100%
|1⟩
0%

Understanding the Bloch Sphere

North & South Poles

|0⟩ is at the north pole (θ=0). |1⟩ is at the south pole (θ=180°).

The Equator

All states on the equator (θ=90°) have equal probability of being measured as |0⟩ or |1⟩. They differ only in phase.

Key States on the Equator

  • |+⟩ = (|0⟩+|1⟩)/√2 — positive X
  • |−⟩ = (|0⟩−|1⟩)/√2 — negative X
  • |+i⟩ = (|0⟩+i|1⟩)/√2 — positive Y
  • |−i⟩ = (|0⟩−i|1⟩)/√2 — negative Y

Opposite Points

Diametrically opposite points on the Bloch sphere are orthogonal quantum states.

What You Learned

  • The Bloch sphere maps every qubit state to a point on a unit sphere
  • North pole = |0⟩, south pole = |1⟩, equator = equal superpositions
  • θ controls how much |0⟩ vs |1⟩; φ controls the relative phase
  • Every single-qubit gate is a rotation on the Bloch sphere

Quantum Measurement

When we measure a qubit, its superposition collapses to either |0⟩ or |1⟩. Which one we get is governed by probability:

Born Rule: For a state $|\psi\rangle = \alpha|0\rangle + \beta|1\rangle$,
• $P(|0\rangle) = |\alpha|^2$
• $P(|1\rangle) = |\beta|^2$
After measurement, the qubit stays in whichever state was measured. The superposition is destroyed.

Simulate Measurement

Prepare a qubit state using θ, then click Measure repeatedly to build up statistics. Watch how the histogram converges to the theoretical probabilities!

Measurement basis:
Z-basis: measures in the standard |0⟩/|1⟩ basis.
0° — pure |0⟩ 90° — equal mix 180° — pure |1⟩
State: 0.707|0⟩ + 0.707|1⟩
P(|0⟩) = 50.0%   P(|1⟩) = 50.0%
0
|0⟩
0
|1⟩

= theoretical probability

Total: 0 measurements

Why Measurement Matters

  • Irreversible: Once measured, the superposition is gone. You cannot "un-measure" a qubit.
  • Probabilistic: A single measurement gives a random result. Only by repeating many times can you estimate the probabilities.
  • No-Cloning: You cannot copy a qubit to measure it multiple times in the same state (no-cloning theorem).
  • Basis-Dependent: The outcome depends on which basis you measure in (computational, Hadamard, etc.).

What You Learned

  • Measurement collapses superposition — you get |0⟩ or |1⟩, never both
  • The Born rule gives the probability: P(|0⟩) = |α|², P(|1⟩) = |β|²
  • Measurement is irreversible — the pre-measurement state is lost
  • You can't copy a qubit (no-cloning theorem), so measurement is your only window

Quantum Gate Playground

Quantum gates are unitary operations — reversible rotations on the Bloch sphere. Start from |0⟩ and apply gates to see how the state evolves.

Click a gate to apply it:

Circuit:

|0⟩apply gates above
|ψ⟩ = |0⟩
|0⟩
100%
|1⟩
0%

Click a gate to see its effect

Each gate rotates the state vector on the Bloch sphere.

Try These Experiments

Use the playground above, then click Run to auto-apply each sequence and see the result:

Gate Challenges

Try to reach each target state using the gate playground above. Click Check to verify!

Gate Reference

X — Pauli-X (NOT)

180° rotation around X-axis
01
10

Flips |0⟩ ↔ |1⟩. The quantum NOT gate.

|0⟩ → |1⟩|1⟩ → |0⟩

Y — Pauli-Y

180° rotation around Y-axis
0−i
i0

Combines bit-flip and phase-flip.

|0⟩ → i|1⟩|1⟩ → −i|0⟩

Z — Pauli-Z (Phase Flip)

180° rotation around Z-axis
10
0−1

Leaves |0⟩ alone, flips phase of |1⟩.

|+⟩ → |−⟩|−⟩ → |+⟩

H — Hadamard

Creates equal superposition
1/√21/√2
1/√2−1/√2

The most important gate for creating superposition. Self-inverse: H² = I.

|0⟩ → |+⟩|1⟩ → |−⟩

S — Phase Gate (√Z)

90° rotation around Z-axis
10
0i

Adds π/2 phase to |1⟩. S² = Z.

|0⟩ → |0⟩|1⟩ → i|1⟩

T — π/8 Gate (√S)

45° rotation around Z-axis
10
0eiπ/4

Key for universal quantum computation. T² = S, T&sup4; = Z.

|0⟩ → |0⟩|1⟩ → eiπ/4|1⟩

What You Learned

  • Quantum gates are unitary (reversible) operations on qubit states
  • X flips |0⟩ ↔ |1⟩; Z flips phase; H creates superposition
  • Gates compose: applying H then Z then H is the same as applying X
  • The set {H, T} is universal — any single-qubit gate can be approximated with these

Test Your Knowledge

Answer these questions to check your understanding of qubits and quantum gates.