|q⟩ Bad Qubits

intermediate · Physics · Density Matrices & Mixed States

Properties of ρ

A matrix qualifies as a density operator only if it satisfies three conditions. These conditions are exactly what guarantees it produces sensible probabilities for every possible measurement.

The three defining properties

A density operator ρ\rho on a Hilbert space must be:

  1. Unit trace: Tr(ρ)=1\operatorname{Tr}(\rho) = 1. The trace collects the total probability, so it must equal one.
  2. Hermitian: ρ=ρ\rho = \rho^{\dagger}. Equivalently ρij=ρji\rho_{ij} = \rho_{ji}^*. Hermiticity guarantees real eigenvalues and real expectation values for observables.
  3. Positive semidefinite: ϕρϕ0\langle\phi|\rho|\phi\rangle \ge 0 for every ϕ|\phi\rangle. Equivalently, all eigenvalues of ρ\rho are 0\ge 0. This makes every measurement probability non-negative.

Conversely, any matrix with these three properties is the density operator of some physical state. This is the complete characterization.

Why each property is forced

Write ρ=ipiψiψi\rho = \sum_i p_i |\psi_i\rangle\langle\psi_i|. The probability of obtaining outcome ϕ|\phi\rangle is ϕρϕ=ipiϕψi2\langle\phi|\rho|\phi\rangle = \sum_i p_i |\langle\phi|\psi_i\rangle|^2. Because each pi0p_i \ge 0 and each ϕψi20|\langle\phi|\psi_i\rangle|^2 \ge 0, the sum is non-negative — positivity. Each ψiψi|\psi_i\rangle\langle\psi_i| is Hermitian and the pip_i are real, so ρ\rho is Hermitian. And Tr(ψiψi)=ψiψi=1\operatorname{Tr}\big(|\psi_i\rangle\langle\psi_i|\big) = \langle\psi_i|\psi_i\rangle = 1, so Tr(ρ)=ipi=1\operatorname{Tr}(\rho) = \sum_i p_i = 1.

The eigenvalue picture

Because ρ\rho is Hermitian, the spectral theorem diagonalizes it:

ρ=kλkkk,λk0,kλk=1.\rho = \sum_k \lambda_k\, |k\rangle\langle k|, \qquad \lambda_k \ge 0, \quad \sum_k \lambda_k = 1.

The eigenvalues {λk}\{\lambda_k\} are themselves a probability distribution. So every density operator is a mixture of orthonormal pure states (its eigenvectors) with weights given by its eigenvalues — its spectral decomposition. This is the canonical, ambiguity-free ensemble hiding inside ρ\rho.

Try it

Build ρ=1200+12++\rho = \tfrac12|0\rangle\langle0| + \tfrac12|+\rangle\langle+| and check all three properties. Return true only if the trace is 11, the matrix is Hermitian, and both eigenvalues are non-negative.

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.