mqt.ionshuttler.linear.dd.nearest_hahn¶
Nearest-feasible midpoint Hahn comparator for compiled Linear schedules.
Module Contents¶
- NearestHahnStatus¶
- NearestHahnSkipReason¶
- class NearestHahnConfig[source]¶
Configure the schedule-preserving nearest-feasible Hahn comparator.
- __post_init__() None[source]¶
Validate the comparator configuration.
- Raises:
TypeError – If a configuration value has the wrong type.
ValueError – If a configuration value is outside its supported range.
- class NearestHahnOpportunityRecord[source]¶
Describe the placement outcome for one eligible ion-local idle window.
- status: NearestHahnStatus¶
- skip_reason: NearestHahnSkipReason | None = None¶
- __post_init__() None[source]¶
Validate one placement audit entry.
- Raises:
TypeError – If a record value has the wrong type.
ValueError – If a record value is outside its supported range.
- classmethod from_dict(data: object) NearestHahnOpportunityRecord[source]¶
Restore one placement record from JSON-compatible values.
- Returns:
The restored record.
- Raises:
ValueError – If the serialized record is malformed.
- class NearestHahnReport[source]¶
Summarize nearest-Hahn placements and the windows it could not use.
- sequences: tuple[LocalDDSequence, ...] = ()¶
- opportunities: tuple[NearestHahnOpportunityRecord, ...] = ()¶
- __post_init__() None[source]¶
Freeze and validate the report collections.
- Raises:
TypeError – If a collection contains an unexpected value.
- classmethod from_dict(data: object) NearestHahnReport[source]¶
Restore a nearest-Hahn report from JSON-compatible values.
- Returns:
The restored report.
- run_nearest_hahn(schedule: ActionSchedule, architecture: Architecture, config: NearestHahnConfig | None = None) DDPassResult[NearestHahnReport][source]¶
Place one X pulse as near each eligible idle-window midpoint as the schedule allows.
The pass uses only processing-zone access the compiled trajectory already provides. It inserts no transport, never extends the makespan, and adds no physical recovery pulse, so the resulting Pauli frame persists and is discharged virtually by a consumer that corrects the terminal frame. Unlike
apply_idealized_hahn(), every returned schedule is executable on the given architecture.The pass is intended for a base schedule. Applying it to an already augmented schedule is permitted, but the returned report then owns only the pulses this call inserted.
- Parameters:
schedule – Base schedule to augment.
architecture – Hardware model the schedule runs on.
config – Optional comparator settings.
- Returns:
The augmented schedule and its complete eligible-window audit.