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
Right now sabre layout uses n random trials (as specified by the user or defaulting to num_cpus) and since Qiskit#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.
- Loading branch information