Fidelity of quantum states

In quantum mechanics, notably in quantum information theory, fidelity quantifies the "closeness" between two density matrices. It expresses the probability that one state will pass a test to identify as the other. It is not a metric on the space of density matrices, but it can be used to define the Bures metric on this space.

Definition
The fidelity between two quantum states $$\rho$$ and $$\sigma$$, expressed as density matrices, is commonly defined as:
 * $$F(\rho, \sigma) = \left(\operatorname{tr} \sqrt{\sqrt{\rho} \sigma \sqrt{\rho}}\right)^2.$$

The square roots in this expression are well-defined because both $$\rho$$ and $$\sqrt\rho\sigma\sqrt\rho$$ are positive semidefinite matrices, and the square root of a positive semidefinite matrix is defined via the spectral theorem. The Euclidean inner product from the classical definition is replaced by the Hilbert–Schmidt inner product.

As will be discussed in the following sections, this expression can be simplified in various cases of interest. In particular, for pure states, $$\rho=|\psi_\rho\rangle\!\langle\psi_\rho|$$ and $$\sigma=|\psi_\sigma\rangle\!\langle\psi_\sigma|$$, it equals:$$F(\rho, \sigma)=|\langle\psi_\rho|\psi_\sigma\rangle|^2.$$This tells us that the fidelity between pure states has a straightforward interpretation in terms of probability of finding the state $$|\psi_\rho\rangle$$ when measuring $$|\psi_\sigma\rangle$$ in a basis containing $$|\psi_\rho\rangle$$.

Some authors use an alternative definition $$F':=\sqrt{F}$$ and call this quantity fidelity. The definition of $$F$$ however is more common. To avoid confusion, $$F'$$ could be called "square root fidelity". In any case it is advisable to clarify the adopted definition whenever the fidelity is employed.

Motivation from classical counterpart
Given two random variables $$X,Y$$ with values $$(1, ..., n)$$ (categorical random variables) and probabilities $$p = (p_1,p_2,\ldots,p_n)$$ and $$q = (q_1,q_2,\ldots,q_n)$$, the fidelity of $$X$$ and $$Y$$ is defined to be the quantity


 * $$F(X,Y) = \left(\sum _i \sqrt{p_i q_i}\right)^2$$.

The fidelity deals with the marginal distribution of the random variables. It says nothing about the joint distribution of those variables. In other words, the fidelity $$F(X,Y)$$ is the square of the inner product of $$(\sqrt{p_1}, \ldots ,\sqrt{p_n})$$ and $$(\sqrt{q_1}, \ldots ,\sqrt{q_n})$$ viewed as vectors in Euclidean space. Notice that $$F(X,Y) = 1$$ if and only if $$p = q$$. In general, $$0 \leq F(X,Y) \leq 1$$. The measure $$\sum _i \sqrt{p_i q_i}$$ is known as the Bhattacharyya coefficient.

Given a classical measure of the distinguishability of two probability distributions, one can motivate a measure of distinguishability of two quantum states as follows: if an experimenter is attempting to determine whether a quantum state is either of two possibilities $$\rho$$ or $$\sigma$$, the most general possible measurement they can make on the state is a POVM, which is described by a set of Hermitian positive semidefinite operators $$\{F_i\} $$. When measuring a state $$\rho$$ with this POVM, $$i$$-th outcome is found with probability $$p_i = \operatorname{tr}( \rho F_i )$$, and likewise with probability $$q_i = \operatorname{tr}( \sigma F_i )$$ for $$\sigma$$. The ability to distinguish between $$\rho$$ and $$\sigma$$ is then equivalent to their ability to distinguish between the classical probability distributions $$p$$ and $$q$$. A natural question is then to ask what is the POVM the makes the two distributions as distinguishable as possible, which in this context means to minimize the Bhattacharyya coefficient over the possible choices of POVM. Formally, we are thus led to define the fidelity between quantum states as:


 * $$F(\rho,\sigma) = \min_{\{F_i\}} F(X,Y) = \min_{\{F_i\}} \left(\sum _i \sqrt{\operatorname{tr}( \rho F_i ) \operatorname{tr}( \sigma F_i )}\right)^{2}.$$

