Skip to content
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

Change the default routing_method to sabre #12806

Merged
merged 3 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qiskit/transpiler/preset_passmanagers/level0.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def level_0_pass_manager(pass_manager_config: PassManagerConfig) -> StagedPassMa
initial_layout = pass_manager_config.initial_layout
init_method = pass_manager_config.init_method or "default"
layout_method = pass_manager_config.layout_method or "default"
routing_method = pass_manager_config.routing_method or "stochastic"
routing_method = pass_manager_config.routing_method or "sabre"
translation_method = pass_manager_config.translation_method or "translator"
optimization_method = pass_manager_config.optimization_method or "default"
scheduling_method = pass_manager_config.scheduling_method or "default"
Expand Down
13 changes: 13 additions & 0 deletions releasenotes/notes/sabre_level0-1524f01965257f3f.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
upgrade_transpiler:
- |
The default routing pass used by optimization level 0 for :func:`.generate_preset_pass_manager`
and :func:`.transpile` has been changed from :class:`.StochasticSwap` to :class:`.SabreSwap`.
The :class:`.SabreSwap` pass performs exactly the same function but performs better in both
runtime and output quality (in number of swap gates and depth) compared to
:class:`.StochasticSwap`. For ``optimization_level=0`` this shouldn't matter because it's not
expected to run routing for the typical use case of level 0.

If you were relying on the previous default routing algorithm for any reason you can use the
``routing_method`` argument for :func:`.transpile` and :func:`.generate_preset_pass_manager`
to ``"stochastic"`` to use the :class:`.StochasticSwap` pass.
Loading