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

Pin Numpy < 2 in requirements #10893

Merged
merged 1 commit into from
Sep 23, 2023
Merged

Conversation

jakelishman
Copy link
Member

Summary

We have compiled extensions that are built against the Numpy C API. The Numpy transition guide for developers of downstream packages1 encourages us to put in this pin until we have wheels built against the newer version, which is not expected to be fully ABI compatible (but extensions built against Numpy 2 should work with older Numpys).

Note that this won't prevent package managers from resolving older versions of Qiskit (which don't have the pin) along with Numpy 2, but there's not a vast amount we can do about that now.

Summary

Details and comments

Footnotes

  1. https://github.com/numpy/numpy/issues/24300

We have compiled extensions that are built against the Numpy C API.  The
Numpy transition guide for developers of downstream packages[^1]
encourages us to put in this pin until we have wheels built against the
newer version, which is not expected to be fully ABI compatible (but
extensions built against Numpy 2 _should_ work with older Numpys).

Note that this won't prevent package managers from resolving _older_
versions of Qiskit (which don't have the pin) along with Numpy 2, but
there's not a vast amount we can do about that now.

[^1]: numpy/numpy#24300
@jakelishman jakelishman added type: qa Issues and PRs that relate to testing and code quality Changelog: API Change Include in the "Changed" section of the changelog labels Sep 22, 2023
@jakelishman jakelishman added this to the 0.45.0 milestone Sep 22, 2023
@jakelishman jakelishman requested a review from a team as a code owner September 22, 2023 17:39
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6277399015

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 18 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.001%) to 87.271%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 6 91.92%
crates/qasm2/src/parse.rs 12 96.67%
Totals Coverage Status
Change from base Build 6277377045: 0.001%
Covered Lines: 74304
Relevant Lines: 85142

💛 - Coveralls

Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the right thing to do, considering we know we're not numpy 2.0 ready yet until we close #10889. That being said we don't actually have a build time dependency on numpy, the ffi is manually defined in rust-numpy and we build against that rust interface. If there are big breaking changes in the API though I expect rust-numpy will need to be updated so we can interoperate with it. Either way, leaving the cap in place proactively until we know for sure qiskit works with numpy 2.0 is prudent

@jakelishman
Copy link
Member Author

Yeah, my hope is to be ready as soon after the release of the 2.0rc as possible, and to revert this pin as soon as we are.

@mtreinish mtreinish enabled auto-merge September 22, 2023 19:52
@mtreinish mtreinish added this pull request to the merge queue Sep 22, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 22, 2023
@jakelishman jakelishman added this pull request to the merge queue Sep 22, 2023
Merged via the queue into Qiskit:main with commit 846d329 Sep 23, 2023
13 checks passed
@jakelishman jakelishman deleted the numpy/pin-less-2 branch September 23, 2023 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: API Change Include in the "Changed" section of the changelog type: qa Issues and PRs that relate to testing and code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants