Computing Library › Quantum Foundations
Quantum Foundations

Expectation Values

An expectation value is the average measurement outcome of an observable, computed as a simple inner product or trace.

The average outcome

The expectation value of an observable A in a state is the average of its measurement outcomes over many identical repetitions. For a pure state it is = ; for a mixed state it is = Tr(A rho). It is a single real number when A is a Hermitian observable.

Why the formula works

Kronos motion — stat triple product

Expanding in A's eigenbasis gives sum_i a_i ||^2 — each eigenvalue weighted by its Born-rule probability. That is precisely the definition of a probability-weighted average. The compact inner-product form hides this sum but computes it exactly.

A worked qubit example

For |psi> = (|0>+|1>)/sqrt(2), the expectation of Z is = 0: outcomes +1 and -1 are equally likely, so they average to zero. The expectation of X is +1, because |+> is the +1 eigenstate of X. These three Pauli expectations are the Bloch vector components.

python
import numpy as np
psi=np.array([1,1])/np.sqrt(2)
Z=np.array([[1,0],[0,-1]]); X=np.array([[0,1],[1,0]])
print(np.vdot(psi,Z@psi).real)  # 0.0
print(np.vdot(psi,X@psi).real)  # 1.0

Estimating in practice

On hardware you cannot read an expectation value directly; you estimate it by measuring many copies and averaging the outcomes. The precision improves as one over the square root of the number of shots, so tight estimates need many repetitions. Reducing this measurement cost is a major concern in variational quantum algorithms.

Where it is used

Expectation values are the output of many near-term algorithms. Variational methods minimise the expectation of a Hamiltonian to find ground-state energies, a route explored for chemistry and materials — including the kind of many-body simulation relevant to fusion plasma modelling. The measured quantity is almost always an expectation value, not a single collapsed state.