Donald's identity (source code)

= Donald's identity
{c}

For an ensemble of <density operators> with average $\overline\omega=\sum_jp_j\omega_j$,
$$
\sum_jp_jD(\omega_j\|\rho)
=\sum_jp_jD(\omega_j\|\overline\omega)+D(\overline\omega\|\rho).
$$
Expanding the trace definitions cancels the $\log\omega_j$ terms, and the remaining sum combines to a trace against $\overline\omega$. Positive-weight ensemble states have their support contained in that of the average, so the first sum on the right is finite in finite dimension. If the reference-state support condition fails, both sides are $+\infty$. The identity is associated with https://www.mjdquantum.uk/otrea.html[Donald's work on relative entropy].