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
Setting qutip-qip as an optional plugin for qutip-5 [unitaryhack] #1920
Conversation
Ah yes, that constraint was there to prevent accidentally using This also means that adding To test it on GitHub action we need to install |
Completely up to you, of course! If you choose to drop the optional dependency for now, I can also just put those changes on another PR to be merged when the time is right. |
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.
I made some suggestions to make it possible to always run the tests.
Regarding the suggestions in the TODO list:
I'm wondering about this. Having
This we should not do -- we don't want anything in core qutip to accidentally require qutip_qip (that was sort of the point of the family packages). |
I understand Nonetheless, since there is not yet a released |
Sure, no need for that anymore, I'll edit the description. |
Perhaps installing |
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.
I had a few more ideas about how to test this nicely.
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.
Looks good!
@BoxiLi I'd like you to approve to since this is a very important link to Once we have Boxi's approval and the tests pass, I think we can consider this done. |
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.
Looks great! Also tested it locally with/without an installed qutip-qip
.
Description
qutip.qip
seamlessly as imports ofqutip_qip
qutip_qip
is installed and when not.Related issues or PRs
Incorporates the ideas in the discussion of #1500.
Fixes #1893.
Todos and questions
Have(will be left for a future PR)qutip-qip
be an optional dependencyAdd installation ofqutip-qip
to the CI workflowI have a draft of these changes locally, but they fail due to a dependency conflict:
qutip_qip
currently requiresqutip<5 and >=4.6
while these changes are being implemented inv5.0.0.dev
, ie>5
. This will cause the unit test wherequtip_qip
is installed to be skipped. Any ideas on how to get around this?Edit: Uses a stub for the
qutip_qip
package in the units tests instead, which removes the need of havingqutip-qip
installed.Changelog
Allow imports of
qutip.qip
seamlessly as imports ofqutip_qip
.Have
qutip-qip
be an optional dependency.