forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling of BackendV1 simulators in PassManagerConfig.from_backend (
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>
- Loading branch information
1 parent
d8cbe10
commit f2682df
Showing
4 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
9 changes: 9 additions & 0 deletions
9
releasenotes/notes/fix-backendv1-pm-config-from-backend-914869dd6e1c06be.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixed an issue with the :meth:`.PassManagerConfig.from_backend` | ||
constructor method when it was used with a :class:`~.BackendV1` based | ||
simulator backend. For some simulator backends which did not populate | ||
some optional fields the constructor would error. | ||
Fixed `#9265 <https://github.com/Qiskit/qiskit-terra/issues/9265>`__ and | ||
`#8546 <https://github.com/Qiskit/qiskit-terra/issues/8546>`__ |
This file contains 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