state_metrics.matsumoto_fidelity

Matsumoto fidelity metric.

Module Contents

Functions

matsumoto_fidelity(rho, sigma)

Compute the Matsumoto fidelity of two density matrices [1].

state_metrics.matsumoto_fidelity.matsumoto_fidelity(rho, sigma)

Compute the Matsumoto fidelity of two density matrices [1].

Calculate the Matsumoto fidelity between the two density matrices rho and sigma, defined by:

\[\mathrm{tr}(\rho\#\sigma),\]

where \(\#\) denotes the matrix geometric mean, which for invertible states is

\[\rho\#\sigma = \rho^{1/2}\sqrt{\rho^{-1/2}\sigma\rho^{-1/2}}\rho^{1/2}.\]

For singular states it is defined by the limit

\[\rho\#\sigma = \lim_{\epsilon\to0}(\rho+\epsilon\mathbb{I})\#(+\epsilon\mathbb{I}).\]

The return is a value between \(0\) and \(1\), with \(0\) corresponding to matrices rho and sigma with orthogonal support, and \(1\) corresponding to the case rho = sigma. The Matsumoto fidelity is a lower bound for the fidelity.

Examples

Consider the following Bell state

\[u = \frac{1}{\sqrt{2}} \left( |00 \rangle + |11 \rangle \right) \in \mathcal{X}.\]

The corresponding density matrix of \(u\) may be calculated by:

\[\begin{split}\rho = u u^* = \frac{1}{2} \begin{pmatrix} 1 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 1 \end{pmatrix} \in \text{D}(\mathcal{X}).\end{split}\]

In the event where we calculate the Matsumoto fidelity between states that are identical, we should obtain the value of \(1\). This can be observed in toqito as follows.

>>> from toqito.state_metrics import matsumoto_fidelity
>>> import numpy as np
>>> rho = 1 / 2 * np.array(
...     [[1, 0, 0, 1],
...      [0, 0, 0, 0],
...      [0, 0, 0, 0],
...      [1, 0, 0, 1]]
... )
>>> sigma = rho
>>> '%.2f' % matsumoto_fidelity(rho, sigma)
'1.00'

Note

You do not need to use ‘%.2f’ % when you use this function.

We use this to format our output such that doctest compares the calculated output to the expected output upto two decimal points only. The accuracy of the solvers can calculate the float output to a certain amount of precision such that the value deviates after a few digits of accuracy.

References

[1] (1,2)

Keiji Matsumoto. Reverse test and quantum analogue of classical fidelity and generalized fidelity. 2010. arXiv:1006.0302.

Raises:

ValueError – If matrices are not of equal dimension.

Parameters:
  • rho (numpy.ndarray) – Density operator.

  • sigma (numpy.ndarray) – Density operator.

Returns:

The Matsumoto fidelity between rho and sigma.

Return type:

float