iqm.pulla.utils.replace_instruction_in_place

iqm.pulla.utils.replace_instruction_in_place#

iqm.pulla.utils.replace_instruction_in_place(schedule, channel_name, index, replacement)#

Replace an instruction in a schedule with one or more instructions.

Parameters:
  • schedule (Schedule) – The schedule to modify.

  • channel_name (str) – The name of the channel containing the instruction to replace.

  • index (int) – The index of the instruction to replace.

  • replacement (Iterable[Instruction]) – Instructions to replace the original instruction with.

Returns:

The modified schedule.

Return type:

Schedule