- Mathematics
Expectation Value
The average value of a quantum observable over many measurements, computed as the inner product of the quantum state with the observable applied to that state.
The expectation value of a quantum observable with respect to a quantum state is the statistical average of measurement outcomes when the observable is measured many times on identically prepared copies of the state. It is the central quantity computed by most variational quantum algorithms, including VQE and QAOA.
Mathematical definition
For a pure state and a Hermitian operator :
For a mixed state described by a density matrix :
If has eigenvalues with corresponding eigenstates , and the state is , then:
This is a weighted average of eigenvalues, weighted by the probability of measuring each one. The expectation value is not necessarily an eigenvalue itself; it can take any value in the range .
Measuring expectation values on quantum hardware
On a quantum computer, you cannot directly read out from a single measurement. Instead, you:
- Prepare the state
- Measure in the eigenbasis of
- Record the eigenvalue corresponding to the measurement outcome
- Repeat steps 1 through 3 many times (each repetition is a shot)
- Compute the sample mean of the recorded eigenvalues
The sample mean converges to as the number of shots increases, with statistical uncertainty scaling as .
For multi-qubit observables that are sums of Pauli terms (common in quantum chemistry and optimization), each Pauli term may require a different measurement basis. The total expectation value is:
where each is estimated separately. Grouping commuting Pauli terms to measure them simultaneously reduces the total number of circuits needed.
Role in variational algorithms
In VQE, the goal is to find parameters that minimize , where is the Hamiltonian of a physical system. The variational principle guarantees that this expectation value is always greater than or equal to the true ground state energy:
The classical optimizer adjusts to minimize the measured expectation value, using gradients computed via the parameter shift rule or finite differences.
Why it matters for learners
Expectation values bridge the gap between quantum mechanics and practical computation. Nearly every quantum algorithm produces its useful output as an expectation value rather than a single definitive measurement outcome. Understanding how expectation values are estimated, how many shots are needed for a given precision, and how to decompose complex observables into measurable terms is essential for working with real quantum hardware.