Skip to content

Trace Rule for Expectation Values

For a density operator ρ\rho and an observable AA, the expectation value is

⟨A⟩ρ=Tr⁡(ρA).\langle A\rangle_\rho = \operatorname{Tr}(\rho A).

For a projective outcome aa with projector PaP_a,

p(a)=Tr⁡(ρPa).p(a) = \operatorname{Tr}(\rho P_a).

For a general measurement effect EiE_i,

p(i)=Tr⁡(ρEi).p(i) = \operatorname{Tr}(\rho E_i).

These are not three unrelated rules. The probability formulas are trace rules applied to effects, and the expectation formula is the probability-weighted average of the outcomes of an observable. Together they extend the pure-state Born rule to pure states, randomized ensembles, open subsystems, and general measurements.

In a finite-dimensional Hilbert space, the trace of an operator XX is

Tr⁡X=∑n⟨n∣X∣n⟩,\operatorname{Tr}X = \sum_n \langle n\rvert X\lvert n\rangle,

where {∣n⟩}\{\lvert n\rangle\} is any orthonormal basis.

Let another orthonormal basis be related by

∣m′⟩=∑nUnm∣n⟩\lvert m'\rangle = \sum_n U_{nm}\lvert n\rangle

for a unitary matrix UU. Then

∑m⟨m′∣X∣m′⟩=∑m,n,kUnm∗Ukm⟨n∣X∣k⟩=∑n,kδnk⟨n∣X∣k⟩=∑n⟨n∣X∣n⟩.\begin{aligned} \sum_m \langle m'\rvert X\lvert m'\rangle &= \sum_{m,n,k} U_{nm}^*U_{km} \langle n\rvert X\lvert k\rangle \\ &= \sum_{n,k} \delta_{nk} \langle n\rvert X\lvert k\rangle \\ &= \sum_n \langle n\rvert X\lvert n\rangle. \end{aligned}

The trace may be calculated in any convenient basis without changing the answer.

For finite matrices,

Tr⁡(XY)=Tr⁡(YX),\operatorname{Tr}(XY) = \operatorname{Tr}(YX),

and

Tr⁡(XYZ)=Tr⁡(ZXY)=Tr⁡(YZX).\operatorname{Tr}(XYZ) = \operatorname{Tr}(ZXY) = \operatorname{Tr}(YZX).

Cyclicity permits cyclic rotations, not arbitrary reordering. In general,

Tr⁡(XYZ)≠Tr⁡(XZY).\operatorname{Tr}(XYZ) \ne \operatorname{Tr}(XZY).

This distinction matters when observables and states do not commute.

For any vectors ∣u⟩,∣v⟩\lvert u\rangle,\lvert v\rangle and operator AA,

Tr⁡(∣u⟩⟨v∣A)=⟨v∣A∣u⟩.\operatorname{Tr} \left( \lvert u\rangle\langle v\rvert A \right) = \langle v\rvert A\lvert u\rangle.

To verify it, insert an orthonormal basis:

Tr⁡(∣u⟩⟨v∣A)=∑n⟨n∣u⟩⟨v∣A∣n⟩=⟨v∣A(∑n∣n⟩⟨n∣)∣u⟩=⟨v∣A∣u⟩.\begin{aligned} &\operatorname{Tr} \left( \lvert u\rangle\langle v\rvert A \right) \\ &= \sum_n \langle n\vert u\rangle \langle v\rvert A\lvert n\rangle \\ &= \langle v\rvert A \left( \sum_n \lvert n\rangle\langle n\rvert \right) \lvert u\rangle \\ &= \langle v\rvert A\lvert u\rangle. \end{aligned}

This identity is the cleanest bridge between trace notation and bra–ket notation.

A normalized pure state has

ρψ=∣ψ⟩⟨ψ∣.\rho_\psi = \lvert\psi\rangle\langle\psi\rvert.

The rank-one identity gives

