Quantum Fidelity
Measures how close two quantum states are — 1 means identical, 0 means orthogonal.
Formula
Variables
Example
Fidelity = 0.99 → 99 % match to the ideal state
How it works
Quantum fidelity quantifies how strongly two quantum states overlap, using the density-matrix form so it works for both pure states and mixed states. The square root and trace are there because the comparison must respect the geometry of quantum states: for pure states it reduces to the squared overlap, while for mixed states it measures the best possible similarity after accounting for statistical uncertainty. A value of 1 means the states are indistinguishable, and values near 0 mean they have almost no support in common.
When to use it
Use fidelity when checking how close an experimentally prepared state is to a target state, or when comparing the output of a quantum channel before and after noise. It is also standard in quantum error correction, benchmarking, and quantum process/state tomography.
Worked example, step by step
Let the target state be \rho = |0\rangle\langle 0| = [[1, 0], [0, 0]]. Let the prepared state be \sigma = [[0.81, 0.39], [0.39, 0.19]]. Since \rho is pure, \sqrt{\rho} = \rho, so F(\rho, \sigma) = (tr\sqrt{\rho\sigma\rho})^2. Compute \rho\sigma\rho = [[1, 0], [0, 0]] [[0.81, 0.39], [0.39, 0.19]] [[1, 0], [0, 0]] = [[0.81, 0], [0, 0]]. Now take the matrix square root: \sqrt{\rho\sigma\rho} = [[\sqrt{0.81}, 0], [0, 0]] = [[0.9, 0], [0, 0]]. Take the trace: tr(...) = 0.9. Square it: F = (0.9)^2 = 0.81. So the prepared state has fidelity 0.81 with the target state, meaning a reasonably close but not perfect match.
Common mistakes to avoid
- Using state vectors directly without converting to density matrices when the state is mixed
- Forgetting the outer square on the trace term
- Assuming fidelity is just the absolute value of an inner product for all cases, even though that only holds for pure states
Did You Know?
Current leading quantum processors achieve single-gate fidelities above 99.9 % — but errors compound fast across thousands of gates.
Share this formula
More in Quantum Computing
View allQubit Superposition State
IntermediateGeneral state of a single qubit as a superposition of the computational basis states.
Normalisation Constraint
BasicThe squared amplitudes of a qubit must sum to 1, ensuring total probability is 100 %.
Hadamard Gate
IntermediatePuts a qubit into an equal superposition — the most common single-qubit gate.
Pauli-X Gate (Quantum NOT)
BasicFlips |0⟩ to |1⟩ and vice versa — the quantum equivalent of a classical NOT gate.
CNOT Gate
IntermediateTwo-qubit gate that flips the target qubit only when the control qubit is |1⟩.
Bell State (EPR Pair)
IntermediateMaximally entangled two-qubit state — measuring one qubit instantly determines the other.