k›ketwise.
FUNDAMENTALS / 11 / MEASUREMENT

Measurement and shots

Separate theoretical probabilities from observed frequencies.

Intuition

One shot is one preparation-and-measurement experiment. To collect another shot, prepare the state again. More shots usually make the observed frequencies closer to the probabilities, not exactly equal.

Prepare |+⟩ and run 10, 100, and 10,000 shots. In Measurements, counts fluctuate. In Probabilities, the ideal values stay at 50%. The lab displays the state before terminal measurement, not the collapsed state from one shot.

The mathematics

P(0)=∣α∣2,P(1)=∣β∣2P(0)=|\alpha|^2,\quad P(1)=|\beta|^2
Look a little deeper

A computational-basis measurement of a pure single qubit leaves |0⟩ or |1⟩ conditional on the outcome. Repeatedly measuring that same collapsed state is not the same as repeating the full preparation experiment.

Use it

Prepare |+⟩ using one gate, then compare shot counts. Measurement is added automatically by this lab.

This exercise uses the same server-side state and circuit checks as its linked practice problem.

Build your circuit

Click a gate to append it, or drag it onto a wire. CX uses the selected control; SWAP uses it as the second operand. Basis order: |qₙ … q₀⟩.

q0

Returned logical circuit · before transpilation · q0 on top

0 / 32 gates · terminal measurement of all qubits

Connect to code

qc.h(0)
qc.measure_all()

These operations go inside a circuit-building program. Practice problems provide a complete solve() template.

Solve the linked Qiskit problem →

Check your understanding

Must 10 shots of |+⟩ produce exactly five zeros?

First complete the circuit exercise successfully.