Tr⁡(ρψA)=Tr⁡(∣ψ⟩⟨ψ∣A)=⟨ψ∣A∣ψ⟩.\begin{aligned} \operatorname{Tr}(\rho_\psi A) &= \operatorname{Tr} \left( \lvert\psi\rangle\langle\psi\rvert A \right) \\ &= \langle\psi\rvert A\lvert\psi\rangle. \end{aligned}

The density-operator rule therefore reproduces the familiar pure-state expectation value exactly.

For a rank-one outcome

Pϕ=∣ϕ⟩⟨ϕ∣,P_\phi = \lvert\phi\rangle\langle\phi\rvert,

the same identity gives

Tr⁡(ρψPϕ)=∣⟨ϕ∣ψ⟩∣2.\begin{aligned} \operatorname{Tr}(\rho_\psi P_\phi) &= \lvert \langle\phi\vert\psi\rangle \rvert^2. \end{aligned}

This is the ordinary Born probability.

In a chosen orthonormal basis,

Tr⁡(ρA)=∑i(ρA)ii=∑i,jρijAji.\begin{aligned} \operatorname{Tr}(\rho A) &= \sum_i (\rho A)_{ii} \\ &= \sum_{i,j} \rho_{ij}A_{ji}. \end{aligned}

This formula is useful for direct matrix calculations. It also shows that off-diagonal entries of ρ\rho contribute whenever AA has matching off-diagonal matrix elements.

If the basis diagonalizes AA,

A=∑aaPa,A = \sum_a aP_a,

then

⟨A⟩ρ=∑aaTr⁡(ρPa).\langle A\rangle_\rho = \sum_a a\operatorname{Tr}(\rho P_a).

For a nondegenerate eigenbasis, this becomes

⟨A⟩ρ=∑aa ρaa.\langle A\rangle_\rho = \sum_a a\,\rho_{aa}.

Only in the measurement eigenbasis may one read the outcome probabilities directly from the diagonal entries.

If

ρ=∑ipi∣ψi⟩⟨ψi∣,\rho = \sum_i p_i \lvert\psi_i\rangle\langle\psi_i\rvert,

then linearity gives

Tr⁡(ρA)=∑ipiTr⁡(∣ψi⟩⟨ψi∣A)=∑ipi⟨ψi∣A∣ψi⟩.\begin{aligned} \operatorname{Tr}(\rho A) &= \sum_i p_i \operatorname{Tr} \left( \lvert\psi_i\rangle\langle\psi_i\rvert A \right) \\ &= \sum_i p_i \langle\psi_i\rvert A\lvert\psi_i\rangle. \end{aligned}

The trace rule combines quantum expectation within each preparation branch with the classical average over branches. Different ensembles with the same ρ\rho necessarily give the same expectation for every AA.

Let the spectral decomposition of a Hermitian observable be

A=∑aaPa.A=\sum_a aP_a.

The outcome probabilities are

p(a)=Tr⁡(ρPa),p(a) = \operatorname{Tr}(\rho P_a),

and therefore

∑aa p(a)=∑aaTr⁡(ρPa)=Tr⁡(ρA).\begin{aligned} \sum_a a\,p(a) &= \sum_a a\operatorname{Tr}(\rho P_a) \\ &= \operatorname{Tr}(\rho A). \end{aligned}

The expectation is an ensemble average over possible outcomes. It need not itself be an eigenvalue or a possible result of one trial.

For any function ff defined on the spectrum,

⟨f(A)⟩ρ=Tr⁡[ρf(A)]=∑af(a)p(a).\langle f(A)\rangle_\rho = \operatorname{Tr} \left[ \rho f(A) \right] = \sum_a f(a)p(a).

In particular,

⟨An⟩ρ=Tr⁡(ρAn),\langle A^n\rangle_\rho = \operatorname{Tr}(\rho A^n),

and the variance is

Var⁡ρ(A)=⟨(A−⟨A⟩ρI)2⟩ρ=Tr⁡(ρA2)−[Tr⁡(ρA)]2.\begin{aligned} \operatorname{Var}_\rho(A) &= \left\langle \left( A-\langle A\rangle_\rho I \right)^2 \right\rangle_\rho \\ &= \operatorname{Tr}(\rho A^2) - \left[ \operatorname{Tr}(\rho A) \right]^2. \end{aligned}

