PassManager.replace

PassManager.replace(index, passes, max_iteration=None, **flow_controller_conditions)[source]

Replace a particular pass in the scheduler.

Parameters
  • index (int) – Pass index to replace, based on the position in passes().

  • passes (Union[BasePass, List[BasePass]]) – A pass set (as defined in qiskit.transpiler.PassManager.append()) to be added to the pass manager schedule.

  • max_iteration (Optional[int]) – max number of iterations of passes.

  • flow_controller_conditions (Any) – control flow plugins.

Raises

TranspilerError – if a pass in passes is not a proper pass.

See also

RunningPassManager.add_flow_controller() for more information about the control flow plugins.

Return type

None