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

Fix tutorials to work with Qiskit 1.0 #610

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

woodsp-ibm
Copy link
Member

Summary

Qiskit 1,0 removed the deprecated qiskit.tools which included some .jupyter from which the magics that did the version and copyright were imported. This PR adds a local file in the tutorials folder that contains just these magics and changes the import to use this.

Similar fix to qiskit-community/qiskit-algorithms#156

I removed an import from qiskit.tools which is now gone - the import did not seem to be used anymore

I also tweaked one of the imports so it does not import direct from the module but just from qiskit_algorithms.utils

Details and comments

I do not expect this to pass until the other failures are sorted. A new release of Qiskit Algorithms is required to work with Qiskit 1.0, but at least its ready.

@woodsp-ibm
Copy link
Member Author

Qiskit Algorithms 0.3.0 was released so all passes - well its failing in testing the stable set of tutorials that are there against main here. Since this is intended to be backported to fix them too that will have to be ignored.

@woodsp-ibm woodsp-ibm added stable backport potential The bug might be minimal and/or import enough to be port to stable type: documentation Issues related to documentation labels Feb 19, 2024
@woodsp-ibm woodsp-ibm mentioned this pull request Feb 19, 2024
@woodsp-ibm
Copy link
Member Author

@t-imamichi This is ready to go - we will have to bypass the branch protections for the failure of the stable tutorials (they will not work until this is backported as the copyright/version does not exist in qiskit.tools anymore).

@t-imamichi
Copy link
Collaborator

Tutorial test with Python 3.8 fails. Could you take a look at it?

@woodsp-ibm
Copy link
Member Author

woodsp-ibm commented Feb 20, 2024

Tutorial test with Python 3.8 fails. Could you take a look at it?

@t-imamichi As I commented above its the testing of the tutorials that are in the stable branch. We do this just on 3.8 (the 3.11 passes as its not done there) and its done to make sure they still work with whatever changes are done in main to ensure compatibility. But in this case its not a change in main but in Qiskit and they are going to fail since they still have the former copyright and version that this PR changes since qiskit.tools no longer exists in Qiskit 1.0. This PR will need to be merged as-is which will require bypassing the branch rule as I mentioned - once backported to stable it will fix them there. (This was already done for Nature and ML where it was the same thing - you can see in Finance, that also has yet to be done, its the same too)

Copy link
Collaborator

@t-imamichi t-imamichi left a comment

Choose a reason for hiding this comment

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

Sorry. I missed your comments above. LGTM.

@t-imamichi t-imamichi merged commit dea16dd into qiskit-community:main Feb 20, 2024
13 of 14 checks passed
mergify bot pushed a commit that referenced this pull request Feb 20, 2024
mergify bot added a commit that referenced this pull request Feb 20, 2024
(cherry picked from commit dea16dd)

Co-authored-by: Steve Wood <[email protected]>
@woodsp-ibm woodsp-ibm deleted the fix_tutorials branch February 20, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge stable backport potential The bug might be minimal and/or import enough to be port to stable type: documentation Issues related to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants