Course 01 · Quantum foundations
Bits and qubits
Start with a familiar switch, then separate a qubit's predicted state from the classical result we observe.
Module 00 · Foundations
From a classical bit to a qubit
A classical bit is like a switch: when we read it, it is either 0 or 1. A qubit is not a tiny switch or a spinning coin. Before measurement, its state carries two amplitudes that determine what we may observe.
Start with the outcomes you already know, then use the simulator to see what a quantum state adds.
Learning objectives
After this lesson, you can
- Distinguish a classical bit from a qubit state
- Explain why one measurement still returns only 0 or 1
Begin with the result
A classical bit stores a recorded value, 0 or 1. A qubit also gives a classical 0 or 1 when measured.
Prepare, transform, measure
Prepare a known state, transform it with gates, and measure many identical copies.
Start with what you know
Follow one state from start to observation
No prior quantum vocabulary is required. Read these three blocks from left to right.
One switch stores either 0 or 1. Begin with the known state 0.
A quantum gate changes the state without reading it.
Measurement turns the quantum state into a classical answer.
What you see: one result per run, either 0 or 1. Repeat the run to reveal the pattern.
Classical bridge
Switch vs quantum state
A classical switch stores one definite value. A qubit still produces 0 or 1 when measured, but its pre-measurement state determines the probabilities and can carry phase.
Where the analogy stops: a qubit is not secretly choosing a face while we are not looking.
Known logic, new rules
Classical gates and their quantum counterparts
Classical gates may discard information. Quantum gates must be reversible until measurement, so AND and OR need extra workspace qubits.
| Classical gate | What it does | Quantum bridge | Key difference |
|---|---|---|---|
| AND | Outputs 1 only when both inputs are 1. | CCX Toffoli | Uses a target qubit so the operation stays reversible. |
| OR | Outputs 1 when either input is 1. | X + CCX reversible construction | Preserves the inputs and writes the result to workspace. |
| NOT | Flips 0 to 1 and 1 to 0. | X Pauli X | The same truth table also acts on superposition amplitudes. |
| XOR | Outputs 1 when the inputs differ. | CNOT controlled X | Preserves the control and XORs it into the target. |
Readout: measurement converts the final quantum state into classical bits.
Move the arrow, then compare its measurement probabilities with a known classical bit.
Try it yourself
Prepare one qubit with H, then measure
Predict the distribution before running 1,024 repeat shots.
Your prediction is correct: H prepares equal measurement probabilities.
Checkpoint
What does a measurement of one qubit return?
Choose an answer to check your model.

