mqt.ionshuttler.linear.dd.sadd¶
Public types for the shuttling-aware dynamical decoupling (SADD) pass.
Module Contents¶
- class SADDMethod[source]¶
Bases:
enum.StrEnumSelect a shuttling-aware dynamical decoupling (SADD) method.
- PULSE_ONLY = 'pulse_only_sadd'¶
- FULL = 'full_sadd'¶
- class SADDConfig[source]¶
Configure the shared pulse-only and transport-enabled SADD backend.
SADD denotes shuttling-aware dynamical decoupling.
timeout_sbounds each control window’s solve. The unchanged schedule is always an admissible solution and is supplied to the solver as a hint, so a window that runs out of time yields a weaker improvement or none at all rather than an invalid or missing result. Raise it for long windows or many participating ions, where proving optimality takes longer.Synthesized shuttles, swaps, and local pulses take the durations defined by the architecture.
- ion_preselection: Literal['phase', 'distance'] = 'phase'¶
- opportunity_order: Literal['chronological', 'reverse_chronological'] = 'chronological'¶
- __post_init__() None[source]¶
Validate optimization and problem parameters.
- Raises:
TypeError – If a parameter has the wrong type.
ValueError – If a parameter is outside its supported range.
- class SADDOpportunityRecord[source]¶
Describe one ordered SADD optimization opportunity and its outcome.
transport_deltarecords the signed change in scheduled transport actions by concrete action type between the opportunity input and proposed result. Equality ignoresruntime_s, so two runs with the same outcome compare equal.- __post_init__() None[source]¶
Validate and freeze nested opportunity diagnostics.
- Raises:
TypeError – If a field has the wrong type.
ValueError – If a field contains an invalid value.
- class SADDReport[source]¶
Collect ordered opportunity records produced by one SADD pass.
- method: SADDMethod¶
- opportunities: tuple[SADDOpportunityRecord, ...] = ()¶
- __post_init__() None[source]¶
Normalize opportunity records to an immutable tuple.
- Raises:
TypeError – If the method or an opportunity has the wrong type.
- property sequences: tuple[LocalDDSequence, ...]¶
Accepted ion-local pulse sequences in opportunity order.
- classmethod from_dict(data: object) SADDReport[source]¶
Restore a SADD report from JSON-compatible values.
- Returns:
The restored SADD report.
- Raises:
ValueError – If the serialized report is malformed.
- class SADDResult[source]¶
Contain a SADD-augmented compilation result and its pass report.
- result: CompilationResult¶
- report: SADDReport¶
- __post_init__() None[source]¶
Validate the transformed result, report, and optional explanation.
- Raises:
TypeError – If a field has the wrong type.
ValueError – If an unavailable reason is empty.
- classmethod from_dict(data: object) SADDResult[source]¶
Restore a serialized SADD result.
- Returns:
The restored SADD result.
- Raises:
ValueError – If the serialized value is malformed.
- classmethod from_json(raw: str) SADDResult[source]¶
Restore a SADD result from JSON text.
- Returns:
The restored SADD result.
- run_sadd(result: CompilationResult, method: SADDMethod, config: SADDConfig | None = None, *, architecture: LinearArchitecture | None = None) SADDResult[source]¶
Apply shuttling-aware dynamical decoupling to a compiled schedule.
Pulse-only and transport-enabled SADD use the same optimization backend;
methodcontrols whether the solver may synthesize transport.- Parameters:
result – Compilation result to augment.
method – SADD method to apply.
config – Optional optimization settings.
architecture – Optional compatible architecture with added DD capabilities.
- Returns:
The transformed compilation result and an ordered SADD report.
- Raises:
TypeError – If
methodis not aSADDMethod.ValueError – If the result and architecture are incompatible or the architecture lacks actions required by the selected method.