Numerical range (source code)

= Numerical range
{wiki}

The <numerical range> collects the possible <expectation values> of a <linear operator> on unit vectors. For a general operator it lies in the <complex plane>; for a <Hermitian operator> the values are real.

The <numerical range> of an operator $A$ is
$$
N(A)=\{\langle\psi|A|\psi\rangle:\|\psi\|=1\}.
$$

For $A=\operatorname{diag}(0,1)$ and $|\psi\rangle=a|0\rangle+b|1\rangle$, the value is $|b|^2$. Every point in $[0,1]$ is therefore attained, although the only <eigenvalues> are $0$ and $1$. This example separates an <expectation value> from a possible sharp <quantum measurement> outcome. It also explains why <numerical range> is useful in <unitary gate discrimination>: a zero overlap can arise from cancellation among different <eigenvalue> phases.