Closed zaqqwerty closed 2 years ago
Working on it.
Thanks, assigned you to the issue. Also wanted to note, we just cut a new release, which included some file structure updates to be aware of. In particular the fidelity
function now lives in qhbmlib/inference/qhbm_utils.py
I casted the sigma
argument for the fidelity function to the dtype complex128
in the test_fidelity_random
function inside /tests/inference/qhbm_utils_tests.py::FidelityTest
This way if there is any errors or difference between the output of the faster fidelity function
and the direct matrix to matrix fidelity function it will be detected.
I also updated the docstring
of the fidelity function to reflect the generalization of the dtype of the sigma
argument.
I duplicated lines 106-111
and in the second portion used the sigma of dtype
complex64
in the actual fidelity function, though avoided recalcuating
the direct fidelity function in the second portion to keep the test fast.
Currently, the
fidelity
function inqhbmlib/inference/qhbm_utils.py
requires the input density matrixsigma
to be of dtypetf.complex64
. Instead, that argument should be generalized to cast to this dtype.