Update use of classes removed in Qiskit 2.0#2173
Merged
Conversation
5 tasks
kt474
approved these changes
Mar 5, 2025
Contributor
|
Cancelling the integration tests because they shouldn't run in PRs |
wshanks
reviewed
Mar 5, 2025
Comment on lines
+58
to
+61
| if Version(qiskit_version) == "2": | ||
| from qiskit.result import MeasLevel, MeasReturnType | ||
| else: | ||
| from qiskit.qobj.utils import MeasLevel, MeasReturnType |
Contributor
There was a problem hiding this comment.
I just tried this out and it doesn't work for me 😞 Version('2.0.0.dev0+9717823') == "2" is False. Maybe something like Version(qiskit_version).major >= 2?
Contributor
There was a problem hiding this comment.
Ah right, I'll fix that in a separate PR
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Qiskit/qiskit#13793 removes the
qobjmodule. A consequence of this removal is the move ofMeasLevelandMeasResultfromqiskit.qobj.utilstoqiskit.result. This PR allows to import from both paths for compatibility with 1.x and 2.x.The same PR removes configuration and property errors. Because the
BackendConfigurationandBackendPropertiesclasses have been vendored in qiskit-ibm-runtime, the errors should be too.Details and comments
Fixes #
This PR will allow to fix: Qiskit/qiskit-neko#52