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

Remove unnecessary numpy build dependency #2089

Merged
merged 1 commit into from
Mar 29, 2024
Merged

Conversation

wshanks
Copy link
Contributor

@wshanks wshanks commented Mar 28, 2024

numpy C bindings are handled through pybind11 which does not depend on numpy. numpy is otherwise only a runtime dependency of qiskit-aer. This change just saves a download during build.

numpy C bindings are handled through pybind11 which does not depend on
numpy. numpy is otherwise only a runtime dependency of qiskit-aer. This
change just saves a download during build.
@wshanks
Copy link
Contributor Author

wshanks commented Mar 28, 2024

pybind11's most recent release supports numpy 2.0. I was curious if building with that was enough to enable numpy 2.0 support qiskit-aer, but I found it too hard to test completely because not all dependencies have versions that support numpy 2.0 yet (matplotlib, sympy, pandas, even qiskit and rustworkx). I was able to run almost all the tests though and everything that could run passed except some visualization tests that failed because of sympy/sympy#26094 (and some visualization tests failed to run because the version of matplotlib I used did not work with numpy 2.0).

@jakelishman
Copy link
Member

Will: you might be interested in Qiskit/qiskit#11999 - I was able to do a full test against Numpy 2.0 successfully. Fwiw, since that PR, Scipy released a 1.13.0rc1 that has Numpy 2.0 support, and the other components are pretty easy to build from source to test - I found them all sufficiently compatible with Numpy 2.0 to not cause problems for Terra.

@wshanks
Copy link
Contributor Author

wshanks commented Mar 28, 2024

Thanks @jakelishman. I built matplotlib's and sympy's main branches locally and was able to see all tests pass with numpy 2.0! I tried to install numpy 2.0 into an environment with qiskit-aer 0.13 and saw lots of errors, so it seems like a new release built against the new pybind11 should take care of numpy 2.0 support for qiskit-aer.

@doichanj doichanj merged commit bf34aef into Qiskit:main Mar 29, 2024
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants