French
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

Call

class Call(subroutine, value_dict=None, name=None)[source]

Bases : Instruction

Pulse Call instruction.

The Call instruction represents the calling of a referenced subroutine (schedule). It enables code reuse both within the pulse representation and hardware (if supported).

Define new subroutine.

Note

Inline subroutine is mutable. This requires special care for modification.

Paramètres
  • subroutine (Union[Schedule, ScheduleBlock]) – A program subroutine to be referred to.

  • value_dict (Optional[Dict[ParameterExpression, Union[ParameterExpression, float]]]) – Mapping of parameter object to assigned value.

  • name (Optional[str]) – Unique ID of this subroutine. If not provided, this is generated based on the subroutine name.

Lève

PulseError – If subroutine is not valid data format.

Methods

append

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

assigned_subroutine

Returns this subroutine with the parameters assigned.

ch_duration

Return duration of the supplied channels in this Instruction.

ch_start_time

Return minimum start time for supplied channels.

ch_stop_time

Return maximum start time for supplied channels.

draw

Plot the instruction.

insert

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

is_parameterized

Return True iff the instruction is parameterized.

shift

Return a new schedule shifted forward by time.

Attributes

arguments

Parameters dictionary to be assigned to subroutine.

Type renvoyé

Dict[ParameterExpression, Union[ParameterExpression, float]]

channels

Returns the channels that this schedule uses.

Type renvoyé

Tuple[Channel]

duration

Duration of this instruction.

Type renvoyé

Union[int, ParameterExpression]

id

Unique identifier for this instruction.

Type renvoyé

int

instructions

Iterable for getting instructions from Schedule tree.

Type renvoyé

Tuple[Tuple[int, Instruction]]

name

Name of this instruction.

Type renvoyé

str

operands

Return instruction operands.

Type renvoyé

Tuple

parameters

Unassigned parameters which determine the instruction behavior.

Type renvoyé

Set

prefix = 'call'
start_time

Relative begin time of this instruction.

Type renvoyé

int

stop_time

Relative end time of this instruction.

Type renvoyé

int

subroutine

Return attached subroutine.

Renvoie

The program referenced by the call.

Type renvoyé

program (Union[Schedule, ScheduleBlock])