Mathematical foundations

Probability and sampling

Connect exact probabilities with the variation in finite experiments.

12 minFoundations

Intuition

A probability distribution attaches a nonnegative weight to each mutually exclusive outcome. An independent trial draws one outcome from the distribution. A sample of many trials gives counts, which vary even when the distribution stays fixed.

The law of large numbers explains why relative frequencies tend to stabilize with more trials. Short samples can look surprisingly skewed. Predict what should happen on average before studying any single run.

Learning objectives

  • Read a probability distribution
  • Predict an expected count
  • Explain sampling variation

Interactive exploration

Use the controls to change the state and see its calculated readout. You can return to this experiment as you work through the derivation.

Amplitude at |0⟩

Complex plane
ReIm

First 0.707Second 0.000Sum 0.707

Prepare & recombine

90°
60°

Read the input directly in the computational basis. Phase changes leave these probabilities fixed.

BasisAmplitudeProbability
|0⟩0.70750%
|1⟩0.354 + 0.612i50%

Mathematical foundation

Every outcome has a probability between 0 and 1. Their sum is 1 when the list includes every possible outcome.

pj≥0,∑jpj=1p_j\ge 0,\qquad \sum_j p_j=1

For independent draws, the count of a chosen outcome is binomial. Its expected count is Np, with standard deviation equal to the square root of its variance.

E⁡[C]=Np,Var⁡(C)=Np(1−p)\operatorname{E}[C]=Np,\qquad \operatorname{Var}(C)=Np(1-p)

Worked example

For a fair preparation and 100 shots, the count of ones has mean 50 and standard deviation 5. A count of 47 differs from the mean by three, which is smaller than one standard deviation.

100(1/2)(1/2)=5\sqrt{100(1/2)(1/2)}=5

Guided experiment

Set the preparation angle to 90°, then sample the input repeatedly. Compare batches of 64 shots with the exact 50/50 prediction.

Go to the controls
Compare with the expected result

The exact probabilities stay fixed. The sampled fractions vary from batch to batch.

Understanding check

1. What is the expected number of ones in 80 independent trials with P(1) = 0.25?
2. Which changes from batch to batch when the preparation is fixed?

Next steps

Want to keep your results? Start your learning journey

Open Interference Studio

References

Version 1 · Revised 2026-11-18