iqm.cpc.compiler.dd.identify_idle_windows_for_settings

iqm.cpc.compiler.dd.identify_idle_windows_for_settings#

iqm.cpc.compiler.dd.identify_idle_windows_for_settings(schedules, context)#

Enumerate the idle windows that the DD pass will see in the given pre-DD schedules.

Use this when compiling in parts (see the module docstring): run the stages up to the dynamical_decoupling stage, call this function on the returned schedules and context, and use the keys of the returned windows to build an IdleDDMap.

The window enumeration options (DDStrategy_merge_contiguous_waits, DDStrategy_skip_leading_wait, DDStrategy_skip_trailing_wait) are read from context["settings"] in the same way as for the apply_dd_strategy() pass, so the keys match the windows the pass will apply the map to.

Parameters:
  • schedules (list[Schedule]) – Schedules returned by the stages preceding the dynamical_decoupling stage.

  • context (dict[str, Any]) – Compiler context returned together with schedules.

Returns:

IdleWindow list, sorted by IdleWindowKey.

Return type:

list[IdleWindow]