From a Bit to a Qubit
UF Herbert Wertheim College of Engineering, University of Florida UF Herbert Wertheim College of Engineering, University of Florida Quantum Theory
Project
From a Bit to a Qubit  /  high school
Quantum for high school · page 1 of 3
Start with something you already know

From a bit to a qubit

Every photo, song, and message on your phone is stored as bits. A bit is a switch that is either off or on. A qubit is the quantum version, and it is not a switch. It is an arrow. This page shows you the arrow, how to read it, and why reading it is the strange part.

What you need to know already

  1. Counting in twos. If you know that four switches can be set 16 different ways, you are fine.
  2. A coin flip. Heads half the time, tails half the time, and you cannot say which before you look.
  3. Angles. We will use one idea from trigonometry, that the cosine of an angle tells you how high a tilted arrow reaches. If you have not met cosine yet, the page still works. Just read the height off the ruler.
this is a qubit · drag to look around
01

A bit is a switch

Off or on. Zero or one. That is all a bit is, and your phone has about a trillion of them.

Four switches can be set in 16 ways. Add one switch and the number doubles.

Flip the switches below. The row of zeros and ones is called a binary number, and the readout shows what it stands for in ordinary counting. Every letter you type and every pixel in a photo is stored as a pattern like this.

Try it  Four switches

Patterns you can make

Why doubling matters. Ten switches give 1024 patterns. Twenty give about a million. Forty give about a trillion. Bits are cheap, and computers get their power from having enormous numbers of them.
For teachers
This section establishes n bits ↔ 2n states, which is the baseline that section 06 and page 2 contrast against. The binary-to-decimal readout is optional. What matters is the doubling rule, since students will need it when the page claims that n qubits require 2n numbers to describe. No probabilistic content yet; the switches are deterministic on purpose.
02

A coin is a bit you have not looked at yet

Before you look, a spinning coin is neither heads nor tails. After you look, it is one of them. Keep that sentence. It is most of quantum mechanics.

One flip tells you almost nothing. A hundred flips tell you the odds.

This coin can be weighted. Slide the weight, flip it once, then flip it a hundred times. Notice that a single flip never tells you the weight. Only the pile of results does. Heads is 0 and tails is 1 from here on.

Try it  A weighted coin
·

The last 100 flips

Two different things. The weight of the coin is a number between 0 and 100 percent. The result of a flip is a 0 or a 1. A qubit is like the weight. Looking at a qubit is like the flip.
For teachers
A Bernoulli trial with bias p. The point to land is the separation between the parameter (p, continuous, never directly observed) and the outcome (0 or 1). The Bloch vector's height in the next section plays the role of p. The row of a hundred coins also seeds the idea, used on page 3, that estimating p to precision ε costs about 1/ε² trials.
03

A qubit is an arrow

Straight up means 0. Straight down means 1. Anywhere in between is a qubit, and the height of the arrow tip sets the odds.

The height of the tip, on a ruler from −1 to +1, tells you the chance of reading 0.

chance of 0 = (1 + height) / 2
and, if you know cosine,
height = cos(tilt from straight up)

Tilt the arrow. When it points straight up the height is +1 and the chance of 0 is 100 percent. Straight down, the height is −1 and the chance of 0 is zero. Sideways, the height is 0 and it is a fair coin. The arrow lives on a sphere, and you can drag the sphere to see it from any side.

Why is 0 at the top? Because 0 is the qubit's resting state, the one with the lowest energy, and physicists draw the resting state at the top. Every textbook and every real quantum computer does it this way, so this page does too. If you know digital electronics, where 0 is the low voltage and 1 is the high one, this feels backwards for about a day. Then it stops.
Try it  The arrow and its ruler
drag to look around
height of the tip
75%chance of reading 0
Not a picture of a spinning thing. The arrow is a way of drawing the odds. A real qubit might be a single electron, an atom, or a tiny loop of wire colder than deep space. In every case the same arrow describes it.
For teachers
This is the Bloch sphere with the phase suppressed until section 06. The height rule P(0) = (1 + cos θ)/2 is exactly cos²(θ/2) by the half-angle identity, and is chosen because it needs no half angle and can be read off a ruler. The state is |ψ⟩ = cos(θ/2)|0⟩ + sin(θ/2)|1⟩ with real amplitudes. The word "sphere" rather than "circle" is deliberate, so that the second angle has somewhere to go later. The pole convention is the universal one: |0⟩ is the +1 eigenstate of Z and sits at the north pole. For a spin qubit |0⟩ = |↑⟩; for superconducting, trapped-ion, and most other qubits it is the ground state. Students coming from digital logic expect 1 to be "high," and the note above heads that off.
04

Looking changes the arrow

This is the part that is truly different from a coin. When you read a qubit, the arrow jumps to straight up or straight down, and it stays there.

You never see the tilt. You see a 0 or a 1, and afterwards the arrow points that way.

Set a tilt, then press Look. The arrow snaps to one of the poles, with the odds from the height rule. Press Look again and you get the same answer every time, because the arrow is now at a pole. To get a tilted arrow back you have to prepare it again. That is what Reset does.

Try it  Prepare, look, look again
prepared, not yet looked at
·
The rule in one line. Before you look, a qubit can be anywhere on the sphere. The moment you look, it becomes an ordinary bit. Everything clever a quantum computer does happens before anyone looks.
For teachers
The projective measurement postulate, presented as a game mechanic rather than a mystery. Two things students commonly get wrong are addressed by the two buttons: a repeated measurement gives the same result (the state has collapsed onto an eigenstate), and the statistics of many prepare-and-measure cycles recover the height rule. Avoid the phrase "the qubit is 0 and 1 at the same time." The arrow picture makes it unnecessary.
05

