-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PassManagerConfig.from_backend with BackendV1 and no CouplingMap (#…
…10172) * Fix PassManagerConfig.from_backend with BackendV1 and no CouplingMap This commit fixes an issue in the PassManagerConfig.from_backend constructor method when using BackendV1 based simulator backends. The pass was incorrectly handling the case when the backend configuration didn't have a coupling map defined and incorrectly creating a coupling map with 0 qubits instead of using None to indicate the lack of connectivity. This has been fixed so the coupling map creation is skipped if there is no coupling map attribute in the backend's configuration. Fixes #10171 * Fix tests (cherry picked from commit 4762e26)
- Loading branch information
1 parent
5f39f6b
commit 2cb96b0
Showing
3 changed files
with
14 additions
and
2 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
9 changes: 9 additions & 0 deletions
9
releasenotes/notes/fix-pm-config-from-backend-f3b71b11858b4f08.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 | ||
when building a :class:`~.PassManagerConfig` object from a :class:`~.BackendV1` | ||
instance that didn't have a coupling map attribute defined. Previously, the | ||
constructor would incorrectly create a :class:`~.CouplingMap` object with | ||
0 qubits instead of using ``None``. | ||
Fixed `#10171 <https://github.com/Qiskit/qiskit-terra/issues/10171>`__ |
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