-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add support for Python 3.11 Python 3.11.0 was released on 10-24-2022, this commit marks the start of support for Python 3.11 in qiskit. It adds the supported Python version in the package metadata and updates the CI configuration to run test jobs on Python 3.11 and build Python 3.11 wheels on release. * Fix inspect.Parameter usage for API change in 3.11 Per the Python 3.11.0 release notes inspect.Parameter now raises a ValueError if the name argument is a Python identifier. This was causing a test failure in one case where a parameter named `lambda` was used. This commit adjusts the parameter name in the tests to be lam to avoid this issue. * Set a version cap on the jax dev requirement Currently jax doesn't publish Python 3.11 wheels which is blocking test runs with python 3.11. Since jax is an optional package only used for the gradient package we can just skip it as isn't a full blocker for using python 3.11. This commit sets an environment marker on the jax dev requirements to only try to install it on Python < 3.11. * Set python version cap on cplex in CI * DNM: Test wheel builds work * Skip tests on i686/win32 wheel buids with python 3.11 * Revert "DNM: Test wheel builds work" This reverts commit 725c21b. * Run QPY backwards compat tests on trailing edge Python version This commit moves the qpy backwards compatibility testing from the leading edge python version, which in this PR branch is Python 3.11, to the trailing edge Python version which is currently 3.7. Trying to add support for a new Python version has demonstrated that we can't use the leading edge version as historical versions of Qiskit used to generate old QPY payloads are not going to be generally installable with newer Python versions. So by using the trailing edge version instead we can install all the older versions of Qiskit as there is Python compatibility for those Qiskit versions. Eventually we will need to raise the minimum Qiskit version we use in the QPY tests, when Python 3.9 goes EoL in October 2025 and Qiskit Terra 0.18.0 no longer has any supported versions of Python it was released for. We probably could get by another year until Python 3.10 goes EoL in 2026 it just means we're building 0.18.x and 0.19.x from source for the testing, but when Python 3.11 becomes our oldest supported version we'll likely have to bump the minimum version. This does go a bit counter to the intent of the test matrix to make the first stage return fast and do a more through check in the second stage. But, in this case the extra runtime is worth the longer term stability in the tests. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 75d66dd)
- Loading branch information
1 parent
e61b93f
commit a770e21
Showing
10 changed files
with
18 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters