-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a default optimization level to generate_preset_pass_manager
This commit adds a default value to the generate_preset_pass_manager's optimization_level argument. If it's not specified optimization level 2 will be used. After #12148 optimization level 2 is a better fit for an optimal tradeoff between heuristic effort and runtime that makes it well suited as a default optimization level.
- Loading branch information
Showing
3 changed files
with
51 additions
and
5 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
16 changes: 16 additions & 0 deletions
16
releasenotes/notes/default-level-2-generate-preset-passmanager-ec758ddc896ae2d6.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
features_transpiler: | ||
- | | ||
The ``optimization_level`` argument for the :func:`.generate_preset_pass_manager` function is | ||
now optional. If it's not specified it will default to using optimization level 2. As the argument | ||
is now optional, the first positional argument has been expanded to enable passing a :class:`.Target` | ||
or a :class:`.BackendV2` as the first argument for more convenient construction. For example:: | ||
from qiskit.transpiler.preset_passmanager import generate_preset_pass_manager | ||
from qiskit.providers.fake_provider import GenericBackendV2 | ||
backend = GenericBackendV2(100) | ||
generate_preset_pass_manager(backend.Target) | ||
will construct a default pass manager for the 100 qubit :class`.GenericBackendV2` instance. |
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