qiskit.pulse.instructions.Acquire¶
-
class
Acquire
(duration, channel, mem_slot=None, reg_slot=None, kernel=None, discriminator=None, name=None)[source]¶ The Acquire instruction is used to trigger the ADC associated with a particular qubit; e.g. instantiated with AcquireChannel(0), the Acquire command will trigger data collection for the channel associated with qubit 0 readout. This instruction also provides acquisition metadata:
the number of cycles during which to acquire (in terms of dt),
the register slot to store classified, intermediary readout results,
the memory slot to return classified results,
the kernel to integrate raw data for each shot, and
the discriminator to classify kerneled IQ points.
Create a new Acquire instruction.
- Paramètres
duration (
int
) – Length of time to acquire data in terms of dt.channel (
AcquireChannel
) – The channel that will acquire data.mem_slot (
Optional
[MemorySlot
]) – The classical memory slot in which to store the classified readout result.reg_slot (
Optional
[RegisterSlot
]) – The fast-access register slot in which to store the classified readout result for fast feedback.kernel (
Optional
[Kernel
]) – AKernel
for integrating raw data.discriminator (
Optional
[Discriminator
]) – ADiscriminator
for discriminating kerneled IQ data into 0/1 results.name (
Optional
[str
]) – Name of the instruction for display purposes.
- Lève
PulseError – If channels are supplied, and the number of register and/or memory slots does not equal the number of channels.
-
__init__
(duration, channel, mem_slot=None, reg_slot=None, kernel=None, discriminator=None, name=None)[source]¶ Create a new Acquire instruction.
- Paramètres
duration (
int
) – Length of time to acquire data in terms of dt.channel (
AcquireChannel
) – The channel that will acquire data.mem_slot (
Optional
[MemorySlot
]) – The classical memory slot in which to store the classified readout result.reg_slot (
Optional
[RegisterSlot
]) – The fast-access register slot in which to store the classified readout result for fast feedback.kernel (
Optional
[Kernel
]) – AKernel
for integrating raw data.discriminator (
Optional
[Discriminator
]) – ADiscriminator
for discriminating kerneled IQ data into 0/1 results.name (
Optional
[str
]) – Name of the instruction for display purposes.
- Lève
PulseError – If channels are supplied, and the number of register and/or memory slots does not equal the number of channels.
Methods
__init__
(duration, channel[, mem_slot, …])Create a new Acquire instruction.
append
(schedule[, name])Return a new
Schedule
withschedule
inserted at the maximum time over all channels shared betweenself
andschedule
.assign_parameters
(value_dict)Modify and return self with parameters assigned according to the input.
ch_duration
(*channels)Return duration of the supplied channels in this Instruction.
ch_start_time
(*channels)Return minimum start time for supplied channels.
ch_stop_time
(*channels)Return maximum start time for supplied channels.
draw
([dt, style, filename, interp_method, …])Plot the instruction.
flatten
()Return itself as already single instruction.
insert
(start_time, schedule[, name])Return a new
Schedule
withschedule
inserted withinself
atstart_time
.shift
(time[, name])Return a new schedule shifted forward by time.
Attributes
Acquire channel to acquire data.
Acquire channels to be acquired on.
Return the
Channel
that this instruction is scheduled on.Returns channels that this schedule uses.
The associated command.
Return discrimination settings.
Duration of this instruction.
Unique identifier for this instruction.
Iterable for getting instructions from Schedule tree.
Return kernel settings.
The classical memory slot which will store the classified readout result.
MemorySlots.
Name of this instruction.
Return instruction operands.
The fast-access register slot which will store the classified readout result for fast-feedback computation.
RegisterSlots.
Relative begin time of this instruction.
Relative end time of this instruction.
Occupied time slots by this instruction.
-
property
acquire
¶ Acquire channel to acquire data. The
AcquireChannel
index maps trivially to qubit index.- Type renvoyé
-
property
acquires
¶ Acquire channels to be acquired on.
- Type renvoyé
List
[AcquireChannel
]
-
append
(schedule, name=None)¶ Return a new
Schedule
withschedule
inserted at the maximum time over all channels shared betweenself
andschedule
.- Paramètres
schedule (
ScheduleComponent
) – schedule to be appendedname (
Optional
[str
]) – Name of the new schedule. Defaults to name of self
- Type renvoyé
Schedule
-
assign_parameters
(value_dict)¶ Modify and return self with parameters assigned according to the input.
- Paramètres
value_dict (
Dict
[ParameterExpression
,Union
[ParameterExpression
,float
,int
]]) – A mapping from Parameters to either numeric values or another Parameter expression.- Type renvoyé
Instruction
- Renvoie
Self with updated parameters.
-
ch_duration
(*channels)¶ Return duration of the supplied channels in this Instruction.
- Paramètres
*channels – Supplied channels
- Type renvoyé
int
-
ch_start_time
(*channels)¶ Return minimum start time for supplied channels.
- Paramètres
*channels – Supplied channels
- Type renvoyé
int
-
ch_stop_time
(*channels)¶ Return maximum start time for supplied channels.
- Paramètres
*channels – Supplied channels
- Type renvoyé
int
-
property
command
¶ The associated command. Commands are deprecated, so this method will be deprecated shortly.
- Renvoie
The deprecated command if available.
- Type renvoyé
-
property
discriminator
¶ Return discrimination settings.
- Type renvoyé
Discriminator
-
draw
(dt=1, style=None, filename=None, interp_method=None, scale=1, plot_all=False, plot_range=None, interactive=False, table=True, label=False, framechange=True, channels=None)¶ Plot the instruction.
- Paramètres
dt (
float
) – Time interval of samplesstyle (Optional[SchedStyle]) – A style sheet to configure plot appearance
filename (
Optional
[str
]) – Name required to save pulse imageinterp_method (
Optional
[Callable
]) – A function for interpolationscale (
float
) – Relative visual scaling of waveform amplitudesplot_all (
bool
) – Plot empty channelsplot_range (
Optional
[Tuple
[float
]]) – A tuple of time range to plotinteractive (
bool
) – When set true show the circuit in a new window (this depends on the matplotlib backend being used supporting this)table (
bool
) – Draw event table for supported instructionslabel (
bool
) – Label individual instructionsframechange (
bool
) – Add framechange indicatorschannels (
Optional
[List
[Channel
]]) – A list of channel names to plot
- Renvoie
A matplotlib figure object of the pulse schedule
- Type renvoyé
matplotlib.figure
-
property
duration
¶ Duration of this instruction.
- Type renvoyé
int
-
flatten
()¶ Return itself as already single instruction.
- Type renvoyé
Instruction
-
property
id
¶ Unique identifier for this instruction.
- Type renvoyé
int
-
insert
(start_time, schedule, name=None)¶ Return a new
Schedule
withschedule
inserted withinself
atstart_time
.- Paramètres
start_time (
int
) – Time to insert the schedule scheduleschedule (
ScheduleComponent
) – Schedule to insertname (
Optional
[str
]) – Name of the new schedule. Defaults to name of self
- Type renvoyé
Schedule
-
property
instructions
¶ Iterable for getting instructions from Schedule tree.
- Type renvoyé
Tuple
[Tuple
[int
,Instruction
]]
-
property
kernel
¶ Return kernel settings.
- Type renvoyé
Kernel
-
property
mem_slot
¶ The classical memory slot which will store the classified readout result.
- Type renvoyé
-
property
mem_slots
¶ MemorySlots.
- Type renvoyé
List
[MemorySlot
]
-
property
name
¶ Name of this instruction.
- Type renvoyé
str
-
property
operands
¶ Return instruction operands.
- Type renvoyé
Tuple
-
property
reg_slot
¶ The fast-access register slot which will store the classified readout result for fast-feedback computation.
- Type renvoyé
-
property
reg_slots
¶ RegisterSlots.
- Type renvoyé
List
[RegisterSlot
]
-
shift
(time, name=None)¶ Return a new schedule shifted forward by time.
- Paramètres
time (
int
) – Time to shift byname (
Optional
[str
]) – Name of the new schedule. Defaults to name of self
- Type renvoyé
Schedule
-
property
start_time
¶ Relative begin time of this instruction.
- Type renvoyé
int
-
property
stop_time
¶ Relative end time of this instruction.
- Type renvoyé
int