dd#
Full path: iqm.cpc.compiler.dd
Dynamical decoupling utilities.
We support three DD workflows, all accessible via the apply_dd_strategy() compilation pass
(and hence controllable via settings):
Standard DD — one
DDStrategyis applied to all eligible idle windows on all qubits.Qubit-specific DD — different DD sequences for each qubit, defined using the
qubit_specific_ddsetting.Idling-specific DD — individual DD sequences per idle window described using
IdleWindowKey, defined using theidling_specific_ddsetting. See the inspection helpersidentify_idle_windows_for_settings()anddisplay_idle_windows().
Idling-specific DD can be applied in three different ways:
Known map — provide an IdleDDMap:
settings = compiler.get_settings(circuits=circuits)
settings.stages.dynamical_decoupling.apply_dd_strategy.dd_is_disabled = False
settings.stages.dynamical_decoupling.apply_dd_strategy.idling_specific_dd = idle_dd_map
compiler.compile(circuits=circuits, settings=settings)
Inspect, then decide (for manual decisions) — run the compilation stages up to the DD stage,
display the idle windows, set idling_specific_dd to the IdleDDMap you want, and then run
the remaining stages:
settings = compiler.get_settings(circuits=circuits)
settings.stages.dynamical_decoupling.apply_dd_strategy.dd_is_disabled = False
stages = compiler.circuit_stages + compiler.pulse_stages
dd_idx = [stage.name for stage in stages].index("dynamical_decoupling")
context = compiler.compiler_context(components=None, settings=settings)
schedules, context = compiler.run_stages(circuits, context, stages=stages[:dd_idx])
display_idle_windows(identify_idle_windows_for_settings(schedules, context))
settings.stages.dynamical_decoupling.apply_dd_strategy.idling_specific_dd = idle_dd_map
schedules, context = compiler.run_stages(schedules, context, stages=stages[dd_idx:])
job_def, context = compiler.finalize(schedules, context)
Callable (for automated decisions) — assign a callable idling_specific_dd of the type
IdleDDMapBuilder. In the DD pass it is called on all the eligible idling windows in the pre-DD
schedules, and the IdleDDMap it returns is applied. Everything happens inside a single
compiler.compile() call.
Module Attributes
The default DD strategy uses the following gate sequences: |
|
Maps each eligible idle window in a schedule playlist to a DD strategy. |
Functions
|
Insert dynamical decoupling sequences into the schedules iff |
|
Pretty-print idle windows grouped by schedule index and qubit. |
Generate PRX gate phases for the URn sequence. |
|
Enumerate the idle windows that the DD pass will see in the given pre-DD schedules. |
|
|
Insert dynamical decoupling sequences into the given schedule. |
|
Merge adjacent |
Classes
One eligible |
|
Callable form of the |
|
A single eligible idle ( |
|
Key type for |
Exceptions
Something was wrong in user input for dynamical decoupling. |
Inheritance
