--- title: "Density operator" date: 2021-03-03 categories: - Physics - Quantum mechanics layout: "concept" --- In quantum mechanics, the expectation value of an observable $\expval{\hat{L}}$ represents the average result from measuring $\hat{L}$ on a large number of systems (an **ensemble**) prepared in the same state $\Ket{\Psi}$, known as a **pure ensemble** or (somewhat confusingly) **pure state**. But what if the systems of the ensemble are not all in the same state? To work with such a **mixed ensemble** or **mixed state**, the **density operator** $\hat{\rho}$ or **density matrix** (in a basis) is useful. It is defined as follows, where $p_n$ is the probability that the system is in state $\Ket{\Psi_n}$, i.e. the proportion of systems in the ensemble that are in state $\Ket{\Psi_n}$: $$\begin{aligned} \boxed{ \hat{\rho} = \sum_{n} p_n \Ket{\Psi_n} \Bra{\Psi_n} } \end{aligned}$$ Do not let is this form fool you into thinking that $\hat{\rho}$ is diagonal: $\Ket{\Psi_n}$ need not be basis vectors. Instead, the matrix elements of $\hat{\rho}$ are found as usual, where $\Ket{j}$ and $\Ket{k}$ are basis vectors: $$\begin{aligned} \matrixel{j}{\hat{\rho}}{k} = \sum_{n} p_n \Inprod{j}{\Psi_n} \Inprod{\Psi_n}{k} \end{aligned}$$ However, from the special case where $\Ket{\Psi_n}$ are indeed basis vectors, we can conclude that $\hat{\rho}$ is positive semidefinite and Hermitian, and that its trace (i.e. the total probability) is 100%: $$\begin{gathered} \boxed{ \hat{\rho} \ge 0 } \qquad \qquad \boxed{ \hat{\rho}^\dagger = \hat{\rho} } \qquad \qquad \boxed{ \mathrm{Tr}(\hat{\rho}) = 1 } \end{gathered}$$ These properties are preserved by all changes of basis. If the ensemble is purely $\Ket{\Psi}$, then $\hat{\rho}$ is given by a single state vector: $$\begin{aligned} \hat{\rho} = \Ket{\Psi} \Bra{\Psi} \end{aligned}$$ From the special case where $\Ket{\Psi}$ is a basis vector, we can conclude that for a pure ensemble, $\hat{\rho}$ is idempotent, which means that: $$\begin{aligned} \hat{\rho}^2 = \hat{\rho} \end{aligned}$$ This can be used to find out whether a given $\hat{\rho}$ represents a pure or mixed ensemble. Next, we define the ensemble average $\expval{\hat{O}}$ as the mean of the expectation values of $\hat{O}$ for states in the ensemble. We use the same notation as for the pure expectation value, since this is only a small extension of the concept to mixed ensembles. It is calculated like so: $$\begin{aligned} \boxed{ \expval{\hat{O}} = \sum_{n} p_n \matrixel{\Psi_n}{\hat{O}}{\Psi_n} = \mathrm{Tr}(\hat{\rho} \hat{O}) } \end{aligned}$$ To prove the latter, we write out the trace $\mathrm{Tr}$ as the sum of the diagonal elements, so: $$\begin{aligned} \mathrm{Tr}(\hat{\rho} \hat{O}) &= \sum_{j} \matrixel{j}{\hat{\rho} \hat{O}}{j} = \sum_{j} \sum_{n} p_n \Inprod{j}{\Psi_n} \matrixel{\Psi_n}{\hat{O}}{j} \\ &= \sum_{n} \sum_{j} p_n\matrixel{\Psi_n}{\hat{O}}{j} \Inprod{j}{\Psi_n} = \sum_{n} p_n \matrixel{\Psi_n}{\hat{O} \hat{I}}{\Psi_n} = \expval{\hat{O}} \end{aligned}$$ In both the pure and mixed cases, if the state probabilities $p_n$ are constant with respect to time, then the evolution of the ensemble obeys the **Von Neumann equation**: $$\begin{aligned} \boxed{ i \hbar \dv{\hat{\rho}}{t} = \comm{\hat{H}}{\hat{\rho}} } \end{aligned}$$ This equivalent to the Schrödinger equation: one can be derived from the other. We differentiate $\hat{\rho}$ with the product rule, and then substitute the opposite side of the Schrödinger equation: $$\begin{aligned} i \hbar \dv{\hat{\rho}}{t} &= i \hbar \dv{}{t}\sum_n p_n \Ket{\Psi_n} \Bra{\Psi_n} \\ &= \sum_n p_n \Big( i \hbar \dv{}{t}\Ket{\Psi_n} \Big) \Bra{\Psi_n} + \sum_n p_n \Ket{\Psi_n} \Big( i \hbar \dv{}{t}\Bra{\Psi_n} \Big) \\ &= \sum_n p_n \ket{\hat{H} n} \Bra{n} - \sum_n p_n \Ket{n} \bra{\hat{H} n} = \hat{H} \hat{\rho} - \hat{\rho} \hat{H} = \comm{\hat{H}}{\hat{\rho}} \end{aligned}$$