|q⟩ Bad Qubits

beginner · Physics · Math Foundations: Calculus, Probability & Statistics

Expectation Value

When you measure a quantum system many times, you do not always get the same answer — you sample from a probability distribution. The single number that best summarises that distribution is its expectation value (also called the mean or average), written X\langle X \rangle.

Definition for a discrete distribution

Let XX be a random variable that can take values x1,x2,,xnx_1, x_2, \ldots, x_n with probabilities p1,p2,,pnp_1, p_2, \ldots, p_n (where pi0p_i \ge 0 and ipi=1\sum_i p_i = 1). The expectation value is

X=i=1nxipi.\langle X \rangle = \sum_{i=1}^{n} x_i \, p_i.

Every term is an outcome weighted by how likely it is; summing all weighted outcomes gives the long-run average you would observe over many trials.

A worked example

Consider a fair coin that pays +1+1 for heads and 1-1 for tails, each with probability 1/21/2:

X=(+1)12+(1)12=0.\langle X \rangle = (+1)\cdot\tfrac{1}{2} + (-1)\cdot\tfrac{1}{2} = 0.

The expectation value is 00 even though 00 is not a possible outcome — the mean describes the centre of the distribution, not a guaranteed result.

Why it matters in quantum mechanics

In quantum mechanics, a measurement of an observable A^\hat{A} on a state ψ|\psi\rangle produces one of the eigenvalues aka_k, each with probability pk=akψ2p_k = |\langle a_k|\psi\rangle|^2. The expectation value of A^\hat{A} is therefore

A^=kakpk=ψA^ψ,\langle \hat{A} \rangle = \sum_k a_k \, p_k = \langle\psi|\hat{A}|\psi\rangle,

where the second equality is the standard inner-product form derived by substituting the spectral decomposition of A^\hat{A}. This quantity predicts the average of many identical measurements; it is one of the most-used numbers in quantum physics.

Try it

This is a numerical exercise — return a number. A fair six-sided die has outcomes 1,2,3,4,5,61, 2, 3, 4, 5, 6, each with probability 1/61/6. What is the expectation value of a single roll?

Deriving it directly:

X=16(1+2+3+4+5+6)=216=3.5.\langle X \rangle = \frac{1}{6}(1 + 2 + 3 + 4 + 5 + 6) = \frac{21}{6} = 3.5.
Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.