File tree 2 files changed +14
-1
lines changed
qiskit/transpiler/preset_passmanagers
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ def level_0_pass_manager(pass_manager_config: PassManagerConfig) -> StagedPassMa
48
48
initial_layout = pass_manager_config .initial_layout
49
49
init_method = pass_manager_config .init_method or "default"
50
50
layout_method = pass_manager_config .layout_method or "default"
51
- routing_method = pass_manager_config .routing_method or "stochastic "
51
+ routing_method = pass_manager_config .routing_method or "sabre "
52
52
translation_method = pass_manager_config .translation_method or "translator"
53
53
optimization_method = pass_manager_config .optimization_method or "default"
54
54
scheduling_method = pass_manager_config .scheduling_method or "default"
Original file line number Diff line number Diff line change
1
+ ---
2
+ upgrade_transpiler :
3
+ - |
4
+ The default routing pass used by optimization level 0 for :func:`.generate_preset_pass_manager`
5
+ and :func:`.transpile` has been changed from :class:`.StochasticSwap` to :class:`.SabreSwap`.
6
+ The :class:`.SabreSwap` pass performs exactly the same function but performs better in both
7
+ runtime and output quality (in number of swap gates and depth) compared to
8
+ :class:`.StochasticSwap`. For ``optimization_level=0`` this shouldn't matter because it's not
9
+ expected to run routing for the typical use case of level 0.
10
+
11
+ If you were relying on the previous default routing algorithm for any reason you can use the
12
+ ``routing_method`` argument for :func:`.transpile` and :func:`.generate_preset_pass_manager`
13
+ to ``"stochastic"`` to use the :class:`.StochasticSwap` pass.
You can’t perform that action at this time.
0 commit comments