Preset Passmanagers (qiskit.transpiler.preset_passmanagers
)¶
This module contains functions for generating the preset pass managers
for the transpiler. The preset pass managers are instances of
StagedPassManager
which are used to execute the circuit
transformations as part of Qiskit’s compiler inside the
transpile()
function at the different optimization levels.
The functionality here is divided into two parts, the first includes the
functions used generate the entire pass manager which is used by
transpile()
(Preset Pass Manager Generation) and the
second includes functions which are used to build (either entirely or in
part) the stages which the preset pass managers are composed of
(Stage Generator Functions).
Preset Pass Manager Generation¶
|
Generate a preset |
|
Level 0 pass manager: no explicit optimization other than mapping to backend. |
|
Level 1 pass manager: light optimization by simple adjacent gate collapsing. |
|
Level 2 pass manager: medium optimization by initial layout selection and gate cancellation using commutativity rules. |
|
Level 3 pass manager: heavy optimization by noise adaptive qubit mapping and gate cancellation using commutativity rules and unitary synthesis. |
Stage Generator Functions¶
Generate a pass manager that, when run on a DAG that contains control flow, fails with an error message explaining the invalid options, and what could be used instead. |
|
|
Get a pass manager that always raises an error if control flow is present in a given circuit. |
|
Generate an unroll >3q |
|
Generate a layout embedding |
|
Generate a routing |
|
Generate a pre-optimization loop |
|
Generate a basis translation |
|
Generate a post optimization scheduling |