-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Remove sympy as a hard dependency #14396
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
Conversation
One or more of the following people are relevant to this code:
|
Oh looks like a few tests are missing skip decorators so the tests without optionals installed are failing. |
Pull Request Test Coverage Report for Build 15395252099Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
c72288c
to
1544896
Compare
With the move to symbolic expression class added in Qiskit#13278 the dependency on sympy is no longer as core to the Qiskit package as it was in the past. The only pieces that are still reliant on it are QPY deserialization of payloads older than QPY v13 and some small visualization utilities where sympy is used to generate the output. Since this functionality is not core to the library and only used in some less common use cases we no longer need to install sympy for every installation of Qiskit. In preparation for this Qiskit 2.0 laid the groundwork by marking all uses of sympy in Qiskit as being fallible if sympy was not installed and documented that sympy is not guaranteed to be installed with Qiskit anymore. This commit implements this change and moves sympy to be an optional dependency only used by some small components.
1544896
to
fc437ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Co-authored-by: Julien Gacon <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the additional info -- let's see if anyone complains after the release, or if we correctly identified these bits as "not used so much" 😛
* Remove sympy as a hard dependency With the move to symbolic expression class added in Qiskit#13278 the dependency on sympy is no longer as core to the Qiskit package as it was in the past. The only pieces that are still reliant on it are QPY deserialization of payloads older than QPY v13 and some small visualization utilities where sympy is used to generate the output. Since this functionality is not core to the library and only used in some less common use cases we no longer need to install sympy for every installation of Qiskit. In preparation for this Qiskit 2.0 laid the groundwork by marking all uses of sympy in Qiskit as being fallible if sympy was not installed and documented that sympy is not guaranteed to be installed with Qiskit anymore. This commit implements this change and moves sympy to be an optional dependency only used by some small components. * Add sympy to backwards compat qpy jobs * Update release notes * Update releasenotes/notes/no-sympy-19687d5ca814042c.yaml Co-authored-by: Julien Gacon <[email protected]> --------- Co-authored-by: Julien Gacon <[email protected]>
Summary
With the move to symbolic expression class added in #13278 the
dependency on sympy is no longer as core to the Qiskit package as it was
in the past. The only pieces that are still reliant on it are QPY
deserialization of payloads older than QPY v13 and some small
visualization utilities where sympy is used to generate the output.
Since this functionality is not core to the library and only used in
some less common use cases we no longer need to install sympy for every
installation of Qiskit. In preparation for this Qiskit 2.0 laid the
groundwork by marking all uses of sympy in Qiskit as being fallible if
sympy was not installed and documented that sympy is not guaranteed to
be installed with Qiskit anymore.
This commit implements this change and moves sympy to be an optional
dependency only used by some small components.
Details and comments
This is based on #14389 and #14391 and will need to be rebased after those PRs merge, Until that is done you can view the contents of just this PR with the head commit: c72288cNow that both dependencies have merged this has been rebased.