Skip to main contentIBM Quantum Documentation


class qiskit.transpiler.preset_passmanagers.plugin.PassManagerStagePlugin

GitHub(opens in a new tab)

Bases: ABC(opens in a new tab)

A PassManagerStagePlugin is a plugin interface object for using custom stages in transpile().

A PassManagerStagePlugin object can be added to an external package and integrated into the transpile() function with an entry point. This will enable users to use the output of pass_manager() to implement a stage in the compilation process.



abstract pass_manager(pass_manager_config, optimization_level=None)

GitHub(opens in a new tab)

This method is designed to return a PassManager for the stage this implements


  • pass_manager_config (PassManagerConfig) – A configuration object that defines all the target device specifications and any user specified options to transpile() or generate_preset_pass_manager()
  • optimization_level (int(opens in a new tab) | None) – The optimization level of the transpilation, if set this should be used to set values for any tunable parameters to trade off runtime for potential optimization. Valid values should be 0, 1, 2, or 3 and the higher the number the more optimization is expected.

Return type


Was this page helpful?
Report a bug or request content on GitHub.