You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When installing and trying to use mqt.bench, the import functions throw an attribute error:
AttributeError: np.float_ was removed in the NumPy 2.0 release. Use np.float64 instead.
Referenced code:
from mqt.bench import get_benchmark
"get a benchmark circuit on algorithmic level representing the GHZ state with 5 qubits
qc_algorithmic_level = get_benchmark(benchmark_name="dj", level="alg", circuit_size=5)
"draw the circuit
print(qc_algorithmic_level.draw())
Expected behavior
Successful import
How to Reproduce
Clean Environment
pip install mqt.bench
execute reference code
The text was updated successfully, but these errors were encountered:
Hey 👋🏻
Thanks for raising this issue. This is just another case of incompatibility with numpy 2.0.
You can work around this for now by installing any numpy version < 2.
pip install --force-reinstall "numpy<2"
I'll keep this issue open until we put a temporary upper cap on numpy in MQT Bench itself.
Environment information
Description
When installing and trying to use mqt.bench, the import functions throw an attribute error:
AttributeError:
np.float_
was removed in the NumPy 2.0 release. Usenp.float64
instead.Referenced code:
from mqt.bench import get_benchmark
"get a benchmark circuit on algorithmic level representing the GHZ state with 5 qubits
qc_algorithmic_level = get_benchmark(benchmark_name="dj", level="alg", circuit_size=5)
"draw the circuit
print(qc_algorithmic_level.draw())
Expected behavior
Successful import
How to Reproduce
The text was updated successfully, but these errors were encountered: