-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 v2 pulse drawer #12608
Fix v2 pulse drawer #12608
Conversation
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 9592725734Details
💛 - Coveralls |
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 fix @nkanazawa1989, if you'd like we can try to include it in the 1.1.1 release today, I want to do it in a few hours, so all we need is for lint to pass (added a suggestion below). Else, we can always just add it to 1.2.
qubit_channel_map[qind].extend(configuration.control(qubits=(qind, tind))) | ||
except BackendConfigurationError: | ||
pass | ||
elif isinstance(backend, BackendV2): |
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.
Lint is complaining about this being an elif instead of an else. I think it is reasonable to assume that the default is BackendV2
and not do the instance check
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.
The other thing we sometimes do is to be more defensive and do the check, in order to raise an explicit RuntimeError("backend object not yet supported")
for a clearer message - we don't have a BackendV3
, but it's not inconceivable that we will expand in the future and have this same bug again.
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, I pushed Jake's suggestion to be able to include the PR in 1.1.1.
https://github.com/Mergifyio backport stable/0.46 stable/1.1 |
✅ Backports have been created
|
Pull Request Test Coverage Report for Build 9596352057Warning: 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 |
Pull Request Test Coverage Report for Build 9596940272Warning: 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 |
* fix error when V2 model is set * Apply suggestions from code review * Fix black --------- Co-authored-by: Elena Peña Tapia <[email protected]> Co-authored-by: Elena Peña Tapia <[email protected]> (cherry picked from commit 7d1731b)
* fix error when V2 model is set * Apply suggestions from code review * Fix black --------- Co-authored-by: Elena Peña Tapia <[email protected]> Co-authored-by: Elena Peña Tapia <[email protected]> (cherry picked from commit 7d1731b)
* fix error when V2 model is set * Apply suggestions from code review * Fix black --------- Co-authored-by: Elena Peña Tapia <[email protected]> Co-authored-by: Elena Peña Tapia <[email protected]> (cherry picked from commit 7d1731b) Co-authored-by: Naoki Kanazawa <[email protected]>
* fix error when V2 model is set * Apply suggestions from code review * Fix black --------- Co-authored-by: Elena Peña Tapia <[email protected]> Co-authored-by: Elena Peña Tapia <[email protected]> (cherry picked from commit 7d1731b) Co-authored-by: Naoki Kanazawa <[email protected]>
* fix error when V2 model is set * Apply suggestions from code review * Fix black --------- Co-authored-by: Elena Peña Tapia <[email protected]> Co-authored-by: Elena Peña Tapia <[email protected]>
Summary
v2 pulse drawer crashes when the draw function is called with a V2 backend that doesn't have configuration and defaults attributes. Since qiskit-ibm-runtime 0.24 was released and fake V1 backends were deprecated, we should to support visualization with fake V2 backends that doen't have configuration and defaults attributes.
Details and comments