Estimating Probabilities Accurately
Every quantum measurement yields a single classical outcome — you never directly observe a probability. Instead, you run the same circuit many times (called shots) and count how often each outcome appears. The fraction of runs that produced outcome is your estimate of the true probability given by the Born rule.
From counts to error bars
Because each shot is an independent draw from a Bernoulli distribution with parameter , the standard error of the proportion estimator over shots is
This is the typical deviation you expect between your estimate and the true value . The worst case is (maximum uncertainty), where
To cut the error in half you need four times as many shots: precision scales as . This square-root law governs any sampling experiment, classical or quantum.
Practical consequences
When you run a quantum circuit on real hardware or a simulator, the number of shots sets a hard floor on how precisely you can know any output probability. For a lesson's grader based on analytic probabilities (exact formulas), this limitation disappears — but for real devices it is unavoidable. As a rule of thumb, choose large enough that the smallest probability difference you need to resolve.
Try it
Solve for the minimum number of shots that guarantees for any 50/50 distribution, then return that integer.
Sign in on the full site to ask questions and join the discussion.