mqt.ionshuttler.linear.dd.schedule_transform

Rebuild and validate 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: Schedule, architecture: LinearArchitecture, timestep: int, action: Action, *, timeline: CompiledTimeline | None = None) → Schedule[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: Schedule, scheduled_actions: Sequence[ScheduledAction]) → Schedule[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 schedule.