Instruction

class Instruction(operands, duration, channels, name=None)[ソース]

The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels.

Instruction initializer.

パラメータ
  • operands (Tuple) – The argument list.

  • duration (int) – Length of time taken by the instruction in terms of dt.

  • channels (Tuple[Channel]) – Tuple of pulse channels that this instruction operates on.

  • name (Optional[str]) – Optional display name for this instruction.

例外
  • PulseError – If duration is negative.

  • PulseError – If the input channels are not all of type Channel.

Attributes

Instruction.channels

Returns channels that this schedule uses.

Instruction.command

The associated command.

Instruction.duration

Duration of this instruction.

Instruction.id

Unique identifier for this instruction.

Instruction.instructions

Iterable for getting instructions from Schedule tree.

Instruction.name

Name of this instruction.

Instruction.operands

Return instruction operands.

Instruction.start_time

Relative begin time of this instruction.

Instruction.stop_time

Relative end time of this instruction.

Instruction.timeslots

Occupied time slots by this instruction.

Methods

Instruction.append(schedule[, name])

Return a new Schedule with schedule inserted at the maximum time over all channels shared between self and schedule.

Instruction.assign_parameters(value_dict)

Modify and return self with parameters assigned according to the input.

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.

Instruction.flatten()

Return itself as already single instruction.

Instruction.insert(start_time, schedule[, name])

Return a new Schedule with schedule inserted within self at start_time.

Instruction.shift(time[, name])

Return a new schedule shifted forward by time.