Computing means turning the arrow

A normal computer flips switches. A quantum computer turns arrows. Here are the three turns that matter most.

Every operation a quantum computer can do to one qubit is a rotation of the sphere.

Press the buttons and watch. Each one is a turn around some axis, and the dashed line shows the axis while the turn happens.

Flip is a half turn around a sideways axis. It turns the arrow upside down, which is the quantum version of NOT. Quarter turn is a quarter turn around the vertical axis. It changes where the arrow points around the sphere but not how high it is, so the odds do not change. Tip sideways is the odd one. It is a half turn around a tilted axis, the one that sits halfway between straight up and "toward you". A half turn around that axis swaps up with toward-you. So an arrow that points up ends up pointing toward you, flat on the equator, and a certain 0 becomes a fair coin. Do a turn, then look, and the odds follow the new height.

Try it  Three turns
the dashed line is the axis of the turn
100%chance of reading 0
A puzzle to try. Start at 0. Tip sideways, then tip sideways again. The arrow comes back to 0, because two half turns around the same axis make a full turn. Now start at 0 again and do tip sideways, quarter turn, quarter turn, tip sideways. Look. You get 1 every time. The two quarter turns in the middle never changed the odds, and yet the answer changed from 0 to 1. Something a look cannot see happened in between. The next section shows what.
For teachers
Flip is the Pauli X gate (a π rotation about x). Tip sideways is the Hadamard (a π rotation about the axis halfway between x and z, which carries a pole to the equator). Quarter turn is the S gate (a π/2 rotation about z). Two S gates make a Z, and H·Z·H = X, which is the puzzle in the footer. All single-qubit gates are rotations because they must preserve the length of the state vector. The circuit strip records the sequence in the usual left-to-right notation.
06

The direction you cannot see

Two arrows can have exactly the same height and still be different arrows. Looking cannot tell them apart. Turning can.

The arrow can point toward you or away from you, and the odds do not change. This hidden direction is where quantum computing lives.

The slider below sets the hidden direction of a second arrow. Both arrows lie flat on the equator, so both have height 0 and both read 0 half the time. Looking cannot tell them apart, no matter how many times you look. Are they really different, or is the hidden direction just a story?

Here is the experiment that settles it. Apply the same "tip sideways" from section 05 to both arrows, then look. Remember what that turn is: a half turn around the tilted axis halfway between up and toward-you, and it swaps those two directions. So the arrow that points toward you ends up straight up, a certain 0. The arrow that points away from you ends up straight down, a certain 1. Same height before, opposite heights after. The hidden direction was real, and one turn made it visible.

Try it  Same odds, different arrow
both arrows flat, before the tip · drag to look around
50%arrow A reads 0
50%arrow B reads 0
Back to the puzzle from section 05. After the first tip the arrow lies flat, pointing toward you. Two quarter turns around the vertical axis spin it halfway round, so it now points away from you. Same height, same odds, but it is now arrow B from this bench. The second tip swaps away-from-you with straight down, and that is why you read 1 every time. Without the quarter turns it is arrow A, the second tip sends it back up, and you read 0.

Why only "toward" and "away" get separated. The tilted axis swaps up with toward-you, and leaves left and right alone. So an arrow pointing left or right stays flat after the tip and still reads like a coin. Set the second arrow to 90° and try it. Only the toward-or-away part of the hidden direction turns into height. Physicists call the hidden direction the phase, and this experiment is how they check it is there.
For teachers
The azimuthal angle φ, the relative phase between the two amplitudes. |+⟩ and |−⟩ are indistinguishable under a Z-basis measurement and become |0⟩ and |1⟩ after a Hadamard. This is the entire mechanism behind interference on page 2, so it is worth slowing down here. Students should leave with the picture that a measurement reads latitude only, and that longitude is accessed by rotating first.
07

Where qubits live, and why anyone bothers

A single atomTrapped ionsOne charged atom held in place by electric fields, in a vacuum. Its arrow is set and turned with laser pulses.
A defect in a crystalDiamondA missing carbon atom next to a nitrogen atom leaves an electron whose arrow can be read with light, even at room temperature.
A loop of wireSuperconducting circuitsA tiny circuit cooled to a hundredth of a degree above absolute zero, where electric current can point two ways at once.
A moleculeMolecular spinsChemists can build molecules with one unpaired electron and tune the surroundings so its arrow keeps its direction longer.
Why this matters

A qubit is a bit with a direction, and direction is what waves have. Because of that, a machine built from qubits can make wrong answers cancel out the way sound waves cancel in noise-cancelling headphones. That is what page 2 is about. And because the arrow turns at a rate set by the field around it, a single qubit is also a sensor, which is page 3. Both ideas rest on the hidden direction you just saw.

Try this at home  two experiments, no lab needed
You need
  • A coin
  • Paper and a pen
  • Polarized sunglasses
  • A phone or laptop screen
Experiment 1, the pile of flips
  1. Flip the coin 10 times and count the heads. Write the number down.
  2. Do it four more times. You will get numbers like 4, 6, 5, 7, 3.
  3. Add them up. Out of 50 flips you will be close to 25, but no single group of 10 was reliably 5.
Experiment 2, the hidden direction of light
  1. Look at a phone screen through polarized sunglasses.
  2. Slowly rotate the glasses. At one angle the screen goes dark.
  3. Light from the screen has a direction you cannot see with your eyes. The glasses are a "tip sideways" that makes it visible, exactly like section 06.
Why these two. The first shows that odds only show up in a pile of results, never in one result. The second shows that a hidden direction can be real and invisible at the same time, until you do the right turn.

Next: Finding an Answer with Waves, which takes the hidden direction and turns it into a search that finds one box out of four in a single try.