mqt.ionshuttler.linear.schedule¶
Executable schedules for the Linear hardware model.
Module Contents¶
- ActionDecoder¶
- ActionDecoders¶
- class MachineState[source]¶
Describe hardware state without compiler circuit-progress fields.
- __post_init__() None[source]¶
Normalize and validate machine-state values.
- Raises:
TypeError – If the machine clock has the wrong type.
ValueError – If state mappings, occupancy, or timestamps are inconsistent.
- classmethod from_compiler_state(state: State) MachineState[source]¶
Copy only hardware fields from a compiler state.
Availability timestamps in a compiler state may refer to resources that became free before its current clock. The machine-only view canonicalizes those timestamps to the current clock.
- Parameters:
state – Compiler state whose circuit progress is discarded.
- Returns:
The canonical machine-only state.
- to_replay_state() State[source]¶
Return a state suitable for schedule replay.
- Returns:
A compiler-state value with empty circuit-progress fields.
- classmethod from_dict(data: object) MachineState[source]¶
Restore a machine state from JSON-compatible values.
- Returns:
The restored machine-only state.
- class ScheduledAction[source]¶
Pair one operation with an ID stable across schedule passes.
- __post_init__() None[source]¶
Validate the action ID and value.
- Raises:
TypeError – If a field has the wrong type.
ValueError – If the ID is invalid.
- class ActionSchedule[source]¶
Contain the immutable executable boundary shared by downstream stages.
Action IDs are unique within a schedule and remain attached to preserved actions when a transformation inserts or replaces operations. Compiler search status and dynamical-decoupling reports are intentionally absent.
- scheduled_actions: tuple[ScheduledAction, ...]¶
- initial_state: MachineState¶
- __post_init__() None[source]¶
Freeze and validate the executable schedule.
- Raises:
TypeError – If a schedule field has the wrong type.
ValueError – If identifiers or timing are inconsistent.
- classmethod from_actions(actions: Sequence[Action], initial_state: State | MachineState) ActionSchedule[source]¶
Create a schedule and assign deterministic action identifiers.
- Parameters:
actions – Ordered executable operations.
initial_state – Initial hardware or compiler state. Compiler progress fields are deliberately discarded.
- Returns:
The immutable action schedule.
- classmethod from_dict(data: object, *, action_types: Sequence[type[Action]] | None = None, action_decoders: ActionDecoders | None = None) ActionSchedule[source]¶
Restore a schedule from its JSON-compatible representation.
- Returns:
The restored action schedule.
- Raises:
ValueError – If the action stream or metadata is malformed.
- classmethod from_json(raw: str, *, action_types: Sequence[type[Action]] | None = None, action_decoders: ActionDecoders | None = None) ActionSchedule[source]¶
Restore a schedule from JSON text.
- Returns:
The restored action schedule.