Solution (source code)

= Solution

A <density operator> describes both a <quantum state> prepared in one <pure state> and a statistical preparation whose members occupy different <pure states>. If normalized vectors $|\psi_i\rangle$ occur with <probabilities> $p_i$, define
$$
\rho=\sum_i p_i|\psi_i\rangle\langle\psi_i|,\qquad
p_i\geq0,\quad\sum_i p_i=1.
$$
The resulting operator is <Hermitian>, <positive semidefinite> and has <trace> one. Positivity follows because $\langle v|\rho|v\rangle=\sum_i p_i|\langle\psi_i|v\rangle|^2\geq0$. Conversely, the <spectral theorem> gives such a representation of any finite-dimensional operator with these properties, using its <eigenvectors> and <eigenvalues>. The <matrix> representing $\rho$ depends on the chosen <basis>; the operator and its predictions do not.

\b[One operator gives every measurement <probability>.] For a <projective measurement> with <orthogonal projections> $\Pi_a$ and outcomes $a$,
$$
P(a)=\operatorname{Tr}(\rho\Pi_a),\qquad
\langle A\rangle=\operatorname{Tr}(\rho A),\qquad
(\Delta A)^2=\operatorname{Tr}(\rho A^2)-\langle A\rangle^2.
$$
For example, the first formula follows by averaging $\langle\psi_i|\Pi_a|\psi_i\rangle$ over the preparation. The <trace> expression is <basis> independent. A general measurement replaces $\Pi_a$ by positive measurement effects that sum to the identity, without changing the <probability> formula. Thus $\rho$ specifies the statistics accessible to measurements on that system.

The distinction between pure and <mixed states> is especially transparent in the <eigenvalues>. A <pure state> has $\rho=|\psi\rangle\langle\psi|$, $\rho^2=\rho$, and $\operatorname{Tr}\rho^2=1$. A <mixed state> has at least two positive <eigenvalues> and $\operatorname{Tr}\rho^2<1$. For a <qubit>,
$$
\rho=\tfrac12(I+\mathbf r\cdot\boldsymbol\sigma),\qquad
|\mathbf r|\leq1,\qquad
\operatorname{Tr}\rho^2=\tfrac12(1+|\mathbf r|^2).
$$
<pure states> lie on the <Bloch sphere>; <mixed states> lie inside the <Bloch ball>. The maximally mixed <qubit> $\rho=I/2$ can be prepared by choosing equally between the two $z$ spin <eigenstates>, or equally between the two $x$ spin <eigenstates>. These ensembles are different preparation procedures but give the same <density operator>. No measurement on the resulting <qubit> alone can identify which ensemble was used.

<quantum coherence> must be distinguished from merely having two populated levels. In the $z$ <basis>, the state $|+x\rangle$ has
$$
\rho_{+x}=\frac12\begin{pmatrix}1&1\\1&1\end{pmatrix},
\qquad
\rho_{\rm mix}=\frac12\begin{pmatrix}1&0\\0&1\end{pmatrix}.
$$
Both give equal <probabilities> for the two $z$ outcomes. A measurement along $x$ gives the positive result with <probability> one for the first state and one half for the second. The off-diagonal entries encode the relative phase information responsible for this difference. Whether a <matrix> entry is off diagonal is <basis> dependent; <purity> is not.

For an isolated system, each component evolves with the same unitary time-evolution operator. Therefore $\rho(t)=U(t)\rho(0)U^\dagger(t)$ and
$$
\boxed{i\hbar\dot\rho=[H,\rho]}.
$$
Unitary evolution preserves the <eigenvalues> and <purity> of $\rho$. A <density operator> commuting with a time-independent <Hamiltonian operator> is stationary. A <thermal equilibrium> example is the <canonical ensemble> $\rho_\beta=e^{-\beta H}/Z$, where $Z=\operatorname{Tr}(e^{-\beta H})$ and $\beta=1/(k_{\rm B}T)$. <expectation values> then reproduce quantum <statistical mechanics> without assigning the system a definite <energy eigenstate> on every run.

A <mixed state> can also arise without classical randomness in the joint preparation. For a <bipartite quantum system>, the <reduced density operator> $\rho_A=\operatorname{Tr}_B\rho_{AB}$ gives every measurement <probability> accessible to subsystem $A$. For the <Bell state> $(|00\rangle+|11\rangle)/\sqrt2$, the joint state is pure, whereas $\rho_A=I/2$. Its local mixedness reflects <entanglement> with the inaccessible system; the <partial trace> discards <correlations> that matter for joint measurements. More generally, interaction with an environment can suppress off-diagonal entries in a selected <basis>, producing <decoherence> while the combined system still evolves unitarily.

Finally, state evolution conditional on a measurement outcome differs from isolated evolution. An ideal <projective measurement> yielding $a$ updates the state by the <Lüders rule> $\rho\mapsto\Pi_a\rho\Pi_a/P(a)$. Discarding the outcome gives $\sum_a\Pi_a\rho\Pi_a$, which generally removes coherence between different <eigenspaces>. The <Von Neumann entropy> $-\operatorname{Tr}(\rho\ln\rho)$ quantifies mixedness: it vanishes for <pure states> and reaches $\ln d$ for $I/d$. Multiplying by $k_{\rm B}$ gives thermodynamic <entropy> units. These uses make the <density operator> a common language for preparation uncertainty, measurement, thermal states and entangled subsystems, while retaining their distinct physical origins.