Fidelity

The command below calculates the fidelity between the two matrices $ A$ and $ B$ read from respective files of fileA and fileB saved by the ``msave'' command (or ``RDOsave'' etc.).
fidelity(fileA, fileB);
The fidelity between (N,N) density matrices $ A$ and $ B$ is defined by

\begin{displaymath}\begin{split}F(A,B)=\mathrm{Tr}\sqrt{A^{\frac{1}{2}}BA^{\frac{1}{2}}}. \end{split}\end{displaymath} (16)



root
2004-11-07