-
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.
Add more default trials to sabre layout (#13360)
* Add more default trials to sabre layout Right now sabre layout uses n random trials (as specified by the user or defaulting to num_cpus) and since #12453 one additional trial taking the qubits of the densest subgraph as a starting point. There are also a couple of other trivial examples to try which may or may not produce better results depending on the circuit, a trivial layout and a reverse trivial layout. In the case of a hardware efficient circuit the trivial layout will map exactly and would always be picked. When running in a preset pass manager sabre should never be called in this scenario because VF2Layout will find the mapping, but the incremental cost of adding the trial is minimal. Similarly the cost of a reversed trivial layout (where virtual qubit 0 -> n, 1 -> n - 1, etc.) is trivial and may in some scenarios produce a better results. * Update layouts for failing tests * Add ring layouts for common connectivity graphs * Add release notes and docs * Apply suggestions from code review Co-authored-by: Elena Peña Tapia <[email protected]> * Fix lint --------- Co-authored-by: Elena Peña Tapia <[email protected]>
- Loading branch information
Showing
4 changed files
with
80 additions
and
3 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
11 changes: 11 additions & 0 deletions
11
releasenotes/notes/add-more-sabre-trials-9b421f05d2f48d18.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,11 @@ | ||
--- | ||
features_transpiler: | ||
- | | ||
The :class:`.SabreLayout` transpiler pass has been updated to run an | ||
additional 2 or 3 layout trials by default independently of the | ||
``layout_trials`` keyword argument's value. A trivial | ||
layout and its reverse are included for all backends, just like the :class:`.DenseLayout` | ||
trial that was added in 1.2.0. In addition to this, the largest rings on | ||
an IBM backend heavy hex connectivity graph are added if the backends are 127, | ||
133, or 156 qubits. This can provide a good starting point for some circuits on these commonly run | ||
backends, while for all others it's just an additional "random trial". |
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