PassManagerStagePlugin
class PassManagerStagePlugin
Bases: abc.ABC
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.
Methods
pass_manager
abstract PassManagerStagePlugin.pass_manager(pass_manager_config, optimization_level=None)
This method is designed to return a PassManager
for the stage this implements
Parameters
- pass_manager_config (
PassManagerConfig
) – A configuration object that defines all the target device specifications and any user specified options totranspile()
orgenerate_preset_pass_manager()
- optimization_level (
Optional
[int
]) – 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 be0
,1
,2
, or3
and the higher the number the more optimization is expected.
Return type
Was this page helpful?
Report a bug or request content on GitHub.