# MatsumotoFidelity

 Other toolboxes required MatsumotoFidelity Computes the Matsumoto fidelity of two density matrices none Fidelity Norms and distance measures yes (concave)

MatsumotoFidelity is a function that computes the Matsumoto fidelity[1][2] between two quantum states $\rho$ and $\sigma$, defined by $F(\rho,\sigma) := \mathrm{Tr}(\rho\#\sigma),$ where $\rho\#\sigma := \rho^{1/2}\Big(\rho^{-1/2}\sigma\rho^{-1/2}\Big)\rho^{1/2}.$

## Syntax

• FID = MatsumotoFidelity(RHO,SIGMA)

## Argument descriptions

• RHO: A density matrix.
• SIGMA: A density matrix.

## Examples

### Pure states

If $\rho = |v\rangle\langle v|$ and $\sigma = |w\rangle\langle w|$ are both pure states then their Matsumoto fidelity simply equals 1 if they are parallel and zero otherwise:

>> v = RandomStateVector(4);
>> w = RandomStateVector(4);
>> MatsumotoFidelity(v*v',w*w')

ans =

1.7454e-05

This highlights one slight limitation of this function: it is only accurate to 4 or so decimal places when both inputs are non-invertible (it is much more accurate if at least one input is invertible).