iqm.cpc.compiler.standard_stages.apply_dd_strategy#
- iqm.cpc.compiler.standard_stages.apply_dd_strategy(schedules, builder, context, dd_is_disabled=True, use_standard_dd_strategy=True, DDStrategy_merge_contiguous_waits=True, DDStrategy_target_qubits=None, DDStrategy_skip_leading_wait=True, DDStrategy_skip_trailing_wait=True, DDStrategy_gate_sequences_ratio=None, DDStrategy_gate_sequences_gate_pattern_xy=None, DDStrategy_gate_sequences_align=None)#
Insert dynamical decoupling sequences into the schedules, if dynamical decoupling is enabled.
DDStrategy can also be read from the Compiler context, from under the key “DDStrategy”. In this case, the strategy provided will override the DDStrategy options given as args to this function.
- Parameters:
schedules (list[Schedule]) – Schedules representing the compiled circuits.
builder (ScheduleBuilder) – The ScheduleBuilder.
dd_is_disabled (bool) – Set to
Falseto enable dynamical decoupling.use_standard_dd_strategy (bool) – Whether to use the standard decoupling strategy (overrides the below arguments).
DDStrategy_target_qubits (list[str] | None) – The qubits to which DD is applied (
Nonemeans apply to every applicable qubit).DDStrategy_merge_contiguous_waits (bool) – Whether to merge contiguous waits (see
DDStrategy).DDStrategy_skip_leading_wait (bool) – Whether to skip leading waits (see
DDStrategy).DDStrategy_skip_trailing_wait (bool) – Whether to skip trailing waits (see
DDStrategy).DDStrategy_gate_sequences_ratio (list[int] | None) – Minimal durations for the Wait to be replaced with the DD sequence (in PRX gate durations) in the DD sequence.
DDStrategy_gate_sequences_gate_pattern_xy (list[str] | None) – XY Gate patterns in the DD sequence. If you want to provide custom PRX angles instead of XY patterns, you must provide the DDStrategy in the Compiler context.
DDStrategy_gate_sequences_align (list[str] | None) – Alignments in the DD sequence (“asap”, “alap” or “center”)
- Returns:
THe schedules where applicable Waits are replaced with DD sequences.
- Return type: