Skip to content

Probabilities, sampled frequencies and expectation values

Probabilities describe the distribution predicted by a model. counts records the samples obtained from a finite number of measurements. The same distribution can produce different counts. Sum the counts first, then check the outcome space and bit order.

For independent binary samples with probability p, the standard deviation of the frequency after N shots is sqrt(p(1−p)/N). Four times as many shots halves this standard error. It is not a bound that every run must satisfy, and observing no samples of an outcome does not establish zero probability.

The probabilities field is optional: both the request and execution path must provide it. A trajectory simulation may estimate probabilities from finitely many trajectories, so the field is not always an analytically exact value. Extended outcome spaces, including atom loss, also need their own interpretation.

Which observables can counts estimate?

For a single-qubit computational-basis measurement, the sampled Z expectation is (count(0)−count(1))/N. For ZZ, assign ±1 using the parity of the two bits. X, Y and Pauli terms containing them require suitable basis rotations, or direct expectation evaluation from a simulated state.

Computational-basis counts cannot reconstruct arbitrary observables. Bell-like 00/11 counts alone cannot prove entanglement. Retain the measurement basis, observable definitions and grouping so the origin of each estimate is clear.

The VQE project keeps grouped energy samples separate from an analytic reference and accounts for objective evaluations, candidate confirmation and final sampling. Final computational-basis shots are not the total Pauli-group measurement budget.

See measurement and finite sampling for a runnable example and observable batches for evaluating several expectations.

中文版

SDK 1.0.8a · `8b227bff`