forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deduplicate and unify VF2 layout passes
In Qiskit#7862 we recently added a new vf2 post layout pass which is designed to run after routing to improve the layout once we know there is at least one isomorphic subgraph in the coupling graph for the interactions in the circuit. In that PR we still ran vf2 post layout even if vf2 layout pass found a match. That's because the heuristic scoring of layouts used for the vf2 layout and vf2 post layout passes were different. Originally this difference was due to the the vf2 post layout pass being intedended to run after the optimization loop where we could guarantee the gates were in the target and exactly score the error for each potential layout. But since the vf2 post layout was updated to score a layout based on the gate counts for each qubit and the average 1q and 2q instruction error rates we can leverage this better heuristic scoring in the vf2 layout pass. This commit updates the vf2 layout pass to use the same heuristic and deduplicates some of the code between the passes at the same time. Additionally, since the scoring heuristics are the same the preset pass managers are updated to only run vf2 post layout if vf2 layout didn't find a match. If vf2 layout finds a match it's going to be the same as what vf2 post layout finds so there is no need to run the vf2 post layout pass anymore.
- Loading branch information
Showing
8 changed files
with
244 additions
and
161 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
Oops, something went wrong.