-
Notifications
You must be signed in to change notification settings - Fork 168
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
Update use of classes removed in Qiskit 2.0 #2173
Conversation
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 @ElePT!
Cancelling the integration tests because they shouldn't run in PRs |
if Version(qiskit_version) == "2": | ||
from qiskit.result import MeasLevel, MeasReturnType | ||
else: | ||
from qiskit.qobj.utils import MeasLevel, MeasReturnType |
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 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
?
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.
Ah right, I'll fix that in a separate PR
Summary
Qiskit/qiskit#13793 removes the
qobj
module. A consequence of this removal is the move ofMeasLevel
andMeasResult
fromqiskit.qobj.utils
toqiskit.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
BackendConfiguration
andBackendProperties
classes 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