If A=A†A=A^\dagger, then Tr⁡(ρA)\operatorname{Tr}(\rho A) is real:

Tr⁡(ρA)∗=Tr⁡[(ρA)†]=Tr⁡(Aρ)=Tr⁡(ρA).\begin{aligned} \operatorname{Tr}(\rho A)^* &= \operatorname{Tr} \left[ (\rho A)^\dagger \right] \\ &= \operatorname{Tr}(A\rho) \\ &= \operatorname{Tr}(\rho A). \end{aligned}

If the spectrum lies between amin⁡a_{\min} and amax⁡a_{\max}, then

amin⁡≤⟨A⟩ρ≤amax⁡.a_{\min} \le \langle A\rangle_\rho \le a_{\max}.

This follows because the expectation is a convex average of the eigenvalues. Likewise,

Var⁡ρ(A)≥0\operatorname{Var}_\rho(A)\ge0

because it is the expectation of a positive operator.

These inequalities are powerful error checks. An answer outside the spectral range or a negative variance signals a calculation or normalization mistake.

For projectors satisfying

PaPb=δabPa,∑aPa=I,P_aP_b=\delta_{ab}P_a, \qquad \sum_a P_a=I,

the trace rule gives

p(a)=Tr⁡(ρPa).p(a)=\operatorname{Tr}(\rho P_a).

The probabilities are nonnegative because both ρ\rho and PaP_a are positive. They are normalized:

∑ap(a)=Tr⁡(ρ∑aPa)=Tr⁡ρ=1.\begin{aligned} \sum_a p(a) &= \operatorname{Tr} \left( \rho\sum_aP_a \right) \\ &= \operatorname{Tr}\rho =1. \end{aligned}

For a degenerate outcome, PaP_a projects onto the full eigenspace. The probability is the sum of the density-matrix populations in any orthonormal basis of that eigenspace.

A general POVM has effects

Ei≥0,∑iEi=I.E_i\ge0, \qquad \sum_iE_i=I.

Its outcome probabilities are

p(i)=Tr⁡(ρEi).p(i)=\operatorname{Tr}(\rho E_i).

To see nonnegativity directly, write

Tr⁡(ρEi)=Tr⁡(ρ1/2Eiρ1/2)≥0,\begin{aligned} \operatorname{Tr}(\rho E_i) &= \operatorname{Tr} \left( \rho^{1/2}E_i\rho^{1/2} \right) \\ &\ge0, \end{aligned}

because ρ1/2Eiρ1/2\rho^{1/2}E_i\rho^{1/2} is positive. Completeness again gives

∑ip(i)=1.\sum_i p(i)=1.

The effects determine outcome probabilities. They do not alone determine the conditional post-measurement states; that requires an instrument. See POVMs: First Encounter and Generalized Measurements Overview.

For a joint state ρAB\rho_{AB}, an observable local to AA is

MA⊗IB.M_A\otimes I_B.

If

ρA=Tr⁡BρAB,\rho_A = \operatorname{Tr}_B\rho_{AB},

then

Tr⁡AB[ρAB(MA⊗IB)]=Tr⁡A(ρAMA).\begin{aligned} &\operatorname{Tr}_{AB} \left[ \rho_{AB}(M_A\otimes I_B) \right] \\ &\qquad= \operatorname{Tr}_A(\rho_A M_A). \end{aligned}

This equality is the defining operational property of the partial trace: the reduced state reproduces every trace-rule prediction local to the subsystem. Correlation observables such as A⊗BA\otimes B still require the joint state.

See Reduced Density Matrices for the construction and Subsystems and Local Observables for the operator embedding.

Write a general qubit density matrix as

ρ=(pcc∗1−p).\rho = \begin{pmatrix} p&c\\ c^*&1-p \end{pmatrix}.

