Fidelity $F(\rho, \sigma)$ quantifies how close two quantum states are. For pure states $|\psi\rangle$ and $|\phi\rangle$, fidelity is $F = |\langle\psi|\phi\rangle|^2$, the squared overlap. For mixed states, fidelity is $F(\rho, \sigma) = \text{Tr}(\sqrt{\sqrt{\rho}\sigma\sqrt{\rho}})^2$, ranging from 0 (orthogonal) to 1 (identical).
Purity $P = \text{Tr}(\rho^2)$ measures how “pure” a state is. For a single-qubit state:
Purity quantifies how much information has been lost due to interaction with the environment (decoherence).
A pure state $|\psi\rangle$ has maximum purity ($P = 1$) and fidelity $F(|\psi\rangle\langle\psi|, |\psi\rangle\langle\psi|) = 1$ with itself. Decoherence reduces purity and fidelity with ideal target states.
Process fidelity of a channel $\mathcal{E}$ is $\bar{F} = \int d\psi \langle\psi|\mathcal{E}(|\psi\rangle\langle\psi|)|\psi\rangle$, averaging over all input states. A perfect identity channel has $\bar{F} = 1$; a depolarizing channel has $\bar{F} < 1$.
Related metric: trace distance $D(\rho, \sigma) = \frac{1}{2}\text{Tr}(|\rho - \sigma|)$ is the maximum probability difference between outcomes of any measurement. Fidelity and trace distance are related: $1 - F(\rho, \sigma) \leq D(\rho, \sigma) \leq \sqrt{1 - F(\rho, \sigma)^2}$.