intermediate · Physics · Density Matrices & Mixed States
Expectation Values with ρ
The density operator turns expectation values into a single, basis-independent formula that works for
pure and mixed states alike.
The master formula
For any observable A (a Hermitian operator) and any state ρ,
⟨A⟩=Tr(ρA).
That one trace replaces the pure-state expression ⟨ψ∣A∣ψ⟩ and the ensemble average
∑ipi⟨ψi∣A∣ψi⟩ — both are special cases.
Why it works
Start from the ensemble average over the pure states making up ρ:
⟨A⟩=i∑pi⟨ψi∣A∣ψi⟩.
Use the cyclic property of the trace, ⟨ψi∣A∣ψi⟩=Tr(A∣ψi⟩⟨ψi∣).
Pull the sum inside the (linear) trace:
⟨A⟩=Tr(Ai∑pi∣ψi⟩⟨ψi∣)=Tr(Aρ)=Tr(ρA).
The last equality again uses cyclicity, Tr(Aρ)=Tr(ρA). The
result depends only on ρ, never on which ensemble produced it — exactly the ambiguity-free behavior
we wanted.
Reading off probabilities
Measurement probabilities are a special case. The probability of outcome k with projector
Pk=∣k⟩⟨k∣ is
p(k)=Tr(ρPk)=⟨k∣ρ∣k⟩=ρkk.
So the diagonal entries of ρ are precisely the computational-basis outcome probabilities — which is
why we called them populations.
Try it
For the mixed state ρ=(3/41/41/41/4), compute
⟨Z⟩=Tr(ρZ) with Z=(100−1).
The answer is the difference of the two populations.
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.