Using the Pauli matrices,

⟨X⟩ρ=2Re⁡c,⟨Y⟩ρ=−2Im⁡c,⟨Z⟩ρ=2p−1.\begin{aligned} \langle X\rangle_\rho &= 2\operatorname{Re}c, \\ \langle Y\rangle_\rho &= -2\operatorname{Im}c, \\ \langle Z\rangle_\rho &= 2p-1. \end{aligned}

The ZZ expectation depends on the populations, while XX and YY expose the real and imaginary parts of the coherence.

Equivalently, if

ρ=12(I+r⋅σ)\rho = \frac12 \left( I+\mathbf r\cdot\boldsymbol\sigma \right)

and

A=a0I+a⋅σ,A = a_0I+\mathbf a\cdot\boldsymbol\sigma,

then

⟨A⟩ρ=a0+r⋅a.\langle A\rangle_\rho = a_0+\mathbf r\cdot\mathbf a.

This compact formula follows from Tr⁡(σiσj)=2δij\operatorname{Tr}(\sigma_i\sigma_j)=2\delta_{ij}.

For 0≤η≤10\le\eta\le1, define two effects

E±=12(I±ηZ).E_\pm = \frac12 \left( I\pm\eta Z \right).

They are positive and satisfy E++E−=IE_++E_-=I. If the state’s Bloch component is

rz=Tr⁡(ρZ),r_z=\operatorname{Tr}(\rho Z),

then

p(±)=12(1±ηrz).p(\pm) = \frac12 \left( 1\pm\eta r_z \right).

At η=1\eta=1, this is the projective ZZ measurement. At η=0\eta=0, both outcomes have probability 1/21/2 regardless of the state. Intermediate values model a noisy or unsharp binary measurement at the level of effects.

In an infinite-dimensional Hilbert space, a density operator is trace class. If AA is bounded, then ρA\rho A is trace class and Tr⁡(ρA)\operatorname{Tr}(\rho A) is well-defined.

Unbounded observables require more care. The expectation exists only when the state has the required finite moment and the operator-domain conditions are satisfied. Formally writing Tr⁡(ρA)\operatorname{Tr}(\rho A) does not guarantee convergence. Cyclic trace manipulations also require the relevant products to be trace class.

The representation-independent formulation is developed in States as Positive Linear Functionals.

For a finite-dimensional expectation or probability:

  1. Confirm that ρ\rho is positive and has trace one.
  2. Put ρ\rho and the observable or effect in the same basis.
  3. Check that the operators act on the same Hilbert space.
  4. Multiply in the written order and take the trace.
  5. Use a diagonal basis when it simplifies the calculation.
  6. For local quantities, either include the identity factor or use the reduced state.
  7. Check that probabilities lie in [0,1][0,1] and sum to one.
  8. Check that Hermitian expectations are real and lie in the spectral range.
  9. Distinguish an expectation value from a possible single-shot outcome.
  10. For unbounded operators, verify existence rather than relying on formal cyclicity.
  • Treating Tr⁡(ρA)\operatorname{Tr}(\rho A) as an operator instead of a number.
  • Assuming the expectation must be an eigenvalue.
  • Reading diagonal entries as probabilities before choosing the measurement basis.
  • Reordering factors inside a trace rather than rotating them cyclically.
  • Replacing Tr⁡(ρA2)\operatorname{Tr}(\rho A^2) with Tr⁡(ρA)2\operatorname{Tr}(\rho A)^2.
  • Using an arbitrary positive operator as a POVM effect without checking the complete set sums to identity.
  • Confusing POVM probabilities with a post-measurement update rule.
  • Dropping the identity in a local observable on a composite space.
  • Using a reduced state to compute a joint correlation.
  • Applying finite-dimensional cyclicity to unbounded products without checking trace-class conditions.

Born Rule develops the probability postulate. Expectation Values focuses on physical interpretation in state-vector language. Variance and Standard Deviation develops moments and uncertainty.

