Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestBravyiKitaevSuperFastMapper::test_h2 fails with NumPy >= 2.0 #1370

Open
iyanmv opened this issue Dec 22, 2024 · 0 comments · May be fixed by #1371 or #1374
Open

TestBravyiKitaevSuperFastMapper::test_h2 fails with NumPy >= 2.0 #1370

iyanmv opened this issue Dec 22, 2024 · 0 comments · May be fixed by #1371 or #1374
Labels

Comments

@iyanmv
Copy link

iyanmv commented Dec 22, 2024

Environment

  • Qiskit Nature version: 0.7.2
  • Python version: 3.13.1
  • Operating system: Arch Linux

What is happening?

The test TestBravyiKitaevSuperFastMapper::test_h2 from test/second_q/mappers/test_bksf_mapper.py fails because it uses np.alltrue(), which was deprecated in NumPy 1.25.0 and removed in NumPy 2.0.

How can we reproduce the issue?

Try to run the tests with a recent version of NumPy.

What should happen?

Test works on supported versions of NumPy

Any suggestions?

Replace np.alltrue() with np.all() as explained in the NumPy 2.0 migration guidelines.

@iyanmv iyanmv added the bug label Dec 22, 2024
iyanmv added a commit to iyanmv/qiskit-nature that referenced this issue Dec 22, 2024
numpy.alltrue() was deprecated in NumPy 1.25.0 and removed in NumPy 2.0.
Because of this, test_h2 fails on recent versions of NumPy.

Fixes: qiskit-community#1370
@iyanmv iyanmv linked a pull request Dec 22, 2024 that will close this issue
@ftroisi ftroisi linked a pull request Jan 15, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant