Instruction¶
- class Instruction(operands, duration, channels, name=None)[source]¶
The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels.
Instruction initializer.
- Parameters
operands (
Tuple
) – The argument list.duration (
Union
[Command
,int
]) – Length of time taken by the instruction in terms of dt. Deprecated: the first argument used to be the Command.channels (
Tuple
[Channel
]) – Tuple of pulse channels that this instruction operates on.name (
Optional
[str
]) – Optional display name for this instruction.
- Raises
PulseError – If duration is negative.
Attributes
Returns channels that this schedule uses.
The associated command.
Duration of this instruction.
Unique identifier for this instruction.
Iterable for getting instructions from Schedule tree.
Name of this instruction.
Return instruction operands.
Relative begin time of this instruction.
Relative end time of this instruction.
Occupied time slots by this instruction.
Methods
Instruction.append
(schedule[, name])Return a new
Schedule
withschedule
inserted at the maximum time over all channels shared betweenself
andschedule
.Instruction.ch_duration
(*channels)Return duration of the supplied channels in this Instruction.
Instruction.ch_start_time
(*channels)Return minimum start time for supplied channels.
Instruction.ch_stop_time
(*channels)Return maximum start time for supplied channels.
Instruction.draw
([dt, style, filename, …])Plot the instruction.
Return itself as already single instruction.
Instruction.insert
(start_time, schedule[, name])Return a new
Schedule
withschedule
inserted withinself
atstart_time
.Instruction.shift
(time[, name])Return a new schedule shifted forward by time.
Instruction.union
(*schedules[, name])Return a new schedule which is the union of self and schedule.