PassManager#
- class PassManager(passes: list[CircuitPass] | None = None)[source]#
A manager for organizing and applying quantum circuit transformation passes.
The PassManager maintains an ordered list of
CircuitPassinstances and applies them sequentially to quantum circuits.Only
CircuitPassinstances are accepted — raw functions must be wrapped first, for example with the@CircuitPassdecorator or by callingCircuitPass(my_func).
Methods#
|
Add a pass or extend with the passes of another PassManager in-place. |
|
Add a transformation pass to the manager. |
|
Insert a pass at a specific position. |
|
Remove a pass at the specified index. |
Remove all passes from the manager. |
|
|
Apply all passes in sequence to the quantum circuit. |
|
Verify every pass in the manager against qc one by one. |