title: Trace distance
text: # Trace distance
  
  In quantum mechanics, and especially quantum information and the study of open quantum systems, the trace distance T is a metric on the space of density matrices and gives a measure of the distinguishability between two states. It is the quantum generalization of the Kolmogorov distance for classical probability distributions.
  
  ## Definition
  
  The trace distance is defined as half of the trace norm of the difference of the matrices:
  
  $T(\rho ,\sigma ):={\frac {1}{2}}\|\rho -\sigma \|_{1}={\frac {1}{2}}\mathrm {Tr} \left[{\sqrt {(\rho -\sigma )^{\dagger }(\rho -\sigma )}}\right],$
  
  where $\|A\|_{1}\equiv \operatorname {Tr} [{\sqrt {A^{\dagger }A}}]$ is the trace norm of $A$, and ${\sqrt {A}}$ is the unique positive semidefinite $B$ such that $B^{2}=A$ (which is always defined for positive semidefinite $A$). This can be thought of as the matrix obtained from $A$ taking the algebraic square roots of its eigenvalues. For the trace distance, we more specifically have an expression of the form $|C|\equiv {\sqrt {C^{\dagger }C}}={\sqrt {C^{2}}}$ where $C=\rho -\sigma$ is Hermitian. This quantity equals the sum of the singular values of $C$, which being $C$ Hermitian, equals the sum of the absolute values of its eigenvalues. More explicitly,
  
  $T(\rho ,\sigma )={\frac {1}{2}}\operatorname {Tr} |\rho -\sigma |={\frac {1}{2}}\sum _{i=1}^{r}|\lambda _{i}|,$
  
  where $\lambda _{i}\in \mathbb {R}$ is the $i$-th eigenvalue of $\rho -\sigma$, and $r$ is its rank.
  
  The factor of two ensures that the trace distance between normalized density matrices takes values in the range $[0,1]$.
  
  ## Connection with the total variation distance
  
  The trace distance can be seen as a direct quantum generalization of the total variation distance between probability distributions. Given a pair of probability distributions $P,Q$, their total variation distance is
  
  $\delta (P,Q)={\frac {1}{2}}\|P-Q\|_{1}={\frac {1}{2}}\sum _{k}|P_{k}-Q_{k}|.$
  
  Attempting to directly apply this definition to quantum states raises the problem that quantum states can result in different probability distributions depending on how they are measured. A natural choice is then to consider the total variation distance between the classical probability distribution obtained measuring the two states, maximized over the possible choices of measurement, which results precisely in the trace distance between the quantum states. More explicitly, this is the quantity
  
  $\max _{\Pi }{\frac {1}{2}}\sum _{i}|\operatorname {Tr} (\Pi _{i}\rho )-\operatorname {Tr} (\Pi _{i}\sigma )|,$
  
  with the maximization performed with respect to all possible POVMs $\{\Pi _{i}\}_{i}$.
  
  To see why this is the case, we start observing that there is a unique decomposition $\rho -\sigma =P-Q$ with $P,Q\geq 0$ positive semidefinite matrices with orthogonal support. With these operators we can write concisely $|\rho -\sigma |=P+Q$. Furthermore $\operatorname {Tr} (\Pi _{i}P),\operatorname {Tr} (\Pi _{i}Q)\geq 0$, and thus $|\operatorname {Tr} (\Pi _{i}P)-\operatorname {Tr} (\Pi _{i}Q))|\leq \operatorname {Tr} (\Pi _{i}P)+\operatorname {Tr} (\Pi _{i}Q))$. We thus have
  
  $\sum _{i}|\operatorname {Tr} (\Pi _{i}(\rho -\sigma ))|=\sum _{i}|\operatorname {Tr} (\Pi _{i}(P-Q))|\leq \sum _{i}\operatorname {Tr} (\Pi _{i}(P+Q))=\operatorname {Tr} |\rho -\sigma |.$
  
  This shows that
  
  $\max _{\Pi }\delta (P_{\Pi ,\rho },P_{\Pi ,\sigma })\leq T(\rho ,\sigma ),$
  
  where $P_{\Pi ,\rho }$ denotes the classical probability distribution resulting from measuring $\rho$ with the POVM $\Pi$, $(P_{\Pi ,\rho })_{i}\equiv \operatorname {Tr} (\Pi _{i}\rho )$, and the maximum is performed over all POVMs $\Pi \equiv \{\Pi _{i}\}_{i}$.
  
  To conclude that the inequality is saturated by some POVM, we need only consider the projective measurement with elements corresponding to the eigenvectors of $\rho -\sigma$. With this choice,
  
  $\delta (P_{\Pi ,\rho },P_{\Pi ,\sigma })={\frac {1}{2}}\sum _{i}|\operatorname {Tr} (\Pi _{i}(\rho -\sigma ))|={\frac {1}{2}}\sum _{i}|\lambda _{i}|=T(\rho ,\sigma ),$
  
  where $\lambda _{i}$ are the eigenvalues of $\rho -\sigma$.
  
  ## Physical interpretation
  
  By using the Hölder duality for Schatten norms, the trace distance can be written in variational form as
  
      $T(\rho ,\sigma )={\frac {1}{2}}\sup _{-\mathbb {I} \leq U\leq \mathbb {I} }\mathrm {Tr} [U(\rho -\sigma )]=\sup _{0\leq P\leq \mathbb {I} }\mathrm {Tr} [P(\rho -\sigma )].$
  
  As for its classical counterpart, the trace distance can be related to the maximum probability of distinguishing between two quantum states:
  
  For example, suppose Alice prepares a system in either the state $\rho$ or $\sigma$, each with probability ${\frac {1}{2}}$ and sends it to Bob who has to discriminate between the two states using a binary measurement. Let Bob assign the measurement outcome $0$ and a POVM element $P_{0}$ such as the outcome $1$ and a POVM element $P_{1}=1-P_{0}$ to identify the state $\rho$ or $\sigma$, respectively. His expected probability of correctly identifying the incoming state is then given by
  
      $p_{\text{guess}}={\frac {1}{2}}p(0|\rho )+{\frac {1}{2}}p(1|\sigma )={\frac {1}{2}}\mathrm {Tr} (P_{0}\rho )+{\frac {1}{2}}\mathrm {Tr} (P_{1}\sigma )={\frac {1}{2}}\left(1+\mathrm {Tr} \left(P_{0}(\rho -\sigma )\right)\right).$
  
  Therefore, when applying an optimal measurement, Bob has the maximal probability
  
      $p_{\text{guess}}^{\text{max}}=\sup _{P_{0}}{\frac {1}{2}}\left(1+\mathrm {Tr} \left(P_{0}(\rho -\sigma )\right)\right)={\frac {1}{2}}(1+T(\rho ,\sigma ))$
  
  of correctly identifying in which state Alice prepared the system.
  
  ## Properties
  
  The trace distance has the following properties
  
  * It is a metric on the space of density matrices, i.e. it is non-negative, symmetric, and satisfies the triangle inequality, and $T(\rho ,\sigma )=0\Leftrightarrow \rho =\sigma$
  * $0\leq T(\rho ,\sigma )\leq 1$ and $T(\rho ,\sigma )=1$ if and only if $\rho$ and $\sigma$ have orthogonal supports
  * It is preserved under unitary transformations: $T(U\rho U^{\dagger },U\sigma U^{\dagger })=T(\rho ,\sigma )$
  * It is contractive under trace-preserving CP maps, i.e. if $\Phi$ is a CPT map, then $T(\Phi (\rho ),\Phi (\sigma ))\leq T(\rho ,\sigma )$
  * It is convex in each of its inputs. E.g. $T(\sum _{i}p_{i}\rho _{i},\sigma )\leq \sum _{i}p_{i}T(\rho _{i},\sigma )$
  * On pure states, it can be expressed uniquely in term of the inner product of the states: $T(|\psi \rangle \langle \psi |,|\phi \rangle \langle \phi |)={\sqrt {1-|\langle \psi |\phi \rangle |^{2}}}$
  
  For qubits, the trace distance is equal to half the Euclidean distance in the Bloch representation.
  
  ### Relationship to other distance measures
  
  **Fidelity**
  
  The fidelity of two quantum states $F(\rho ,\sigma )$ is related to the trace distance $T(\rho ,\sigma )$ by the inequalities
  
      $1-{\sqrt {F(\rho ,\sigma )}}\leq T(\rho ,\sigma )\leq {\sqrt {1-F(\rho ,\sigma )}}\,.$
  
  The upper bound inequality becomes an equality when $\rho$ and $\sigma$ are pure states. [Note that the definition for Fidelity used here is the square of that used in Nielsen and Chuang]
  
  **Total variation distance**
  
  The trace distance is a generalization of the total variation distance, and for two commuting density matrices, has the same value as the total variation distance of the two corresponding probability distributions.
  
  