Quantum Fidelity, or, how to compare quantum states

Say you are given two quantum states \rho and \sigma, and you are asked the following questions:

How similar are they? Can you distinguish them?

Hilbert Fidelity 1

In practice, this situation arises in many scenarios. For instance if you have an imperfect experiment (due to noise) that produces a quantum state \sigma, and you wish to find out how close it is to the state \rho that you originally wanted to create.

While there are many ways to quantify the distinguishability (i.e., the degree of similarity) between two quantum states, we will focus here on one quantity of particular interest in Quantum Information theory: the Quantum Fidelity (or the so-called Uhlmann-Jozsa Fidelity). The Fidelity is defined as

F(\rho,\sigma) = \text{Tr}\sqrt{\sqrt{\rho}\sigma\sqrt{\rho}}=\| \sqrt{\rho}\sqrt{\sigma} \|_1,              (1)

where \|A \|_1=\text{Tr} \sqrt{A^\dagger A} is the 1-norm.

A brief History

Let us first try to understand why the Fidelity is defined the way it is.

The history of the Quantum Fidelity can be traced back to the late 70’s and early 80’s to the works of Uhlmann [1] and Alberti [2], who were studying generalizations of the quantum mechanical transition probability between two states. In later years the Fidelity was studied by Richard Jozsa (who coined the term “Fidelity“) [3] and then by Benjamin Schumacher [4] in the context of quantum communications.

As an initial problem to understand the meaning of the Quantum Fidelity let us consider the case when \rho and \sigma are pure states:

\rho=|\psi\rangle\langle\psi|         and           \sigma=|\chi\rangle\langle\chi|.             (2)

From our Intro to Quantum Mechanics course we know that the transition probability between |\psi\rangle and |\chi\rangle is simply given by the modulus of their overlap: |\langle \psi|\chi\rangle|. As pointed out by R. Jozsa, this quantity is indeed a natural candidate for the Fidelity since it corresponds to the closeness of states in the natural geometry of Hilbert space [3].

In fact, we can define the Fidelity between pure states as:

F(|\psi\rangle\langle\psi|,|\chi\rangle\langle\chi|) = |\langle \psi|\chi\rangle|,              (3)

where F=0 if the states are orthogonal (i.e., perfectly distinguishable) and F=1 if |\psi\rangle=|\chi\rangle.

This definition can readily be generalized to the case when one of the states is pure \rho=|\psi\rangle\langle\psi|, but the other is mixed:

F(|\psi\rangle\langle\psi|,\sigma) = \sqrt{\langle \psi|\sigma|\psi\rangle}.              (4)

Hilbert Fidelity 2

Eq. (4) is simply the average of (3) over any ensemble of pure states represented by a density matrix \sigma

Thus far you might start to notice a pattern in Eqs (3) and (4), as they can both be written as

F(\rho,\sigma) = \sqrt{\text{Tr}(\rho\sigma)}.              (5)

Can we generalize this equation to the case when both states are mixed?

Well… it turns out that we can’t do it. As explained in Ref. [5], Eq. (5) leads to some problems: Consider a bidimensional Hilbert space (i.e., the space of a qubit), and let us denote as \mathbb{I} the identity operator on this space. Then (5) would imply that \forall |\psi\rangle,

F(|\psi\rangle\langle\psi|,\mathbb{I}/2) = F(\mathbb{I}/2,\mathbb{I}/2).

That is, any pure state has the same Fidelity with the maximally mixed state as the maximally mixed state has with itself (?). Even if the last sentence might sound like a tongue twister you can see why this result is unsatisfactory.

In order to avoid problems like this one Richard Jozsa postulated a series of axioms that any notion of Fidelity should satisfy.

Jozsa’s axioms

  1. Normalization : 0 \leq F(\rho,\sigma) \leq 1 and F(\rho,\sigma) = 1 if  and only if \rho = \sigma .
  2. Symmetry: F(\rho,\sigma) = F(\sigma,\rho).
  3. Fidelity for pure states: If \rho=|\psi\rangle\langle\psi| is pure then F(\rho,\sigma)= \text{Tr}(\rho\sigma)=|\langle \psi|\sigma|\psi\rangle|.
  4. Invariance over unitary transformations U : F(U\rho U^\dagger,U\sigma U^\dagger) = F(\rho,\sigma).
  5. Convexity: For any three quantum states \rho , \sigma and \tau and given p_1 and p_2 such that p_1+p_2=1, then F(\rho,p_1\sigma+p_2\tau) \geq p_1F(\rho,\sigma) +p_2F(\rho,\tau) .
  6. MultiplicativityF(\rho_1\otimes\rho_2,\rho_3\otimes\rho_4) = F(\rho_1,\rho_3)F(\rho_2,\rho_4).

