PART 01 / Beginner

A qubit, without the mystery

What changes when we move from a bit to a qubit?

Published lesson

What you will learn

Distinguish amplitudes from probabilities and calculate what two Hadamard operations do.

Before you begin: basic arithmetic, scientific notation and curiosity.

A chip package beside an open notebook of wave sketches in soft daylight.
AI-generated example scene. Use it to practise looking and asking questions; it is not experimental evidence.

Start with what comes out

A normal bit gives you one of two labels: 0 or 1. Measure a qubit in the computational basis and you also get one of those two labels. That small fact is worth keeping in view. A quantum computer does not hand you a list of every possible answer when you look at it. The interesting part is how the state changes before you measure it. That is where amplitudes and interference enter the story.

The numbers before the answer

For one qubit, write the state using two amplitudes, α and β. Squaring their magnitudes gives the probabilities of the two outcomes. The amplitudes can be complex numbers; for this first example, real numbers are enough. A state with amplitudes 1/√2 and 1/√2 gives equal probabilities. So does a state with amplitudes 1/√2 and −1/√2. The probabilities match, but the states can behave differently in the next operation.

Why the minus sign matters

Think about two waves meeting. They can reinforce each other or cancel, depending on their relative phase. The comparison is useful for interference, although a qubit is not literally a tiny water wave. A Hadamard operation mixes the amplitudes. Apply it twice to an initially zero qubit and you return to zero. If you measured after the first operation instead, you would disturb the process. That is why “a hidden coin toss” is an incomplete picture.

A connection to learning

Machine-learning models also transform representations before producing an output. A quantum circuit offers another family of transformations, with its own rules and costs. Learning those rules comes before asking whether they help a prediction task. For now, draw the two-step circuit, calculate its output, and resist the temptation to call a two-state example an advantage over a laptop.

SEE THE RELATIONSHIPS

From structure to behavior.

Quantum circuit: a labelled conceptual diagram
Figure 1.1 · Quantum circuit. Original educational diagram; synthetic, not a measured result.
The reasoning pathPrepare |0⟩ then Mix amplitudes with H then Mix again with H then Measure the final state1. Prepare |0⟩2. Mix amplitudes with H3. Mix again with H4. Measure the final state
A learning flow for this part. Follow the assumptions through to an observable result.

MAKE THE IDEA PRECISE

The mathematics.

|ψ⟩ = α|0⟩ + β|1⟩; P(0) = |α|²; P(1) = |β|²
Symbols and units
SymbolMeaning
α, βComplex amplitudes; dimensionless
P(0), P(1)Measurement probabilities; add to 1
|ψ⟩The state, written as a vector

Build the equation, step by step

  1. A valid state satisfies |α|² + |β|² = 1. Probabilities use squared magnitudes, so an amplitude sign is not itself a negative probability.
  2. For real amplitudes (a, b), the Hadamard gives ((a+b)/√2, (a−b)/√2). Starting at (1, 0), the first result is (1/√2, 1/√2).
  3. Apply the same operation again: the first output is 1 and the second is 0. The two amplitudes interfere before probabilities are calculated.

WORK THROUGH THE NUMBERS

Worked example

Start in |0⟩. One Hadamard gives a 50/50 measurement distribution; two uninterrupted Hadamards give P(0)=1. The script computes amplitudes directly, so it has no sampling noise.

A small Python experiment.

Python 3 · Standard library only · Synthetic educational example. Run this in your own notebook or a local file.

from math import sqrt
def h(state):
    a, b = state
    return ((a+b)/sqrt(2), (a-b)/sqrt(2))
first = h((1.0, 0.0))
second = h(first)
print([round(a*a, 6) for a in first])
print([round(a*a, 6) for a in second])

Expected output

[0.5, 0.5]
[1.0, 0.0]

Change one quantity, predict the result, and then run the code again. Explain any difference before adding complexity.

Test your understanding.

Try it: Run the same calculation from (0, 1). Predict the final distribution before executing it.

Self-check: Can you measure both amplitudes exactly in one shot?

No. A single computational-basis measurement yields one outcome. Estimating a probability needs repeated preparation and measurement; recovering a general state needs suitable measurements in more than one basis. The state-vector script has access to information a single physical shot does not reveal.

Where this model stops: This is an ideal one-qubit calculation. It does not model noise, entanglement, hardware timing or state reconstruction.

A research question: Keep one assumption fixed and change another. What observation would make you revise your explanation?

Record evidence in your mastery worksheet →

Read with the original sources.

These readings support the concepts and deeper investigation. The worked numbers and illustrations above are teaching examples.

Complete source register →

Where next?