qadence
qadence copied to clipboard
[Testing] Investigate type conversion in test_compare_run_to_sample
https://github.com/pasqal-io/qadence/blob/main/tests/backends/test_backends.py#L296 occasionally fails with:
FAILED tests/backends/test_backends.py::test_compare_run_to_sample[pyqtorch] - AssertionError: assert nan < (0.075 + 1e-07)
+ where nan = js_divergence(Counter({'0': 1000}), Counter({'0': 1.0, '1': 5e-324}))
Falsifying example: test_compare_run_to_sample(
backend='pyqtorch',
circuit=ChainBlock(0)
└── RY(0) [params: ['A*(W + y)']],
)