-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Simplify SabrePreLayout based on recent improvements to the VF2 search #15366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Simplify SabrePreLayout based on recent improvements to the VF2 search #15366
Conversation
|
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 19963223115Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you split the new benchmark out into a separate pr? That will oet let us start tracking perform independently sooner but also track improvements or regressions caused by functional PRs to qiskit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense, removed the ASV change in 5fba876.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the benchmark in #15419.
Summary
While reviewing/experimenting with Jake's recent improvements to
VF2(especially the on-the-fly scoring mechanism and the revamp ofVF2LayoutandVF2PostLayoutpasses), I've realized that the (very expensive) extra minimization stage ofSabrePreLayoutis now completely obsolete -- as this minimization is now fully handled by theVF2Layoutitself (both in a much better and a much more performant way). This PR removes the obsolete logic, and updates the pass description (including the description of the argumentsmax_trials_vf2andmax_calls_vf2to match the relevant argument ofVF2Layout).Details and comments
The
SabrePreLayoutpass only helps for a very niche set of examples (such as mapping ring-connected circuits into heavy-hex coupling maps) and hence is not included in the default pipeline. Possibly we could include it foroptimization_level=3.If the pass were to be integrated into the transpiler pipeline, it would be run after the
VF2Layoutpass. To avoid repeating the computation of checking whether there is a perfect map from the circuit's interaction graph into the device connectivity graph, I have added a new argumentmin_distance; setting it to2would skip the unnecessary check.I have also added a new ASV benchmark for transpiling theefficient_su2(num_qubits=89)circuit into the heavy-hex graph. We already have a similarefficient_su2(num_qubits=100)benchmark, for which VF2 can find a perfect mapping. For89the perfect mapping does not exist. Note that Benchpress has both89and100benchmarks.