PassManager¶
- class PassManager(passes=None, max_iteration=1000, callback=None)[source]¶
Manager for a set of Passes and their scheduling during transpilation.
Initialize an empty PassManager object (with no passes scheduled).
- Parameters
passes (
Union
[BasePass
,List
[BasePass
],None
]) – A pass set (as defined inqiskit.transpiler.PassManager.append()
) to be added to the pass manager schedule.max_iteration (
int
) – The maximum number of iterations the schedule will be looped if the condition is not met.callback (
Optional
[Callable
]) – DEPRECATED - A callback function that will be called after each pass execution.
Deprecated since version 0.13.0: The
callback
parameter is deprecated in favor ofPassManager.run(..., callback=callback, ...)
.Methods
PassManager.__getitem__
(index)PassManager.append
(passes[, max_iteration])Append a Pass Set to the schedule of passes.
PassManager.draw
([filename, style, raw])Draw the pass manager.
Return a list structure of the appended passes and its options.
PassManager.replace
(index, passes[, …])Replace a particular pass in the scheduler.
PassManager.run
(circuits[, output_name, …])Run all the passes on the specified
circuits
.