mqt.ionshuttler.linear.dd.schedule_transform¶
Rebuild and validate action schedules after control transformations.
Module Contents¶
- local_gate_for_spec(spec: GateSpec, ion: int) Action[source]¶
Build the ion-local rotation described by a pulse specification.
- Parameters:
spec – Gate name and rotation angle to realize.
ion – Ion the rotation acts on.
- Returns:
The concrete single-qubit gate action.
- Raises:
ValueError – If the specification lacks an angle or names an unsupported gate.
- insert_action_at_time(schedule: ActionSchedule, architecture: Architecture, timestep: int, action: Action, *, timeline: CompiledTimeline | None = None) ActionSchedule[source]¶
Insert an action immediately before a boundary’s time advance.
- Parameters:
schedule – Schedule to transform.
architecture – Hardware model used to validate the insertion.
timestep – Boundary at which the action starts.
action – Action to insert.
timeline – Existing timeline of
schedule, if already available.
- Returns:
A rebuilt schedule containing the inserted action.
- Raises:
ValueError – If the timestep or action is invalid.
- rebuild_schedule(original_schedule: ActionSchedule, scheduled_actions: Sequence[ScheduledAction]) ActionSchedule[source]¶
Rebuild a schedule while preserving its initial state and action identity.
- Parameters:
original_schedule – Schedule whose initial state is preserved.
scheduled_actions – Complete replacement ordered schedule.
- Returns:
A new immutable action schedule.
- validate_rebuilt_schedule(schedule: ActionSchedule, architecture: Architecture) bool[source]¶
Return whether every concurrent action layer is physically valid.
- validate_schedule_compatibility(schedule: ActionSchedule, architecture: Architecture) None[source]¶
Require that an architecture can execute every action in a schedule.
- Raises:
ValueError – If sites, resources, capabilities, or action replay are incompatible with the architecture.