-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Switch default routing/layout method to sabre for opt level 3 #7205
Conversation
Marking as on hold until #7036 merges because I don't think we want to do this without having that performance improvement |
To see the improvement in the quality of results you can look at the nightly benchmarks here:
Which is comparing the depth of the output circuits at optimization level 3 with different routing and layout method combinations. |
This commit switches the default routing and layout method for optimization level 3 to use SabreSwap and Sabre layout passes. The quality of results is typically better with sabre than the default stochastic swap and dense layout we're using now. For optimization level 3 where we try to produce the best quality result and runtime is of secondary concern using sabre makes the most sense (especially after Qiskit#7036 which improves the runtime performance). Also for optimization level 3 currently sabre is typically faster because we increase the number of trials for stochastic swap (which is generally significantly faster) which slows it down as it's doing more work. This should improve the quality and speed of the results in general when running with optimization level 3. In the future we can do more work to improve the runtime performance of the sabre passes and hopefully make it fast enough to use for all the optimization levels which have more constraints on the run time performance than level 3. Related to Qiskit#7112 and Qiskit#7200
Also: https://nonhermitian.org/posts/2021/2021-10-31-best_swap_mapper_qiskit.html is relevant here too |
releasenotes/notes/sabre-opt-lvl3-default-550924470d683112.yaml
Outdated
Show resolved
Hide resolved
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 is just a straightforwards swap - doesn't look like anything should go wrong, since we're already testing Sabre significantly. I'll look at #7036 as well.
Pull Request Test Coverage Report for Build 1483085405
💛 - Coveralls |
Summary
This commit switches the default routing and layout method for
optimization level 3 to use
SabreSwap
andSabreLayout
passes. Thequality of results is typically better with sabre than the default
stochastic swap and dense layout we're using now. For optimization
level 3 where we try to produce the best quality result and runtime
is of secondary concern using sabre makes the most sense (especially
after #7036 which improves the runtime performance). Also for
optimization level 3 currently sabre is typically faster because we
increase the number of trials for stochastic swap (which is generally
significantly faster) which slows it down as it's doing more work.
This should improve the quality and speed of the results in general
when running with optimization level 3. In the future we can do more
work to improve the runtime performance of the sabre passes and
hopefully make it fast enough to use for all the optimization levels
which have more constraints on the run time performance than level 3.
Details and comments
Related to #7112 and #7200