qiskit-community / povm-toolbox

A toolbox for the implementation of positive operator-valued measures (POVMs).
https://qiskit-community.github.io/povm-toolbox/
Apache License 2.0
30 stars 0 forks source link

fix: a quick-fix for dealing with larger qubit counts #34

Closed mrossinek closed 3 months ago

mrossinek commented 3 months ago

When dealing with qubit numbers > 63, np.log2 fails because the integer cannot be converted to a proper C type and, thus, gets passed into numpy as an object-array. math.log is a Python function which can handle the unbounded Python integer sizes just fine.

This is more of an ad-hoc fix to the current state of the code. A different approach would be to consider actually storing n_subsystems rather than always computing it on the fly. I will open a separate issue for that.