Density-Matrix Formulation collects the postulates in density-operator language. A compact lookup is available at Reference Formula: Expectation Value.

  • J. von Neumann, Mathematical Foundations of Quantum Mechanics, Princeton University Press (1955), Ch. IV.
  • R. Shankar, Principles of Quantum Mechanics, 2nd ed., Springer (1994), Chs. 1 and 4.
  • L. E. Ballentine, Quantum Mechanics: A Modern Development, 2nd ed., World Scientific (2014), Ch. 3.
  • M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 10th anniversary ed., Cambridge University Press (2010), Secs. 2.2 and 2.4.
  • J. Watrous, The Theory of Quantum Information, Cambridge University Press (2018), Ch. 2.
  • A. S. Holevo, Probabilistic and Statistical Aspects of Quantum Theory, 2nd ed., Edizioni della Normale (2011), Ch. 2.
  1. Prove the rank-one trace identity
Tr⁡(∣u⟩⟨v∣A)=⟨v∣A∣u⟩.\operatorname{Tr} \left( \lvert u\rangle\langle v\rvert A \right) = \langle v\rvert A\lvert u\rangle.
Solution

Insert an orthonormal basis:

Tr⁡(∣u⟩⟨v∣A)=∑n⟨n∣u⟩⟨v∣A∣n⟩=⟨v∣A(∑n∣n⟩⟨n∣)∣u⟩=⟨v∣A∣u⟩.\begin{aligned} &\operatorname{Tr} \left( \lvert u\rangle\langle v\rvert A \right) \\ &= \sum_n \langle n\vert u\rangle \langle v\rvert A\lvert n\rangle \\ &= \langle v\rvert A \left( \sum_n \lvert n\rangle\langle n\rvert \right) \lvert u\rangle \\ &= \langle v\rvert A\lvert u\rangle. \end{aligned}
  1. Starting from matrices, show that
Tr⁡(ρA)=∑i,jρijAji.\operatorname{Tr}(\rho A) = \sum_{i,j}\rho_{ij}A_{ji}.
Solution

By matrix multiplication,

(ρA)ii=∑jρijAji.(\rho A)_{ii} = \sum_j\rho_{ij}A_{ji}.

Summing the diagonal entries gives

Tr⁡(ρA)=∑i(ρA)ii=∑i,jρijAji.\operatorname{Tr}(\rho A) = \sum_i(\rho A)_{ii} = \sum_{i,j}\rho_{ij}A_{ji}.
  1. Let AA have smallest and largest eigenvalues amin⁡,amax⁡a_{\min},a_{\max}. Prove that every density operator obeys
amin⁡≤Tr⁡(ρA)≤amax⁡.a_{\min} \le \operatorname{Tr}(\rho A) \le a_{\max}.
Solution

With A=∑aaPaA=\sum_a aP_a, define

p(a)=Tr⁡(ρPa).p(a)=\operatorname{Tr}(\rho P_a).

These probabilities are nonnegative and sum to one. Therefore

Tr⁡(ρA)=∑aa p(a)\operatorname{Tr}(\rho A) = \sum_a a\,p(a)

is a convex average of the eigenvalues and lies between their minimum and maximum.

  1. Show that
Var⁡ρ(A)=Tr⁡(ρA2)−Tr⁡(ρA)2\operatorname{Var}_\rho(A) = \operatorname{Tr}(\rho A^2) - \operatorname{Tr}(\rho A)^2

is nonnegative.

Solution

Let

ΔA=A−⟨A⟩ρI.\Delta A = A-\langle A\rangle_\rho I.

Because (ΔA)2(\Delta A)^2 is positive,

Tr⁡[ρ(ΔA)2]≥0.\operatorname{Tr} \left[ \rho(\Delta A)^2 \right] \ge0.

Expanding and using Tr⁡ρ=1\operatorname{Tr}\rho=1 gives

Tr⁡[ρ(ΔA)2]=Tr⁡(ρA2)−Tr⁡(ρA)2.\operatorname{Tr} \left[ \rho(\Delta A)^2 \right] = \operatorname{Tr}(\rho A^2) - \operatorname{Tr}(\rho A)^2.

