Expectation Values and Variance
A quantum measurement does not hand you a number — it hands you a lottery. Point an apparatus at an observable and you get back one of its eigenvalues, chosen at random, with probabilities the Born rule fixes from the state. To predict anything you must therefore speak the language of statistics, and two numbers do most of the work: the expectation value , the probability-weighted mean of the outcomes, and the variance , the mean-squared spread about that mean. The astonishing economy of the quantum formalism is that neither requires you to find the eigenvalues at all. The single sandwich , and its squared partner , compute the entire mean-and-spread directly from the operator, doing the eigenvalue bookkeeping automatically. This article is where the abstract operator algebra of the previous chapter meets the workbench. Prepare a stack of identical copies of , measure on each, tabulate the readings, and the sample mean marches toward while the sample variance marches toward — the law of large numbers made quantum. The statevector, it turns out, is not merely a probability list; it is a generating object for the full statistics of every observable at once. Two structural facts anchor everything. Hermiticity forces to be real, so no measurement predicts an imaginary average. And variance, being the expectation of a squared Hermitian operator, can never go negative — it bottoms out at exactly zero, and only when is an eigenstate of . That single vanishing point is the quantum signature of certainty; everything above it is irreducible spread. From the uncertainty principle to the variational quantum eigensolver, the pairing of mean and variance is the workhorse of quantum prediction.
- For a normalized pure state and observable , the expectation value is the Born-weighted mean of the eigenvalue outcomes — no diagonalization required.
- The variance measures the spread; its root is the standard deviation, or uncertainty.
- Variance vanishes iff is an eigenstate of — the unique case of a deterministic outcome; any superposition across distinct eigenvalues gives .
- Mixed states use the trace: and , reducing to the pure case when .
- Estimating from shots costs statistical error — the shot-noise floor of every quantum readout — and variances feed the Robertson relation .
- Key idea: an observable defines a random variable whose mean is and whose variance is ; the operator algebra reproduces the classical statistics of the measurement outcomes.
Where this lives today
Expectation values and variances are not a historical footnote — they are the literal output of every quantum processor and the currency of the entire near-term quantum-computing program. In the variational quantum eigensolver (VQE) and its cousin QAOA, a circuit prepares a parametrized state , and a classical optimizer minimizes the energy by decomposing into a weighted sum of Pauli strings and estimating each term's expectation from measured eigenvalues. The variance of each term dictates how many shots that term consumes, and grouping commuting operators to share shots is an active engineering frontier. The same shot-noise floor appears on every readout: a chip reporting per qubit with error bars is quoting a sample mean and . In quantum metrology, the error-propagation form turns variance into a precision limit, and entangled probes push sensing from the standard quantum limit toward the Heisenberg limit — the principle behind the squeezed-light upgrades that let LIGO hear fainter gravitational waves. And the Robertson relation, powered entirely by these variances, remains the quantitative statement of complementarity no measurement strategy can evade.
The physical picture
Imagine measuring as spinning a weighted wheel. Each slot is an eigenvalue , and the width of that slot is the Born probability . Spin once and you land in a slot at random. The expectation value is the balance point of the wheel — the center of mass of the eigenvalue distribution — and the variance is its moment of inertia about that balance point, a direct measure of how far the mass sits from the middle. The compact sandwich is the machine that finds the balance point without ever weighing the slots one by one: substitute the spectral decomposition and it collapses to on its own. The first figure draws that wheel for a concrete qubit, with real probabilities and a real balance point.
Zero variance is the special case where the wheel has a single slot of width one: the state is an eigenstate, the balance point sits on that eigenvalue, and every spin returns the same reading. Any superposition across distinct eigenvalues gives the wheel width, and width is randomness. But a single spin says little about where the balance point lies — you recover only by spinning many times and averaging, and the averaging has a cost. Because independent variances add, the sample mean of shots has variance , so its error shrinks only as . The second figure is that shot-noise funnel: the running estimate of trapped inside a band that closes as .
The core equations
The starting point is a definition, not a theorem: the expectation value of an observable in a state is the diagonal matrix element of the operator between the state and itself. Because is normalized, this is automatically the properly weighted average.
where: — normalized state vector, ; — observable, a Hermitian operator with ; — the mean value of the measurement outcomes. Reading: sandwich the operator between the bra and ket and you have predicted the average of infinitely many repeated experiments. That sandwich is equivalent to an explicit sum over the spectrum. Diagonalizing turns the operator statement into a familiar probability-weighted mean, which is what makes a genuine expectation value in the sense of ordinary statistics.
where: — the -th eigenvalue of (a possible outcome); — its orthonormal eigenstate; — the Born-rule probability of outcome . Reading: the compact form (1) and the transparent form (2) are the same number; you use (1) to compute and (2) to interpret. The spread of the outcomes is the variance. Its most useful shape for calculation subtracts the square of the mean from the mean of the square — and the two pieces are computed by the same sandwich trick, one with and one with .
where: — expectation of the squared operator (note acts as an operator, not a number); — the square of the already-computed mean. Reading: two sandwiches and one subtraction give the entire spread. The same variance can be written so that its non-negativity is manifest — as the expectation of a perfect square of a Hermitian operator — and its square root is named the uncertainty.
where: — the identity operator; — the deviation (Hermitian) operator; — the standard deviation, or root-mean-square spread. Reading: variance can never be negative, and it equals zero only when the deviation operator annihilates the state. When the preparation is not a pure state but a statistical ensemble, the state sandwich is replaced by a trace against the density operator . Every formula above survives this upgrade unchanged in meaning.
where: — density operator, with ; — the trace, a basis-independent sum of diagonal entries. Reading: for the cyclic property of the trace collapses (5) back to (1) and (3). Finally, variances of two observables are bound together whenever the observables fail to commute — the Robertson uncertainty relation, the general engine behind Heisenberg's principle.
where: — the commutator; — the standard deviations of and . Reading: non-commuting observables cannot both be sharp in the same state; the commutator sets the floor on their joint spread.
The goal here is to prove that the abstract diagonal matrix element is literally the statistical mean of the measurement outcomes, and along the way to see why that mean is guaranteed real for any observable. This is the bridge that makes "expectation value" more than a suggestive name: it is the reason the operator formalism reproduces ordinary probability theory exactly, with the Born rule supplying the weights.
Step 1. Invoke the spectral theorem: because is Hermitian it has a complete orthonormal eigenbasis with real eigenvalues , and . Why: this is the only structural input needed — Hermiticity guarantees both the real spectrum and the resolution of identity that will do the bookkeeping.
Step 2. Insert this into the sandwich and use linearity of the inner product to move the scalars out: . Why: each term now factors into an eigenvalue times a pair of overlap amplitudes, which is the shape of a weighted average waiting to be recognized.
Step 3. Identify the weight. Since , the product is exactly the Born probability. Hence . Why: the cross terms that would spoil a naive average are killed by orthonormality, leaving a clean probability-weighted sum over real eigenvalues.
Step 4. Read off reality for free. Every is real and every with , so is a convex combination of real numbers and is therefore real, and bounded between the smallest and largest eigenvalue. Equivalently, . Why: a physical average must be real, and Hermiticity is precisely the condition that delivers it — non-Hermitian operators can have complex expectation values and are not observables.
Go deeper · Derivation B · 1 minVariance as a squared norm and the certainty theorem
The aim is to establish two things at once: that the two forms of the variance in equations (3) and (4) are identical, and that the variance is not merely non-negative but vanishes if and only if the state is an eigenstate of . This second statement is the precise mathematical content of "certainty" in quantum mechanics — it pins down the unique circumstance under which a measurement outcome is fully determined in advance rather than merely probable.
Step 1. Expand the centered square. With a real scalar commuting with everything, . Take the expectation and use linearity with : . Why: this shows the "manifestly non-negative" form (4) and the "computational" form (3) are algebraically the same object, so either may be used.
Step 2. Rewrite the variance as a squared norm. Define the Hermitian deviation operator . Then . Why: writing it as the length-squared of the vector makes non-negativity automatic — a norm is never negative — and sets up the equality condition.
Step 3. Apply positive-definiteness of the inner product: a norm is zero exactly when its vector is the zero vector, so . Why: there is no slack in this step — the only way a length vanishes is for the vector itself to vanish.
Step 4. Recognize the eigenvalue equation. says : the state is an eigenstate of with eigenvalue . Conversely, any eigenstate trivially gives and hence zero variance. Why: this is the certainty theorem — deterministic measurement and eigenstate are logically equivalent, so all measurement randomness is precisely the failure of the state to be an eigenstate of the measured observable.
Go deeper · Derivation C · 1 minExpectation values on the Bloch sphere
For a single qubit the whole machinery becomes a piece of three-dimensional geometry, and this derivation makes that explicit: it shows that the expectation value of each Pauli operator is simply a Cartesian component of the Bloch vector, and that the variance along any axis is fixed entirely by how far the Bloch vector reaches along it. This is the calculation that turns abstract statistics into the pictures every quantum-computing practitioner carries in their head.
Step 1. Parametrize the most general qubit state — pure or mixed — by its Bloch vector: with , equality for pure states. Why: this is the unique way to write a density operator with unit trace, so no generality is lost and both pure and mixed states are handled at once.
Step 2. Compute the mean via the trace formula. . Using the Pauli identities and gives . Why: the Pauli matrices are traceless and orthonormal under the trace inner product, so the sum collapses to a single surviving term — each Pauli expectation just reads off the matching Bloch component.
Step 3. Compute the variance using . Then regardless of state, so . Why: because every Pauli squares to the identity, its second moment is always one, and the spread is controlled solely by the mean — the variance is large where the Bloch vector is short along that axis.
Step 4. Read the extremes. A pure state on the surface () pointing along axis has and : that axis is measured with certainty. The maximally mixed state (so ) gives and for every axis — maximal ignorance. Why: this recovers the certainty theorem geometrically and identifies the center of the sphere as the state of complete statistical uncertainty.
Limiting cases
How the mean and variance behave in the special cases that recur throughout quantum information:
| Case | Result | Meaning |
|---|---|---|
| Eigenstate | Deterministic outcome — the unique case of vanishing variance. | |
| Equal binary superposition | Maximal spread for a two-outcome observable. | |
| Pauli observable | Eigenvalues give always; spread set by Bloch length. | |
| Maximally mixed state | Mean is the unweighted average of eigenvalues; every axis maximally uncertain. | |
| Commuting pair | Robertson bound goes slack; a joint eigenbasis lets both be sharp at once. |
Worked examples
1 · Full statistics of a tilted qubit (fully worked)
A qubit is prepared in . Find , the three variances, the Bloch vector, and check whether the Robertson relation for and is saturated.
Step 1. Check normalization and read the amplitudes: , , and . Good. The -outcome probabilities are and .
Step 2. Expectation values. Using , : . For , the off-diagonal operator gives . Since the amplitudes are real, .
Step 3. Variances from , so and : so ; so ; so .
Step 4. The Bloch vector is with — confirming the state is pure, sitting on the sphere's surface in the -plane.
Step 5. Robertson for . The commutator is , so the bound is . The product of spreads is . The two are equal: the Robertson relation is saturated, — this state is a minimum-uncertainty state for the pair .
2 · Energy estimation and the shot budget (VQE-flavored)
A qubit Hamiltonian is (in units of some coupling). Find and in the state , and estimate how many measurement shots are needed to pin to a statistical error of .
Step 1. Mean. In we have and , so by linearity .
Step 2. Second moment. Expand . Because and anticommute, , leaving . Hence in any state, and the eigenvalues of are , consistent with .
Step 3. Variance. , so .
Step 4. Shot budget. The statistical error of the sample mean is ; setting this to the target gives shots. Had we instead wanted of the tilted state from Example 1 () to , the cost would be shots — the inverse-square scaling in precision is the defining expense of quantum estimation.
Physics of the portrait
The statistical reading of quantum mechanics — states as generators of probabilities, observables as Hermitian operators, and the average as — did not arrive fully formed. It was assembled between 1925 and 1932, and its most complete architect was John von Neumann, who gave the density operator and the trace formula their permanent home.
Origins · 1 minJohn von Neumann and how this was discovered
Von Neumann was the mathematician who turned the young, contradictory quantum theory of the 1920s into a rigorous structure on Hilbert space. Where Heisenberg's matrix mechanics and Schrödinger's wave mechanics looked like rival pictures, von Neumann proved them the same theory expressed in different bases, and in his 1932 masterwork Mathematische Grundlagen der Quantenmechanik he built the framework still taught today: pure states as unit vectors, observables as self-adjoint operators, and — crucially for this article — the density operator as the object encoding any preparation, pure or mixed, with expectation values given by the trace . He introduced the von Neumann entropy , which measures exactly the statistical uncertainty a variance only glimpses, and he formalized the measurement postulate that ties the abstract to laboratory averages. His insistence that a physical average must be a real, positive-normalized functional of the state is precisely why Hermiticity, positivity, and unit trace are non-negotiable. The same man co-founded game theory and designed the stored-program computer architecture that bears his name — but for quantum information his enduring gift is the operator-and-trace language in which every expectation value and variance is now written.
Going further
Texts. Nielsen & Chuang, Quantum Computation and Quantum Information, §2.2 and §2.4 · Preskill, Quantum Information Lecture Notes, Ch. 2 · Watrous, The Theory of Quantum Information, Ch. 2 · Wilde, Quantum Information Theory, Ch. 3 · Kitaev, Shen & Vyalyi, Classical and Quantum Computation, Ch. 9 · Mermin, Quantum Computer Science, Ch. 1. The key results in this article are: (1) the spectral reduction and reality from ; (2) the variance identity and the eigenstate equivalence; (3) the Bloch results , using , , ; (4) Example 1 — for , , , , , , , , and (Robertson saturated); (5) Example 2 — gives , , in , and shots at ; (6) the shot-noise scaling error .
Prerequisites. Observables and Hermitian Operators · The Born Rule · Dirac Bra-Ket Notation · Inner Product, Norm, and Normalization · The Measurement Postulate. Leads to. Density Operators · Projective Measurements · Pauli Operators · Pure versus Mixed States.
Ask the tutor: Ask me to work out the expectation value, variance, and Robertson bound for any state and observable you name — from a single tilted qubit to a multi-qubit Pauli Hamiltonian.
Why is the expectation value guaranteed to be a real number?
Because an observable is a Hermitian operator, , and that single property forces to equal its own complex conjugate. Concretely, , and a number equal to its conjugate is real. The same conclusion appears in the spectral picture: Hermitian operators have real eigenvalues, and the expectation value is a probability-weighted average of those real eigenvalues, so it must land somewhere between the smallest and largest of them. Non-Hermitian operators can have genuinely complex expectation values, which is exactly why they are excluded from the role of physical observables.
What is the difference between quantum uncertainty and classical measurement error?
They are different beasts that happen to share the symbol . Classical measurement error comes from imperfect instruments and shrinks as you build better ones. Quantum uncertainty is a property of the state itself: even with a perfect apparatus and infinitely many copies, a state that is not an eigenstate of will scatter its outcomes with irreducible spread . You can measure to arbitrary precision by taking more shots — the statistical error on the mean falls with — but the underlying spread of individual outcomes does not budge. Certainty is available only when the state is an eigenstate.
Why can't a single measurement tell me the expectation value?
A single measurement collapses the state and returns exactly one eigenvalue, chosen at random — say or for a Pauli operator. It never returns the average , which is not even in the spectrum. The expectation value is a statistical property of an ensemble, not a value any one measurement can carry. To estimate it you prepare identical copies, measure each, and average the readings; by the law of large numbers this sample mean converges to , with a residual statistical error of . This is why every quoted expectation value on real hardware comes with an error bar and a shot count.
How does the Robertson relation connect variances to the uncertainty principle?
The Robertson relation says the product of the two spreads cannot fall below half the magnitude of the commutator's expectation value. When two observables commute, the right-hand side is zero and both can be sharp simultaneously — they share an eigenbasis. When they don't commute, the bound is a hard floor: no state can make both variances arbitrarily small. For position and momentum, reproduces Heisenberg's . For qubit spins, gives , so a state polarized along pays maximal joint uncertainty in and — complementarity in one line.
When do the mixed-state trace formulas reduce to the pure-state sandwiches?
Always, whenever the density operator describes a pure state. A pure state is , and substituting this into and using the cyclic property of the trace gives — exactly equation (1). The variance formula reduces the same way. The trace form is strictly more general: it also handles statistical mixtures, subsystems of entangled states (via the reduced density operator), and noisy preparations, none of which can be written as a single ket. So think of as the master formula and as its pure-state special case, not the other way around.
Why does estimating an expectation value cost so many shots?
Because the statistical error on a sample mean falls only as , not . The sample mean of independent shots has variance , so its standard error is . To halve the error you must quadruple the shots; to gain one more decimal digit you need a hundredfold more measurements. This inverse-square scaling is the dominant cost in near-term algorithms like VQE, where a chemically useful energy can demand millions of shots per step. It is also why reducing pays off directly: every factor of two in variance is a factor of two in required runtime.