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 CircuitPass instances and applies them sequentially to quantum circuits.

Only CircuitPass instances are accepted — raw functions must be wrapped first, for example with the @CircuitPass decorator or by calling CircuitPass(my_func).

Methods#

PassManager.__iadd__(other)

Add a pass or extend with the passes of another PassManager in-place.

PassManager.add_pass(pass_obj)

Add a transformation pass to the manager.

PassManager.insert_pass(index, pass_obj)

Insert a pass at a specific position.

PassManager.remove_pass(index)

Remove a pass at the specified index.

PassManager.clear()

Remove all passes from the manager.

PassManager.run(qc)

Apply all passes in sequence to the quantum circuit.

PassManager.verify(qc, verification_type[, ...])

Verify every pass in the manager against qc one by one.