Quantum
Module 1 · Foundations · Lesson 1

Bits, chance, and complex numbers

A three-ingredient warmup before we meet the qubit. No quantum mechanics yet — just the classical pieces you need.

6 min read · Lesson 1 of 32

Before we meet a qubit, we need three pieces from the classical world. You probably already know two of them — this warmup is about making them precise. The third, complex numbers, is the piece that separates a bit from a qubit.

1. A bit is a yes-or-no

A bit is the smallest piece of classical information. It has exactly two possible values, usually written as 00 and 11. A light switch. A door that’s open or closed. A toggle.

That’s it. A bit is boring on purpose — it’s the smallest unit we can build computers out of. Everything a classical computer does is billions of bits flipping between 00 and 11, very fast.

2. Probability is the language of not-knowing

Sometimes we don’t know what a bit is. Imagine a coin under a cup. The coin is either heads or tails — you just can’t see which. We capture this with probability: a number between 00 and 11 that measures how likely something is.

For a fair coin: P(heads)=0.5P(\text{heads}) = 0.5 and P(tails)=0.5P(\text{tails}) = 0.5. Each time you look, you get one outcome. But if you flip the coin a hundred times and keep count, the fractions settle down to 50/5050/50.

Try it yourself:

Flip it once. Then flip ten. Then a hundred. Notice what happens: no matter how wild the first few flips look, the ratio converges.

This is a crucial point, and it’s the one that most beginners get wrong about quantum mechanics. A coin under a cup is already heads or tails. We just don’t know which. Probability here is a statement about our knowledge — not about the coin.

A qubit is going to be different. Keep this moment in your head; we’ll come back to it in Lesson 4.

Quick check
Before you flip a fair coin, what is the probability of heads?

3. Complex numbers — just enough

Real numbers live on a line. 2-2, 0.50.5, π\pi. Every real number has a single spot on that line.

A complex number is different: it has two pieces, a real part and an imaginary part. Instead of living on a line, it lives on a plane. You can think of it as an arrow from the origin to a point, with two ways to describe it:

The imaginary unit ii satisfies i2=1i^2 = -1. That’s the one weird rule. Every other thing about complex numbers follows from it.

Drag the sliders below to see both forms at once:

Two things to notice:

  1. The magnitude rr is the length of the arrow. It tells you “how big.”
  2. The phase φ\varphi is the angle from the positive real axis. It tells you “which direction.”

A complex number with magnitude 11 is just a direction — no size, pure angle. Those live on the unit circle.

Quick check
What does the imaginary unit i satisfy?

Why this matters

Classical bits need only the real numbers 00 and 11. Classical probability theory needs real numbers between 00 and 11 that sum to 11. That’s the whole classical story.

A qubit needs complex numbers — specifically, complex numbers whose squared magnitudes sum to 11. The phase, the angle in that little clock widget, is what gives a qubit its superpowers. It’s how two “50/50” quantum states can cancel each other out, and how two others can line up and reinforce.

In the next lesson, we meet the qubit and start seeing what those complex numbers are doing.