-
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 handling of BackendV1 simulators in PassManagerConfig.from_backend #9719
Conversation
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
This commit fixes two small oversights that would appear when calling PassManagerConfig.from_backend() with a simulator BackendV1 backend. The handling of optional fields in the BackendProperties and PulseDefaults objects for BackendV1 backends was missing that a BackendProperties object's gates field could be None and that the defaults() method could return None in the absense of any pulse calibrations (both of which typically only are True for simulators). In these cases this would cause an error constructing the InstructionDurations object and the InstructionScheduleMap object respectively. This fixes the handling of these edge cases so that PassManagerConfig.from_backend() will work with any BackendV1 based backend. Fixes Qiskit#8546 Fixes Qiskit#9265
6d40c29
to
78ef8e8
Compare
Pull Request Test Coverage Report for Build 4327089103
💛 - 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.
simple and straightforward. Thanks!
#9719) This commit fixes two small oversights that would appear when calling PassManagerConfig.from_backend() with a simulator BackendV1 backend. The handling of optional fields in the BackendProperties and PulseDefaults objects for BackendV1 backends was missing that a BackendProperties object's gates field could be None and that the defaults() method could return None in the absense of any pulse calibrations (both of which typically only are True for simulators). In these cases this would cause an error constructing the InstructionDurations object and the InstructionScheduleMap object respectively. This fixes the handling of these edge cases so that PassManagerConfig.from_backend() will work with any BackendV1 based backend. Fixes #8546 Fixes #9265 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 35feded)
#9719) (#9725) This commit fixes two small oversights that would appear when calling PassManagerConfig.from_backend() with a simulator BackendV1 backend. The handling of optional fields in the BackendProperties and PulseDefaults objects for BackendV1 backends was missing that a BackendProperties object's gates field could be None and that the defaults() method could return None in the absense of any pulse calibrations (both of which typically only are True for simulators). In these cases this would cause an error constructing the InstructionDurations object and the InstructionScheduleMap object respectively. This fixes the handling of these edge cases so that PassManagerConfig.from_backend() will work with any BackendV1 based backend. Fixes #8546 Fixes #9265 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 35feded) Co-authored-by: Matthew Treinish <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Qiskit#9719) This commit fixes two small oversights that would appear when calling PassManagerConfig.from_backend() with a simulator BackendV1 backend. The handling of optional fields in the BackendProperties and PulseDefaults objects for BackendV1 backends was missing that a BackendProperties object's gates field could be None and that the defaults() method could return None in the absense of any pulse calibrations (both of which typically only are True for simulators). In these cases this would cause an error constructing the InstructionDurations object and the InstructionScheduleMap object respectively. This fixes the handling of these edge cases so that PassManagerConfig.from_backend() will work with any BackendV1 based backend. Fixes Qiskit#8546 Fixes Qiskit#9265 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Summary
This commit fixes two small oversights that would appear when calling PassManagerConfig.from_backend() with a simulator BackendV1 backend. The handling of optional fields in the BackendProperties and PulseDefaults objects for BackendV1 backends was missing that a BackendProperties object's gates field could be None and that the defaults() method could return None in the absense of any pulse calibrations (both of which typically only are True for simulators). In these cases this would cause an error constructing the InstructionDurations object and the InstructionScheduleMap object respectively. This fixes the handling of these edge cases so that PassManagerConfig.from_backend() will work with any BackendV1 based backend.
Details and comments
Fixes #8546
Fixes #9265