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.
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.