Quantum relative entropy (source code)

= Quantum relative entropy
{title2=$D(\rho\|\sigma)$}
{wiki}

= Umegaki relative entropy
{c}
{synonym}

Quantum relative entropy compares two <density operators> by
$$
D(\rho\|\sigma)=\operatorname{Tr}[\rho(\log\rho-\log\sigma)]
$$
when the <support of a positive operator> $\rho$ is contained in that of $\sigma$. If that containment fails, the value is $+\infty$. Zero eigenvalues of $\rho$ use the continuous convention $0\log0=0$ on its support.

For a qubit reference $\sigma=I/2$, base-two logarithms give $D(\rho\|I/2)=1-S(\rho)$. A pure qubit state is therefore one bit away from that reference in this relative-entropy sense, while the reference itself gives zero. <Nonnegativity of quantum relative entropy> holds generally, but the quantity is not symmetric and need not satisfy the triangle inequality, so it is not a metric. Specifying the reference and logarithm base is necessary when comparing values.