-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 global ideal gates for target build_coupling_map() (#…
…8977) * Fix handling of global ideal gates for target build_coupling_map() This commit fixes the handling of the `build_coupling_map()` method so that it correctly handles edge cases around a mix of ideal globally available gates and gates that have qubit/connectivity constraints. Previously, the method would incorrectly treat the presence of a globally defined ideal gate as meaning there were no connectivity constraints, even if that global gate was only on 1 qubit. While if the gate operates on two qubits this is correct behavior. Fixes #8971 * Add test for single qarg non-ideal case
- Loading branch information
Showing
3 changed files
with
71 additions
and
6 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
15 changes: 15 additions & 0 deletions
15
releasenotes/notes/fix-mixed-ideal-target-coupling-map-7fca04f9c5139a49.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,15 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixed an issue with the :meth:`.Target.build_coupling_map` method where | ||
it would incorrectly return ``None`` for a :class:`~.Target` object | ||
with a mix of ideal globally available instructions and instructions | ||
that have qubit constraints. Now in such cases the | ||
:meth:`.Target.build_coupling_map` will return a coupling map for the | ||
constrained instruction (unless it's a 2 qubit operation which will | ||
return ``None`` because globally there is no connectivity constraint). | ||
Fixed `#8971 <https://github.com/Qiskit/qiskit-terra/issues/8971>`__ | ||
- | | ||
Fixed an issue with the :attr:`.Target.qargs` attribute where it would | ||
incorrectly return ``None`` for a :class:`~.Target` object that contained | ||
any globally available ideal instruction. |
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