Everything so far has been theory on paper. This is where you actually press run. A quantum program isn’t a function that returns an answer — it’s a recipe you execute thousands of times and tally. You write a circuit, a compiler reshapes it for a real chip, and the machine hands back a histogram of samples. Learning to read that histogram is the last skill of the course.
A circuit ends in a measurement, and measurement gives you just one bitstring — a single dice roll from the distribution the circuit set up. One roll tells you almost nothing. So you run the exact same circuit again and again, collecting outcomes, until the tally reveals the shape of the distribution. The quantum part built a cleverly loaded set of dice; the classical part is just counting. More shots, sharper picture — and the cost you pay is time on the machine.
Imagine a strange pair of dice that always land showing the same face as each other — but which face is random. Roll them once: you see “4–4” and learn little. Roll them a thousand times and tally: you discover they never disagree, and each matched pair shows up equally often. You’ve measured the rule without ever being told it. That is exactly how you learn what a quantum circuit does — one shot is a roll, the histogram is the tally.
Pick a circuit, set the number of shots, and hit run. The bars are the measured counts. With few shots they wobble; with many they settle onto the true probabilities. Flip on a noisy backend to see how a real chip smears outcomes that should be impossible.
The circuit fixes a probability p for each bitstring (Born rule: p = |amplitude|²). Run N shots and the count for an outcome is a binomial random number centred on N·p:
That 1⁄√N is why a few shots wobble and thousands look smooth. For an expectation value — the number most algorithms (VQE, QAOA) actually want — you assign each outcome a value and average over the shots:
You write H, CNOT, T — whatever’s convenient. The device only knows a few native gates, and it can only do a two-qubit gate between qubits that are physically wired together (its coupling map). The transpiler bridges the gap: it rewrites every gate into native ones and inserts SWAPs to shuttle qubits next to each other when your CNOT asks for two that aren’t neighbours.
Every inserted gate is another chance to fail, so transpilers fight to keep the circuit shallow. The takeaway: the same logical circuit can run beautifully on one chip and terribly on another, purely because of layout and noise.
“One run gives me the answer.” A single shot is one sample from a distribution. You need many shots to estimate the probabilities — and for a probabilistic algorithm, to be confident which outcome is the real signal.
“Measurement shows me the amplitudes.” It never does. You only ever see classical bitstrings; the amplitudes and phases are inferred from how outcomes are distributed, never read off directly.
“If it works on the simulator, it works on hardware.” The simulator is noiseless and fully connected. A real backend adds gate errors, readout errors, and connectivity limits — which is exactly why Parts C and D of this course exist.
You’ve gone from wiring a single gate to running a real circuit on noisy hardware — the entire arc of building and operating a quantum computer. Pair it with the Quantum Information course and you’ve seen both halves: what quantum information is, and how you build with it.