Expectation value (source code)

= Expectation value
{title2=$\langle A\rangle_\psi=\langle\psi|A|\psi\rangle$}

= Quantum expectation value
{synonym}

The <expectation value> of a <quantum observable> is the <expected value> of its measurement outcome <random variable> in a specified <quantum state>. It predicts the mean of outcomes from many identical <quantum state preparations>. It need not equal any one possible outcome: for a <spin one-half> particle, equal <probabilities> of $+\hbar/2$ and $-\hbar/2$ give mean zero even though zero is never an outcome of that <spin> component. Here $\hbar$ is the reduced <Planck constant>.

Let $A=A^\dagger$ be a <Hermitian operator> on a finite-dimensional <Hilbert space>, and let $|\psi\rangle$ be a normalized <pure state>, $\langle\psi|\psi\rangle=1$. The <spectral theorem> writes
$$
A=\sum_r a_rP_r,\qquad P_rP_s=\delta_{rs}P_r,\qquad \sum_rP_r=I.
$$
The $a_r$ are distinct real <eigenvalues>, $P_r$ are <orthogonal projections> onto their <eigenspaces>, and $I$ is the <identity operator>. For an ideal <projective measurement> of $A$, the <Born rule> and the <expectation value> give
$$
p_r=\langle\psi|P_r|\psi\rangle=\|P_r|\psi\rangle\|^2,\qquad
\sum_rp_r=1,\qquad
\langle A\rangle_\psi=\sum_ra_rp_r=\langle\psi|A|\psi\rangle.
$$
Thus the <expectation value> is a <probability>-weighted average of <eigenvalues>, including all vectors in a degenerate <eigenspace> in its $P_r$. In an <orthonormal eigenbasis>, $|\psi\rangle=\sum_jc_j|j\rangle$, this is $\sum_j a_j|c_j|^2$, where repeated $a_j$ are allowed. The weighted average lies between the smallest and largest <eigenvalues>; it can lie in a gap between them. The statistical meaning and operator expression are connected in this way in the authored treatment of average energies.<The Feynman Lectures on Physics, Volume III by Richard Feynman and others/Chapter 20: Operators>[The Feynman Lectures on Physics, Volume III, Chapter 20: Operators, §20–2, equations (20.11)–(20.20): outcome frequencies, weighted mean, and operator expectation]{ref}

If a nonzero <vector> $|v\rangle$ has not been normalized, use $\langle v|A|v\rangle/\langle v|v\rangle$; the denominator is essential. A <global phase> cancels between the bra and ket, so $|\psi\rangle$ and $e^{i\gamma}|\psi\rangle$ have the same <expectation value> and outcome <probabilities>.

The outcome <variance> measures the spread about this mean, whereas the <quantum uncertainty> is its <standard deviation>:
$$
\operatorname{Var}_\psi(A)=\sum_rp_r(a_r-\langle A\rangle_\psi)^2
=\langle A^2\rangle_\psi-\langle A\rangle_\psi^2
=(\Delta A)^2.
$$
For a <pure state>, zero <variance> means that $|\psi\rangle$ lies entirely in one <eigenspace>. That <eigenspace> need not be one-dimensional. Knowing only a mean generally does not determine the entire outcome <probability distribution>.

For a <mixed state>, the same formulas use its <density matrix> $\rho$, a <positive operator> with <trace> one:
$$
p_r=\operatorname{Tr}(\rho P_r),\qquad
\langle A\rangle_\rho=\operatorname{Tr}(\rho A),\qquad
\operatorname{Var}_\rho(A)=\operatorname{Tr}(\rho A^2)-\operatorname{Tr}(\rho A)^2.
$$
A <pure state> is the special case $\rho=|\psi\rangle\langle\psi|$. For a <quantum state ensemble> $\rho=\sum_kw_k\rho_k$, the <expectation value> is $\sum_kw_k\langle A\rangle_{\rho_k}$. This linearity is useful when preparations vary between trials; different <quantum state ensembles> can have the same <density matrix>.

These formulas require no operator-domain qualifications in finite dimension. For an unbounded <self-adjoint operator>, the <spectral theorem> instead gives a spectral <probability measure>; a finite mean requires an integrable absolute first moment, and finite <variance> requires a finite second moment. Writing $\langle\psi|A|\psi\rangle$ as an operator <inner product> additionally requires $|\psi\rangle$ in the <operator domain> of $A$. The <quadratic form of a positive quantum Hamiltonian> explains the useful wider form-domain version.