Spectral-parts formula for trace distance (source code)

= Spectral-parts formula for trace distance
{title2=$D(\rho,\sigma)=\operatorname{Tr}(\rho-\sigma)_+$}

For the Hermitian difference $X=\rho-\sigma$, define its <positive part of a Hermitian operator> $Q=X_+$ and <negative part of a Hermitian operator> $R=X_-$. Their supports are orthogonal and $|X|=Q+R$. Equal traces give $\operatorname{Tr}Q=\operatorname{Tr}R$, so the <trace distance> is both $\tfrac12(\operatorname{Tr}Q+\operatorname{Tr}R)$ and $\operatorname{Tr}Q$. This explains why the positive spectral projector attains the <variational characterization of trace distance>.