An alternative fidelity measure for quantum states - computer code

Collected here are the matlab and C codes used for benchmark evaluation of various fidelity-like and distance measures on quantum mixed states from the paper An alternative fidelity measure for quantum states, Paulo E. M. F. Mendonça, R. d. J. Napolitano, Marcelo A. Marchiolli, C. J. Foster and Yeong-Cherng Liang, arXiv:0806.1150v1 [quant-ph].

In the paper we compared the efficiency for computation of the Uhlmann-Josza Fidelity F, our proposed alternative fidelity Fn, the nonlogarithmic variety of the quantum Chernoff bound Q, and the trace distance D. We presented Matlab versions of these functions, but for reasons of space and relevance, omitted the C versions which we prefer to distribute from this page. The source package also includes the matlab versions in convenient machine readable form.

The code may be downloaded here. Be warned that the C function F_UJ_mex() has been known to interact badly with the intel MKL BLAS on 32-bit versions of matlab and will issue an error if such problems are detected. The issue is currently under investigation with the help of mathworks support; a workaround seems to be to run matlab using the -nojvm option.