Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK. Go to the latest version

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_preset_pass_manager(optimization_level)Generate a preset PassManager
level_0_pass_manager(pass_manager_config)Level 0 pass manager: no explicit optimization other than mapping to backend.
level_1_pass_manager(pass_manager_config)Level 1 pass manager: light optimization by simple adjacent gate collapsing.
level_2_pass_manager(pass_manager_config)Level 2 pass manager: medium optimization by initial layout selection and gate cancellation using commutativity rules.
level_3_pass_manager(pass_manager_config)Level 3 pass manager: heavy optimization by noise adaptive qubit mapping and gate cancellation using commutativity rules and unitary synthesis.

Stage Generator Functions

generate_control_flow_options_check([...])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.
generate_error_on_control_flow(message)Get a pass manager that always raises an error if control flow is present in a given circuit.
generate_unroll_3q(target[, basis_gates, ...])Generate an unroll >3q PassManager
generate_embed_passmanager(coupling_map)Generate a layout embedding PassManager
generate_routing_passmanager(routing_pass, ...)Generate a routing PassManager
generate_pre_op_passmanager([target, ...])Generate a pre-optimization loop PassManager
generate_translation_passmanager(target[, ...])Generate a basis translation PassManager
generate_scheduling(instruction_durations, ...)Generate a post optimization scheduling PassManager
Was this page helpful?
Report a bug or request content on GitHub.