mqt.ionshuttler.linear.dd.global_dd

Periodic global dynamical decoupling for compiled Linear schedules.

Module Contents

class GlobalDDConfig[source]

Configure a periodic sequence of schedule-wide global X pulses.

Shift optimization minimizes the logic-aware critical-segment phase cost shared with SADD.

spacing: int
shift_range: int = 0
half_first_window: bool = True
pulse: GateSpec
scheme_name: str = 'periodic_x'
__post_init__() → None[source]

Validate periodic placement and optional shift optimization.

Raises:
  • TypeError – If a configuration value has the wrong type.

  • ValueError – If a value or pulse lies outside the supported domain.

class GlobalDDReport[source]

Summarize the selected global pulse sequence and phase cost.

report_type: ClassVar[str] = 'periodic_global_dd'
scheme_name: str
pulse_timesteps: tuple[int, ...]
spacing: int
phase_cost: float
__post_init__() → None[source]

Freeze pulse positions and validate their ordering.

Raises:
  • TypeError – If a report value has the wrong type.

  • ValueError – If a report value is outside its supported range.

to_dict() → dict[str, object][source]

Return this report using JSON-compatible values.

classmethod from_dict(data: object) → GlobalDDReport[source]

Restore a global-DD report from JSON-compatible values.

Returns:

The restored global-DD report.

Raises:

ValueError – If the serialized report is malformed.

apply_periodic_global_dd(schedule: Schedule, architecture: LinearArchitecture, config: GlobalDDConfig) → DDPassResult[GlobalDDReport][source]

Insert periodic global X pulses, optionally shifting them by phase cost.

Each pulse is a GlobalGate whose targets are all ions of the schedule. Global pulses are placed before all existing actions at the same schedule boundary and may overlap local gates or transport under the global-frame abstraction.

Returns:

The transformed schedule and selected pulse/phase summary.

Raises:

ValueError – If the architecture does not support global pulses, replay metadata is absent, or global pulses already exist.