It was shown by Fuchs and Caves that the minimization in this expression can be computed explicitly, with solution the projective POVM corresponding to measuring in the eigenbasis of $$\sigma^{-1/2}|\sqrt\sigma\sqrt\rho|\sigma^{-1/2}$$, and results in the common explicit expression for the fidelity as$$F(\rho, \sigma) = \left(\operatorname{tr} \sqrt{\sqrt{\rho} \sigma \sqrt{\rho}}\right)^2.$$

Equivalent expression via trace norm
An equivalent expression for the fidelity between arbitrary states via the trace norm is:


 * $$F(\rho, \sigma)= \lVert \sqrt{\rho} \sqrt{\sigma} \rVert_\operatorname{tr}^2 = \left(\operatorname{tr}|\sqrt\rho\sqrt\sigma|\right)^2,$$

where the absolute value of an operator is here defined as $$|A|\equiv \sqrt{A^\dagger A}$$.

Equivalent expression via characteristic polynomials
Since the trace of a matrix is equal to the sum of its eigenvalues
 * $$F(\rho, \sigma)= \sum_j\sqrt{\lambda_j},$$

where the $$\lambda_j$$ are the eigenvalues of $$\sqrt{\rho} \sigma \sqrt{\rho}$$, which is positive semidefinite by construction and so the square roots of the eigenvalues are well defined. Because the characteristic polynomial of a product of two matrices is independent of the order, the spectrum of a matrix product is invariant under cyclic permutation, and so these eigenvalues can instead be calculated from $$\rho\sigma$$. Reversing the trace property leads to
 * $$F(\rho, \sigma)= \left(\operatorname{tr}\sqrt{\rho\sigma}\right)^2$$.

Expressions for pure states
If (at least) one of the two states is pure, for example $$\rho=|\psi_\rho\rangle\!\langle\psi_\rho|$$, the fidelity simplifies to$$F(\rho,\sigma)=\operatorname{tr}(\sigma\rho)=\langle \psi_\rho|\sigma|\psi_\rho\rangle.$$This follows observing that if $$\rho$$ is pure then $$\sqrt\rho=\rho$$, and thus$$ F(\rho, \sigma) = \left(\operatorname{tr} \sqrt{ | \psi_\rho \rangle \langle \psi_\rho | \sigma | \psi_\rho \rangle \langle \psi_\rho |} \right)^2 = \langle \psi_\rho | \sigma | \psi_\rho \rangle \left(\operatorname{tr} \sqrt{ | \psi_\rho \rangle \langle \psi_\rho |} \right)^2 = \langle \psi_\rho | \sigma | \psi_\rho \rangle. $$

If both states are pure, $$\rho=|\psi_\rho\rangle\!\langle\psi_\rho|$$ and $$\sigma=|\psi_\sigma\rangle\!\langle\psi_\sigma|$$, then we get the even simpler expression:$$F(\rho, \sigma)=|\langle\psi_\rho|\psi_\sigma\rangle|^2.$$

Properties
Some of the important properties of the quantum state fidelity are:

\left[\operatorname{tr}\sqrt{\rho\sigma}\right]^2 = \left(\sum_k \sqrt{p_k q_k} \right)^2 = F(\boldsymbol p, \boldsymbol q),$$where $$p_k, q_k$$ are the eigenvalues of $$\rho,\sigma$$, respectively. To see this, remember that if $$[\rho,\sigma]=0$$ then they can be diagonalized in the same basis: $$ \rho = \sum_i p_i | i \rangle \langle i | \text{ and } \sigma = \sum_i q_i | i \rangle \langle i |,$$so that $$ \operatorname{tr}\sqrt{\rho\sigma} = \operatorname{tr}\left(\sum_k \sqrt{p_k q_k} |k\rangle\!\langle k|\right) = \sum_k \sqrt{p_k q_k}.$$ If $$\rho$$ and $$\sigma$$ are both qubit states, the fidelity can be computed as
 * Symmetry. $$F(\rho,\sigma)=F(\sigma,\rho)$$.
 * Bounded values. For any $$\rho$$ and $$\sigma$$, $$0\le F(\rho,\sigma) \le 1$$, and $$F(\rho,\rho)=1$$.
 * Consistency with fidelity between probability distributions. If $$\rho$$ and $$\sigma$$ commute, the definition simplifies to $$F(\rho,\sigma) =
 * Explicit expression for qubits.


 * $$F(\rho, \sigma) = \operatorname{tr}(\rho\sigma)+2\sqrt{\det(\rho)\det(\sigma)}.$$

