Open
Description
This line in QROMBase limits the precision for the data used in SelectSwapQROM.
For some applications, the target bitsize for the data I need to load is quite high. I am able to represent them as integers since Python integers have unlimited precision, but the use of a numpy array above results in the error RuntimeWarning: invalid value encountered in cast
and prevents resource analysis.
To reproduce the error:
powers = [61,62,63,64]
for p in powers:
data = [2**p,2**p-2**32,2**p-2**50]
qroam_gate = SelectSwapQROM([data],target_bitsizes=(max(data).bit_length(),),selection_bitsizes=(len(data),))
print(t_complexity(qroam_gate))