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 =
Why the formula works
Expanding
A worked qubit example
For |psi> = (|0>+|1>)/sqrt(2), the expectation of Z is
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.