Fidelity of Quantum States
Fidelity measures how close two quantum states are, the standard figure of merit for gates, memories, and channels.
Closeness of states
Fidelity quantifies the overlap between two quantum states. For pure states it is simply the squared overlap F(psi,phi) = |
Uhlmann's theorem
Uhlmann's theorem gives fidelity an elegant meaning: F(rho,sigma) is the maximum pure-state overlap over all purifications of the two mixed states. The best-matched purifications capture how close the mixed states can possibly look when lifted to a larger space. This connects fidelity directly to the geometry of state space and to the freedom in purifications.
import numpy as np
from scipy.linalg import sqrtm
def fidelity(rho,sigma):
s=sqrtm(rho)
return float(np.real(np.trace(sqrtm(s@sigma@s)))**2)
rho=np.diag([1,0]); sigma=np.array([[0.5,0.5],[0.5,0.5]])
print(round(fidelity(rho,sigma),3)) # 0.5
Properties
Fidelity is symmetric, bounded in [0,1], and equals 1 only when the states coincide. It is invariant under unitary transformations and cannot decrease under a shared quantum channel applied to both states (a data-processing inequality). It is not a metric itself, but the Bures and sine distances derived from it are. These properties make fidelity the natural currency for comparing intended and actual states.
Uses in hardware
Gate fidelity, the closeness of an implemented operation to its ideal, is the headline number for quantum processors, typically estimated by randomized benchmarking. State-preparation fidelity, memory fidelity over time, and teleportation fidelity all use the same measure. Because fidelity relates to error rates and to the trace distance through tight inequalities, it also feeds directly into fault-tolerance thresholds.