Purification and Fidelity:

Thus far we know how to compute the Fidelity when one (or both) of the states are pure. But we still need to define a quantity that works well for mixed states and that fulfills all of Jozsa’s axioms. It turns out that we can still use our knowledge of the pure-state Fidelity to the case of mixed states by means of the purification.

If  ye CAN’T solve a problem, tr’n map it to something you CAN solve.

Consider the alternate definition (derived from Ulhmann’s Theorem):

F(\rho,\sigma) = \underset{|\psi_\rho\rangle,|\chi_\sigma\rangle}{\text{max}}=|\langle\psi_\rho|\chi_\sigma\rangle|=\text{Tr}\sqrt{\sqrt{\rho}\sigma\sqrt{\rho}},        (6)

where |\psi_\rho\rangle and |\chi_\sigma\rangle are purifications of \rho and \sigma in an extended space \mathcal{H}\otimes\mathcal{H}' (i.e., they are pure states!). Note that given the spectral decomposition of the states:

\rho=\sum_i r_i|r_i\rangle\langle r_i|\ ,        \sigma=\sum_j s_j|s_j\rangle\langle s_j|\,         (7)

we can always write their purifications in terms of the Schmidt decomposition

|\psi_\rho\rangle=\sum_i \sqrt{r_i}|r_i\rangle\otimes|\mu_i\rangle,        |\chi_\sigma\rangle=\sum_j \sqrt{s_j}|s_j\rangle\otimes|\nu_j\rangle.          (8)

Here, \{|\mu_i\rangle\} and \{|\nu_i\rangle\} form orthonormal sets on \mathcal{H}'.

Let me now sketch the proof of Eq. (6) (you can find the detailed proof in Refs. [6] and [7]):

The overlap between |\psi_\rho\rangle and |\chi_\sigma\rangle can be expressed as

F(|\psi_\rho\rangle\langle\psi_\rho|,|\chi_\sigma\rangle\langle\chi_\sigma|) =|\langle\psi_\rho|\chi_\sigma\rangle|=\text{Tr}(\sqrt{\rho}\sqrt{\sigma}U)       (9)

where U=(\sum_j |s_j\rangle\langle \mu_j|)(\sum_i |\nu_i\rangle\langle r_i|). Then, by means of the inequality |\text{Tr}(A U)|\leq \text{Tr}|A|\equiv \text{Tr}(\sqrt{A^\dagger A}) , we get:

|\langle\psi_\rho|\chi_\sigma\rangle|\leq\text{Tr}|\sqrt{\rho}\sqrt{\sigma}| =\text{Tr}\sqrt{\sqrt{\rho}\sigma\sqrt{\rho}}.     (10)

Maximizing over all purifications we get an equality in (10).

Hilbert Fidelity 3

The mixed state Fidelity between \rho and \sigma is derived from the Fidelity between the purification |\psi_\rho\rangle and |\chi_\sigma\rangle.

From the previous derivation we see that the square roots appearing in the Fidelity arise from the fact that in the Schmidt decomposition of the purifications of \rho and \sigma, the Schmidt coefficients are given by the square roots of the eigenvalues of the states.

What is it good for?

Ok. Now that we have understood the motivation behind the Fidelity we can ask ourselves:

What is this quantity good for?

In turns out that thanks to all it’s nice properties (see Jozsa’s Axioms), the Fidelity has become one of the most widely used quantities to quantify the degree of similarity between quantum states.

For instance, in Quantum Cryptography the Fidelity is used as a verification tool, e.g., one may be interested in the fidelity between an imperfect state and fixed target state [8]. In Quantum Information Theory there are several inequalities relating the Fidelity to other quantum state distinguishability measures [9]. Moreover, there are many Fidelity-bases distance measures which can be used to define metrics on the space of density matrices [10] .

Finally, as someone who works in Condensed Matter I must remark that it has also been shown that the Fidelity can capture the geometric distance between thermal states of condensed matter systems nearing phase transitions and can provide information about the zero temperature phase diagram [11-13].

You win some and you lose some. How do we actually compute the the Fidelity?

Now that we know all the nice properties of the Quantum Fidelity we have to address it’s biggest problem:

How do we actually compute it?