Qubit state means that $$\rho$$ and $$\sigma$$ are represented by two-dimensional matrices. This result follows noticing that $$M=\sqrt{\rho}\sigma\sqrt{\rho}$$ is a positive semidefinite operator, hence $$\operatorname{tr}\sqrt{M}=\sqrt{\lambda_1}+\sqrt{\lambda_2}$$, where $$\lambda_1$$ and $$\lambda_2$$ are the (nonnegative) eigenvalues of $$M$$. If $$\rho$$ (or $$\sigma$$) is pure, this result is simplified further to $$F(\rho,\sigma) = \operatorname{tr}(\rho\sigma)$$ since $$\mathrm{Det}(\rho) = 0$$ for pure states.

Unitary invariance
Direct calculation shows that the fidelity is preserved by unitary evolution, i.e.


 * $$\; F(\rho, \sigma) = F(U \rho \; U^*, U \sigma U^*) $$

for any unitary operator $$U$$.

Relationship with the fidelity between the corresponding probability distributions
Let $$\{E_k\}_k$$ be an arbitrary positive operator-valued measure (POVM); that is, a set of positive semidefinite operators $$E_k$$ satisfying $$\sum_k E_k=I$$. Then, for any pair of states $$\rho$$ and $$\sigma$$, we have $$ \sqrt{F(\rho,\sigma)} \le \sum_k \sqrt{\operatorname{tr}(E_k\rho)}\sqrt{\operatorname{tr}(E_k\sigma)} \equiv \sum_k \sqrt{p_k q_k}, $$ where in the last step we denoted with $$p_k \equiv \operatorname{tr}(E_k \rho)$$ and $$q_k \equiv \operatorname{tr}(E_k \sigma)$$ the probability distributions obtained by measuring $$\rho,\ \sigma$$ with the POVM $$\{E_k\}_k$$.

This shows that the square root of the fidelity between two quantum states is upper bounded by the Bhattacharyya coefficient between the corresponding probability distributions in any possible POVM. Indeed, it is more generally true that $$F(\rho,\sigma)=\min_{\{E_k\}} F(\boldsymbol p,\boldsymbol q),$$ where $$F(\boldsymbol p, \boldsymbol q)\equiv\left(\sum_k\sqrt{p_k q_k}\right)^2$$, and the minimum is taken over all possible POVMs. More specifically, one can prove that the minimum is achieved by the projective POVM corresponding to measuring in the eigenbasis of the operator $$\sigma^{-1/2}|\sqrt\sigma\sqrt\rho|\sigma^{-1/2}$$.

Proof of inequality
As was previously shown, the square root of the fidelity can be written as $$\sqrt{F(\rho,\sigma)}=\operatorname{tr}|\sqrt\rho\sqrt\sigma|,$$which is equivalent to the existence of a unitary operator $$U$$ such that

$$\sqrt{F(\rho,\sigma)}=\operatorname{tr}(\sqrt\rho\sqrt\sigma U).$$Remembering that $$\sum_k E_k=I$$ holds true for any POVM, we can then write$$\sqrt{F(\rho,\sigma)}=\operatorname{tr}(\sqrt\rho\sqrt\sigma U)= \sum_k\operatorname{tr}(\sqrt\rho E_k \sqrt\sigma U)=\sum_k\operatorname{tr}(\sqrt\rho \sqrt{E_k} \sqrt{E_k}\sqrt\sigma U) \le \sum_k\sqrt{\operatorname{tr}(E_k\rho)\operatorname{tr}(E_k \sigma)},$$where in the last step we used Cauchy-Schwarz inequality as in $$|\operatorname{tr}(A^\dagger B)|^2\le\operatorname{tr}(A^\dagger A)\operatorname{tr}(B^\dagger B)$$.

