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

Replace a particular pass in the scheduler.

  • 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.


TranspilerError – if a pass in passes is not a proper pass or index not found.

See also

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

Return type