Thus the variance is nonnegative.

  1. Prove that a POVM {Ei}\{E_i\} gives normalized, nonnegative probabilities.
Solution

For each effect,

p(i)=Tr⁡(ρ1/2Eiρ1/2)≥0p(i) = \operatorname{Tr} \left( \rho^{1/2}E_i\rho^{1/2} \right) \ge0

because the operator inside the trace is positive. Completeness gives

∑ip(i)=Tr⁡(ρ∑iEi)=Tr⁡ρ=1.\begin{aligned} \sum_i p(i) &= \operatorname{Tr} \left( \rho\sum_iE_i \right) \\ &= \operatorname{Tr}\rho =1. \end{aligned}
  1. For
ρ=(pcc∗1−p),\rho = \begin{pmatrix} p&c\\ c^*&1-p \end{pmatrix},

derive the three Pauli expectations.

Solution

Direct multiplication gives

Tr⁡(ρX)=c+c∗=2Re⁡c,Tr⁡(ρY)=i(c−c∗)=−2Im⁡c,Tr⁡(ρZ)=p−(1−p)=2p−1.\begin{aligned} \operatorname{Tr}(\rho X) &= c+c^* = 2\operatorname{Re}c, \\ \operatorname{Tr}(\rho Y) &= i(c-c^*) = -2\operatorname{Im}c, \\ \operatorname{Tr}(\rho Z) &= p-(1-p) = 2p-1. \end{aligned}

The signs agree with the convention

Y=(0−ii0).Y = \begin{pmatrix} 0&-i\\ i&0 \end{pmatrix}.
  1. For the unsharp effects
E±=12(I±ηZ),E_\pm = \frac12 \left( I\pm\eta Z \right),

derive p(±)p(\pm) and check the limits η=0\eta=0 and η=1\eta=1.

Solution

Using Tr⁡ρ=1\operatorname{Tr}\rho=1 and rz=Tr⁡(ρZ)r_z=\operatorname{Tr}(\rho Z),

p(±)=Tr⁡(ρE±)=12(1±ηrz).\begin{aligned} p(\pm) &= \operatorname{Tr}(\rho E_\pm) \\ &= \frac12 \left( 1\pm\eta r_z \right). \end{aligned}

At η=0\eta=0, both probabilities are 1/21/2. At η=1\eta=1,

p(±)=12(1±rz),p(\pm) = \frac12 \left( 1\pm r_z \right),

which are the projective ZZ-measurement probabilities.

  1. Verify the reduced-state identity in a product basis:
Tr⁡AB[ρAB(MA⊗IB)]=Tr⁡A(ρAMA).\begin{aligned} &\operatorname{Tr}_{AB} \left[ \rho_{AB}(M_A\otimes I_B) \right] \\ &\qquad= \operatorname{Tr}_A(\rho_A M_A). \end{aligned}
Solution

Write the joint matrix elements as

ρiμ,jν=⟨i,μ∣ρAB∣j,ν⟩.\rho_{i\mu,j\nu} = \langle i,\mu\rvert \rho_{AB} \lvert j,\nu\rangle.

Then

Tr⁡AB[ρAB(MA⊗IB)]=∑i,j,μρiμ,jμ(MA)ji.\begin{aligned} &\operatorname{Tr}_{AB} \left[ \rho_{AB}(M_A\otimes I_B) \right] \\ &= \sum_{i,j,\mu} \rho_{i\mu,j\mu} (M_A)_{ji}. \end{aligned}

The reduced-state entries are

(ρA)ij=∑μρiμ,jμ.(\rho_A)_{ij} = \sum_\mu \rho_{i\mu,j\mu}.

Substitution gives

∑i,j(ρA)ij(MA)ji=Tr⁡A(ρAMA).\sum_{i,j} (\rho_A)_{ij}(M_A)_{ji} = \operatorname{Tr}_A(\rho_A M_A).