-
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 transpile() with a Target containing an ideal Measure (#8995)
This commit fixes an oversight in the transpile() function when running with a Target (either directly or via a backend) that contains a Measurement operation that is ideal (either globally or locally) with no properties defined. This was not handled correctly in the function used to convert a Target to a BackendProperties payload for passes that are not yet target aware and this would cause an exception to be raised. This commit fixes this edge case and excludes readout properties from the generated BackendProperties in this case. Fixes #8969 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 72ba2ee)
- Loading branch information
1 parent
8eed4fa
commit 41aae94
Showing
3 changed files
with
42 additions
and
18 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
10 changes: 10 additions & 0 deletions
10
releasenotes/notes/fix-transpile-ideal-measurement-c37e04533e196ded.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,10 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixed an issue with :func:`~.transpile` when targeting a :class:`~.Target` | ||
(either directly via the ``target`` argument or via a | ||
:class:`~.BackendV2` instance from the ``backend`` argument) that | ||
contained an ideal :class:`~.Measure` instruction (one that does not have | ||
any properties defined). Previously this would raise an exception | ||
trying to parse the target. | ||
Fixed `#8969 <https://github.com/Qiskit/qiskit-terra/issues/8969>`__ |
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