Behavior under quantum operations
The fidelity between two states can be shown to never decrease when a non-selective quantum operation $$\mathcal E$$ is applied to the states: $$F(\mathcal E(\rho),\mathcal E(\sigma)) \ge F(\rho,\sigma),$$ for any trace-preserving completely positive map $$\mathcal E$$.

Relationship to trace distance
We can define the trace distance between two matrices A and B in terms of the trace norm by



D(A,B) = \frac{1}{2}\| A-B\|_{\rm tr} \,. $$

When A and B are both density operators, this is a quantum generalization of the statistical distance. This is relevant because the trace distance provides upper and lower bounds on the fidelity as quantified by the Fuchs–van de Graaf inequalities,



1-\sqrt{F(\rho,\sigma)} \le D(\rho,\sigma) \le\sqrt{1-F(\rho,\sigma)} \,. $$

Often the trace distance is easier to calculate or bound than the fidelity, so these relationships are quite useful. In the case that at least one of the states is a pure state Ψ, the lower bound can be tightened.



1-F(\psi,\rho) \le D(\psi,\rho) \,. $$

Uhlmann's theorem
We saw that for two pure states, their fidelity coincides with the overlap. Uhlmann's theorem generalizes this statement to mixed states, in terms of their purifications:

Theorem Let ρ and σ be density matrices acting on Cn. Let ρ$1/2$ be the unique positive square root of ρ and

$$ $$
 * \psi _{\rho} \rangle = \sum_{i=1}^n (\rho^{{1}/{2}} | e_i \rangle) \otimes | e_i \rangle \in \mathbb{C}^n \otimes \mathbb{C}^n

be a purification of ρ (therefore $$\textstyle \{|e_i\rangle\}$$ is an orthonormal basis), then the following equality holds:


 * $$F(\rho, \sigma) = \max_{|\psi_{\sigma} \rangle} | \langle \psi _{\rho}| \psi _{\sigma} \rangle |^2$$

where $$| \psi _{\sigma} \rangle$$ is a purification of σ. Therefore, in general, the fidelity is the maximum overlap between purifications.

Sketch of proof
A simple proof can be sketched as follows. Let $$\textstyle |\Omega\rangle$$ denote the vector


 * $$| \Omega \rangle= \sum_{i=1}^n | e_i \rangle \otimes | e_i \rangle $$

and σ$1/2$ be the unique positive square root of σ. We see that, due to the unitary freedom in square root factorizations and choosing orthonormal bases, an arbitrary purification of σ is of the form


 * $$| \psi_{\sigma} \rangle = ( \sigma^{{1}/{2}} V_1 \otimes V_2 ) | \Omega \rangle $$

where Vi's are unitary operators. Now we directly calculate



= | \langle \Omega | ( \rho^{{1}/{2}} \otimes I) ( \sigma^{{1}/{2}} V_1 \otimes V_2 ) | \Omega \rangle |^2 = | \operatorname{tr} ( \rho^{{1}/{2}} \sigma^{{1}/{2}} V_1 V_2^T )|^2. $$
 * \langle \psi _{\rho}| \psi _{\sigma} \rangle |^2

But in general, for any square matrix A and unitary U, it is true that |tr(AU)| ≤ tr((A*A)$1/2$). Furthermore, equality is achieved if U* is the unitary operator in the polar decomposition of A. From this follows directly Uhlmann's theorem.

Proof with explicit decompositions
We will here provide an alternative, explicit way to prove Uhlmann's theorem.

Let $$|\psi_\rho\rangle$$ and $$|\psi_\sigma\rangle$$ be purifications of $$\rho$$ and $$\sigma$$, respectively. To start, let us show that $$|\langle\psi_\rho|\psi_\sigma\rangle|\le\operatorname{tr}|\sqrt\rho\sqrt\sigma|$$.