When I first saw the formula of the Fidelity (Eq. (1)) I immediately started to feel uncomfortable from the fact that it involves non-integer powers of \rho and \sigma. If we know the matrix representation of the density matrices we might be able to calculate their square root by diagonalizing them (which would take order of d^3 steps for d \times d dimensional matrices). However, such procedure could scale exponentially due to the exponentially large dimension of the density matrix.

And what would happen if we are just handed the density matrices in a quantum form? Then we would have to additionally perform full state tomography, rendering the task even harder!

By this point you might argue that we could use a quantum computer to try to avoid the exponential scaling of the matrix representation. Maybe there’s a Quantum Algorithm for exactly computing the fidelity? It turns out it is straightforward to show that there is no exact quantum algorithm for computing the Fidelity directly from the probability of a measurement outcome on a finite number of copies of \rho and \sigma (check my post here for a simple no-go theorem).

Well, what about Eq. (6)? Whelp… Ulhmann’s theorem will not solve our problem. First, we might not have access to the purifying system of \rho and \sigma, and even if we have access to a purifying system for each one we would still need to carry over the maximization over all possible purifications! And this is a hard problem on itself!

Hilbert Fidelity 4v2

What’s all the fuzz about Fidelity then?

However, not all is lost. There are several ways to solve the computability problem of the Fidelity:

  1. Bounding it via other know (and hopefully computable) quantities [10].
  2. Defining alternative Fidelity measure that might not satisfy all of Jozsa’s Axioms [5].
  3. Estimating the Fidelity with bounds that get tighter as we put more work into them.

As we will see in my next post, we have recently developed an Algorithm called Variational Quantum Fidelity Estimation [14] which uses novel lower and upper bounds for the Fidelity based on what we called: the “truncated fidelity”, which is evaluated for a state \rho_m obtained by projecting \rho onto its m-largest eigenvalues. Our bounds can be refined, i.e., they tighten monotonically with m and can be computed with a Hybrid Quantum-Classical Algorithm.


[1] A. Uhlmann. The “transition probability” in the state space of a\star-algebra. Reports  on Mathematical Physics , 9(2):273–279, (1976).
[2] P.M. Alberti,  A note on the transition probability over C*-algebras. Letters in Mathematical Physics7(1), 25-32, (1983).
[3] R. Jozsa. Fidelity for mixed quantum states. Journal of modern optics, 41(12):2315–2323, (1994).
[4] B. Schumacher, Quantum coding. Physical Review A51(4), 2738 (1995).
[5] Y-C. Liang, Y-H. Yeh, P. E. M. F. Mendonça, R. Y. Teh, M. D. Reid, P. D. Drummond,  arXiv:1810.08034.
[6] M. A. Nielsen and I. L. Chuang. Quantum Computation and Quantum Information. December 2010
[8] C. A. Fuchs,  & J. Van De Graaf, Cryptographic distinguishability measures for quantum-mechanical states, IEEE Transactions on Information Theory, 45(4), 1216-1227 (1999).
[9] K. M.  Audenaert, Comparisons between quantum state distinguishability measuresarXiv preprint arXiv:1207.1197.
[10] Z. Ma, F. L. Zhang,  & J.L. Chen, Fidelity induced distance measures for quantum states. Physics Letters A, 373(38), 3407-3409 (2009).
[11] P. Zanardi, H. T. Quan, X. Wang, and C. P. Sun. Mixed-state fidelity and quantum criticality at finite temperature. Phys. Rev. A, 75:032109, (2007).
[12] P. Zanardi, P. Giorda, and M. Cozzini. Information theoretic differential geometry of quantum phase transitions. Phys. Rev. Lett., 99:100603, (2007).
[13] H. T. Quan and F. M. Cucchietti. Quantum fidelity and thermal phase transitions. Phys. Rev. E, 79:031101, (2009).
[14] M. Cerezo, A. Poremba, L.Cincio, P. J. Coles, Variational Quantum Fidelity Estimation,

Creative Commons License
Quantum Fidelity, or, how to compare quantum states by Marco Vinicio Sebastian Cerezo de la Roca is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at https://entangledphysics.com/2019/06/24/quantum-fidelity-or-how-to-compare-quantum-states/.

About marcocerezo

I'm Marco Cerezo, I have a Ph.D in Physics and I'm currently a Postdoctoral Research Associate at Los Alamos National Laboratory in New Mexico, USA. My main fields of study are Quantum Information, Quantum Computing and Condensed Matter. Currently I'm working to develop novel quantum algorithms which can be useful in near-term quantum devices.
This entry was posted in Quantum Information and Quantum Computation: General Discussions and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s