An interactive guide to the fundamental unit of quantum information
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.
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.
This is Dirac notation (also called "bra-ket" notation), the standard way physicists write quantum states:
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!
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.
| Property | Classical Bit | Qubit |
|---|---|---|
| Possible values | 0 or 1 | Superposition of |0⟩ and |1⟩ |
| State space | {0, 1} — two points | Surface of Bloch sphere (continuous) |
| Reading the value | Non-destructive | Collapses the superposition |
| Copying | Freely copyable | No-cloning theorem forbids it |
| Operations | Logic gates (AND, OR, NOT) | Unitary transformations (rotations) |
| Correlations | Classical correlations | Entanglement (non-classical) |
Qubits can be physically realized in many ways:
Tiny circuits cooled near absolute zero. Used by IBM and Google.
Individual atoms held by electromagnetic fields. Used by IonQ and Quantinuum.
Photon polarization encodes |0⟩ and |1⟩. Used by Xanadu and PsiQuantum.
Electron spin in quantum dots. Compatible with semiconductor fabrication.
Once you understand single qubits, the next frontier is multi-qubit systems:
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.
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:
The numbers α and β are complex-valued amplitudes. Their squared magnitudes give probabilities, and they must add up to 1:
Drag the slider to change the probability of measuring |0⟩ vs |1⟩:
Any pure qubit state can be written using two angles:
where:
This maps every qubit state to a point on the surface of a sphere — the Bloch sphere. Explore it in the next tab!
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⟩ is at the north pole (θ=0). |1⟩ is at the south pole (θ=180°).
All states on the equator (θ=90°) have equal probability of being measured as |0⟩ or |1⟩. They differ only in phase.
Diametrically opposite points on the Bloch sphere are orthogonal quantum states.
When we measure a qubit, its superposition collapses to either |0⟩ or |1⟩. Which one we get is governed by probability:
Prepare a qubit state using θ, then click Measure repeatedly to build up statistics. Watch how the histogram converges to the theoretical probabilities!
= theoretical probability
Total: 0 measurements
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:
Each gate rotates the state vector on the Bloch sphere.
Use the playground above, then click Run to auto-apply each sequence and see the result:
Try to reach each target state using the gate playground above. Click Check to verify!
Flips |0⟩ ↔ |1⟩. The quantum NOT gate.
Combines bit-flip and phase-flip.
Leaves |0⟩ alone, flips phase of |1⟩.
The most important gate for creating superposition. Self-inverse: H² = I.
Adds π/2 phase to |1⟩. S² = Z.
Key for universal quantum computation. T² = S, T&sup4; = Z.
Answer these questions to check your understanding of qubits and quantum gates.