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 in qiskit.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 of PassManager.run(..., callback=callback, ...).

Methods

PassManager.__getitem__(index)

PassManager.__len__()

PassManager.append(passes[, max_iteration])

Append a Pass Set to the schedule of passes.

PassManager.draw([filename, style, raw])

Draw the pass manager.

PassManager.passes()

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.