Computing Library › Quantum Foundations
Quantum Foundations

Trace Distance

Trace distance measures how distinguishable two quantum states are, with a direct operational meaning in single-shot discrimination.

A metric on states

The trace distance between two density matrices is D(rho,sigma) = (1/2) ||rho - sigma||_1, half the sum of the absolute values of the eigenvalues of rho - sigma. It is a genuine metric: nonnegative, symmetric, zero only when the states are equal, and satisfying the triangle inequality. It ranges from 0 for identical states to 1 for perfectly distinguishable ones with orthogonal support.

Operational meaning

Kronos motion — direct

Trace distance answers a concrete question: given one copy of an unknown state that is either rho or sigma with equal prior, what is the best probability of guessing correctly? The optimal success probability is (1 + D(rho,sigma))/2. So trace distance is exactly the advantage over random guessing available to the best single-shot measurement, the Helstrom bound. This is why it is the natural measure of distinguishability.

python
import numpy as np
def trace_distance(rho,sigma):
    ev=np.linalg.eigvalsh(rho-sigma)
    return 0.5*np.sum(np.abs(ev))
rho=np.diag([1,0]); sigma=np.diag([0,1])
print(trace_distance(rho,sigma))  # 1.0 -> perfectly distinguishable

Relation to fidelity

Trace distance and fidelity are two standard measures of closeness, tied by the Fuchs-van de Graaf inequalities: 1 - sqrt(F) <= D <= sqrt(1 - F). They therefore agree on when states are close or far, though they need not move in lockstep. Fidelity is often easier to estimate experimentally; trace distance has the cleaner operational interpretation for discrimination and error bounds.

Uses

Trace distance is the yardstick for error in quantum algorithms and channels: bounding the trace distance between the actual and ideal output bounds how much any measurement statistics can differ, by the same amount. It obeys a data-processing inequality, never increasing under a quantum channel, which makes it the tool of choice in security proofs, where it bounds an adversary's ability to distinguish a real key from an ideal one.