The general form of the purifications of the states is:$$\begin{align} |\psi_\rho\rangle  &=\sum_k\sqrt{\lambda_k}|\lambda_k\rangle\otimes|u_k\rangle, \\ |\psi_\sigma\rangle &=\sum_k\sqrt{\mu_k}|\mu_k\rangle\otimes|v_k\rangle, \end{align}$$were $$|\lambda_k\rangle, |\mu_k\rangle$$ are the eigenvectors of $$\rho,\ \sigma$$, and $$\{u_k\}_k, \{v_k\}_k$$ are arbitrary orthonormal bases. The overlap between the purifications is$$\langle\psi_\rho|\psi_\sigma\rangle = \sum_{jk}\sqrt{\lambda_j\mu_k} \langle\lambda_j|\mu_k\rangle\,\langle u_j|v_k\rangle = \operatorname{tr}\left(\sqrt\rho\sqrt\sigma U\right),$$where the unitary matrix $$U$$ is defined as$$U=\left(\sum_k |\mu_k\rangle\!\langle u_k| \right)\,\left(\sum_j |v_j\rangle\!\langle \lambda_j|\right).$$The conclusion is now reached via using the inequality $$|\operatorname{tr}(AU)|\le \operatorname{tr}(\sqrt{A^\dagger A})\equiv\operatorname{tr}|A|$$: $$|\langle\psi_\rho|\psi_\sigma\rangle|= \operatorname{tr}|\sqrt\rho\sqrt\sigma|.$$Note that this inequality is the triangle inequality applied to the singular values of the matrix. Indeed, for a generic matrix $$A\equiv \sum_j s_j(A)|a_j\rangle\!\langle b_j|$$and unitary $$U=\sum_j |b_j\rangle\!\langle w_j|$$, we have$$\begin{align} \left|\operatorname{tr}\left(\sum_j s_j(A)|a_j\rangle\!\langle b_j| \,\,\sum_k |b_k\rangle\!\langle w_k| \right)\right| \\ &= \left|\sum_j s_j(A)\langle w_j|a_j\rangle\right|\\ &\le \sum_j s_j(A) \,|\langle w_j|a_j\rangle| \\ &\le \sum_j s_j(A) \\ &= \operatorname{tr}|A|, \end{align}$$where $$s_j(A)\ge 0$$ are the (always real and non-negative) singular values of $$A$$, as in the singular value decomposition. The inequality is saturated and becomes an equality when $$\langle w_j|a_j\rangle=1$$, that is, when $$U=\sum_k |b_k\rangle\!\langle a_k|,$$ and thus $$AU=\sqrt{AA^\dagger}\equiv |A|$$. The above shows that $$|\langle\psi_\rho|\psi_\sigma\rangle|= \operatorname{tr}|\sqrt\rho\sqrt\sigma|$$ when the purifications $$|\psi_\rho\rangle$$ and $$|\psi_\sigma\rangle$$ are such that $$\sqrt\rho\sqrt\sigma U=|\sqrt\rho\sqrt\sigma|$$. Because this choice is possible regardless of the states, we can finally conclude that$$\operatorname{tr}|\sqrt\rho\sqrt\sigma|=\max|\langle\psi_\rho|\psi_\sigma\rangle|.$$
 * \operatorname{tr}(\sqrt\rho\sqrt\sigma U)| \le
 * \operatorname{tr}(AU)| &=

Consequences
Some immediate consequences of Uhlmann's theorem are
 * Fidelity is symmetric in its arguments, i.e. F (ρ,σ) = F (σ,ρ). Note that this is not obvious from the original definition.
 * F (ρ,σ) lies in [0,1], by the Cauchy–Schwarz inequality.
 * F (ρ,σ) = 1 if and only if ρ = σ, since Ψρ = Ψσ implies ρ = σ.

So we can see that fidelity behaves almost like a metric. This can be formalized and made useful by defining
 * $$ \cos^2 \theta_{\rho\sigma} = F(\rho,\sigma) \,$$

As the angle between the states $$\rho$$ and $$\sigma$$. It follows from the above properties that $$\theta_{\rho\sigma}$$ is non-negative, symmetric in its inputs, and is equal to zero if and only if $$\rho = \sigma$$. Furthermore, it can be proved that it obeys the triangle inequality, so this angle is a metric on the state space: the Fubini–Study metric.