mqt.ionshuttler.linear.dd.idealized_hahn

Idealized full-control Hahn reference for compiled Linear schedules.

Module Contents

class IdealizedHahnConfig[source]

Configure the idealized full-control Hahn reference.

The comparator permits local pulses at every ion position and concurrently with transport or other operations. Its output is therefore a reference schedule, not necessarily an executable schedule for the given hardware.

By default the sequence is a single midpoint pulse and the resulting Pauli frame persists past its window, to be discharged virtually by a consumer that corrects the terminal frame. Set include_terminating_pulse to insert the physical closing pulse that returns the frame to the identity instead.

scheme: str | DDScheme = 'hahn'
min_idle_timesteps: int | None = None
label: str = 'IdealizedHahn'
include_terminating_pulse: bool = False
__post_init__() → None[source]

Validate the reference sequence configuration.

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

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

class IdealizedHahnReport[source]

Summarize local pulse sequences inserted by the idealized reference.

report_type: ClassVar[str] = 'idealized_hahn'
sequences: tuple[LocalDDSequence, ...] = ()
__post_init__() → None[source]

Freeze and validate insertion records.

Raises:

TypeError – If an item is not a local DD insertion record.

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

Return this report using JSON-compatible values.

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

Restore an idealized-Hahn report from JSON-compatible values.

Returns:

The restored report.

Raises:

ValueError – If the serialized report is malformed.

apply_idealized_hahn(schedule: Schedule, architecture: LinearArchitecture, config: IdealizedHahnConfig | None = None) → DDPassResult[IdealizedHahnReport][source]

Insert constraint-relaxed Hahn pulses into every eligible idle window.

Pulse positions are rounded to schedule boundaries, clamped to their idle window, and deduplicated by boundary while retaining sequence order. The default single-pulse sequence leaves a persistent Pauli frame; see IdealizedHahnConfig for the closing-pulse alternative.

Returns:

The idealized schedule and its inserted local-pulse records.