-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tracking of routing permutation in Sabre with disjoint backends (#…
…13833) If the backing coupling graph is disjoint, and unused components of the coupling graph would not be considered when constructing the complete routing permutation. In practice, Sabre aborts immediately after layout without attempting to route, if it needed to split the DAG across more than one disjoint component, because it can't guarantee correctness of the final routing in the presence of component-spanning barriers or classical communication, so the only way for a component to be forgotten is if the backend is disjoint, but the DAG fits into a single component.
- Loading branch information
1 parent
3eb3538
commit b933179
Showing
3 changed files
with
43 additions
and
0 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/sabre-disjoint-routing-85c6f6481c9ffca4.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: | ||
- | | ||
When :class:`.SabreLayout` is used to do both layout and routing simultaneously (as is the case | ||
for the default options to :func:`.transpile` and :func:`.generate_preset_pass_manager`) on a | ||
:class:`.Target` or :class:`.CouplingMap` with disjoint connectivity, and the input circuit fits | ||
into a single component of the coupling map, the routing permutation will now be tracked | ||
correctly. | ||
Previously, any qubits in the coupling map that were not connected, even indirectly, to a qubit | ||
used by the routed circuit would not be included in the final routing permutation. This could | ||
cause surprising behaviour a long way from the point of failure, even if compilation appeared to | ||
succeed, such as calls to :meth:`.TranspileLayout.final_index_layout` raising :exc:`KeyError`. | ||
This bug did not affect backends that were fully connected, as most are. |
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