|q⟩ Bad Qubits

advanced · Physics · Quantum Information & von Neumann Entropy

Von Neumann Entropy

The classical Shannon entropy measures the uncertainty in a probability distribution. A quantum state is described not by a distribution but by a density operator ρ\rho — a positive semidefinite operator with Trρ=1\operatorname{Tr}\rho = 1. John von Neumann's entropy is the direct generalization, obtained by replacing the probabilities with the operator ρ\rho itself.

Definition

The von Neumann entropy of a density operator ρ\rho is

S(ρ)=Tr ⁣(ρlog2ρ).S(\rho) = -\operatorname{Tr}\!\big(\rho \log_2 \rho\big).

Here log2ρ\log_2 \rho is the matrix logarithm, defined through the spectral decomposition. Writing ρ\rho in its eigenbasis,

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

the operator ρlog2ρ\rho\log_2\rho is diagonal in the same basis with entries λklog2λk\lambda_k\log_2\lambda_k, and the trace collects them:

S(ρ)=kλklog2λk=H({λk}).\boxed{\,S(\rho) = -\sum_k \lambda_k \log_2 \lambda_k = H(\{\lambda_k\}).\,}

So the von Neumann entropy is precisely the Shannon entropy of the eigenvalues of ρ\rho, again with 0log20=00\log_2 0 = 0. The eigenvalues form a genuine probability distribution because ρ\rho is a positive operator of unit trace.

Why the eigenvalues, and nothing else

The entropy is basis-independent: it depends only on the spectrum of ρ\rho, not on how ρ\rho is written. This is forced by the trace, which is invariant under unitary conjugation. If ρ=UρU\rho' = U\rho U^\dagger for any unitary UU, then ρ\rho and ρ\rho' have the same eigenvalues and hence S(ρ)=S(ρ)S(\rho') = S(\rho). Physically: applying a reversible (unitary) transformation never changes the information content of a state.

Basic properties

A worked qubit example

Take the density matrix

ρ=(12141412).\rho = \begin{pmatrix} \tfrac12 & \tfrac14 \\[2pt] \tfrac14 & \tfrac12 \end{pmatrix}.

It is Hermitian, positive, and has unit trace. Its eigenvalues solve λ2λ+detρ=0\lambda^2 - \lambda + \det\rho = 0 with detρ=14116=316\det\rho = \tfrac14 - \tfrac1{16} = \tfrac{3}{16}, giving

λ±=1±1342=1±122={34, 14}.\lambda_\pm = \frac{1 \pm \sqrt{1 - \tfrac34}}{2} = \frac{1 \pm \tfrac12}{2} = \left\{\tfrac34,\ \tfrac14\right\}.

Therefore

S(ρ)=34log23414log214=h(14)0.8113 bits.S(\rho) = -\tfrac34\log_2\tfrac34 - \tfrac14\log_2\tfrac14 = h(\tfrac14) \approx 0.8113\text{ bits}.

Note that S(ρ)<1S(\rho) < 1: although the off-diagonal coherences make ρ\rho look "spread out", its eigenvalues are unequal, so it is less mixed than the maximally mixed qubit 1/2\mathbb{1}/2 (which has S=1S = 1).

Try it

Compute the von Neumann entropy in bits of ρ=(0.50.250.250.5)\rho = \begin{pmatrix} 0.5 & 0.25 \\ 0.25 & 0.5\end{pmatrix} by diagonalizing it and applying S=kλklog2λkS = -\sum_k \lambda_k\log_2\lambda_k. Return the value.

Run your code to see the quantum state.

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