qiskit-documentation/docs/api/qiskit/0.24/qiskit.pulse.instructions.A...

437 lines
22 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Acquire
description: API reference for qiskit.pulse.instructions.Acquire
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.pulse.instructions.Acquire
---
<span id="qiskit-pulse-instructions-acquire" />
# qiskit.pulse.instructions.Acquire
<Class id="qiskit.pulse.instructions.Acquire" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.16/qiskit/pulse/instructions/acquire.py" signature="Acquire(duration, channel, mem_slot=None, reg_slot=None, kernel=None, discriminator=None, name=None)" modifiers="class">
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.
**Parameters**
* **duration** (`int`) Length of time to acquire data in terms of dt.
* **channel** ([`AcquireChannel`](qiskit.pulse.channels#acquirechannel "qiskit.pulse.channels.AcquireChannel")) The channel that will acquire data.
* **mem\_slot** (`Optional`\[[`MemorySlot`](qiskit.pulse.channels#memoryslot "qiskit.pulse.channels.MemorySlot")]) The classical memory slot in which to store the classified readout result.
* **reg\_slot** (`Optional`\[[`RegisterSlot`](qiskit.pulse.channels#registerslot "qiskit.pulse.channels.RegisterSlot")]) The fast-access register slot in which to store the classified readout result for fast feedback.
* **kernel** (`Optional`\[`Kernel`]) A `Kernel` for integrating raw data.
* **discriminator** (`Optional`\[`Discriminator`]) A `Discriminator` for discriminating kerneled IQ data into 0/1 results.
* **name** (`Optional`\[`str`]) Name of the instruction for display purposes.
**Raises**
[**PulseError**](qiskit.pulse.PulseError "qiskit.pulse.PulseError") If channels are supplied, and the number of register and/or memory slots does not equal the number of channels.
### \_\_init\_\_
<Function id="qiskit.pulse.instructions.Acquire.__init__" signature="__init__(duration, channel, mem_slot=None, reg_slot=None, kernel=None, discriminator=None, name=None)">
Create a new Acquire instruction.
**Parameters**
* **duration** (`int`) Length of time to acquire data in terms of dt.
* **channel** ([`AcquireChannel`](qiskit.pulse.channels#acquirechannel "qiskit.pulse.channels.AcquireChannel")) The channel that will acquire data.
* **mem\_slot** (`Optional`\[[`MemorySlot`](qiskit.pulse.channels#memoryslot "qiskit.pulse.channels.MemorySlot")]) The classical memory slot in which to store the classified readout result.
* **reg\_slot** (`Optional`\[[`RegisterSlot`](qiskit.pulse.channels#registerslot "qiskit.pulse.channels.RegisterSlot")]) The fast-access register slot in which to store the classified readout result for fast feedback.
* **kernel** (`Optional`\[`Kernel`]) A `Kernel` for integrating raw data.
* **discriminator** (`Optional`\[`Discriminator`]) A `Discriminator` for discriminating kerneled IQ data into 0/1 results.
* **name** (`Optional`\[`str`]) Name of the instruction for display purposes.
**Raises**
[**PulseError**](qiskit.pulse.PulseError "qiskit.pulse.PulseError") If channels are supplied, and the number of register and/or memory slots does not equal the number of channels.
</Function>
## Methods
| | |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`__init__`](#qiskit.pulse.instructions.Acquire.__init__ "qiskit.pulse.instructions.Acquire.__init__")(duration, channel\[, mem\_slot, …]) | Create a new Acquire instruction. |
| [`append`](#qiskit.pulse.instructions.Acquire.append "qiskit.pulse.instructions.Acquire.append")(schedule\[, name]) | Return a new [`Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") with `schedule` inserted at the maximum time over all channels shared between `self` and `schedule`. |
| [`assign_parameters`](#qiskit.pulse.instructions.Acquire.assign_parameters "qiskit.pulse.instructions.Acquire.assign_parameters")(value\_dict) | Modify and return self with parameters assigned according to the input. |
| [`ch_duration`](#qiskit.pulse.instructions.Acquire.ch_duration "qiskit.pulse.instructions.Acquire.ch_duration")(\*channels) | Return duration of the supplied channels in this Instruction. |
| [`ch_start_time`](#qiskit.pulse.instructions.Acquire.ch_start_time "qiskit.pulse.instructions.Acquire.ch_start_time")(\*channels) | Return minimum start time for supplied channels. |
| [`ch_stop_time`](#qiskit.pulse.instructions.Acquire.ch_stop_time "qiskit.pulse.instructions.Acquire.ch_stop_time")(\*channels) | Return maximum start time for supplied channels. |
| [`draw`](#qiskit.pulse.instructions.Acquire.draw "qiskit.pulse.instructions.Acquire.draw")(\[dt, style, filename, interp\_method, …]) | Plot the instruction. |
| [`flatten`](#qiskit.pulse.instructions.Acquire.flatten "qiskit.pulse.instructions.Acquire.flatten")() | Return itself as already single instruction. |
| [`insert`](#qiskit.pulse.instructions.Acquire.insert "qiskit.pulse.instructions.Acquire.insert")(start\_time, schedule\[, name]) | Return a new [`Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") with `schedule` inserted within `self` at `start_time`. |
| [`shift`](#qiskit.pulse.instructions.Acquire.shift "qiskit.pulse.instructions.Acquire.shift")(time\[, name]) | Return a new schedule shifted forward by time. |
## Attributes
| | |
| --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| [`acquire`](#qiskit.pulse.instructions.Acquire.acquire "qiskit.pulse.instructions.Acquire.acquire") | Acquire channel to acquire data. |
| [`acquires`](#qiskit.pulse.instructions.Acquire.acquires "qiskit.pulse.instructions.Acquire.acquires") | Acquire channels to be acquired on. |
| [`channel`](#qiskit.pulse.instructions.Acquire.channel "qiskit.pulse.instructions.Acquire.channel") | Return the [`Channel`](qiskit.pulse.channels#channel "qiskit.pulse.channels.Channel") that this instruction is scheduled on. |
| [`channels`](#qiskit.pulse.instructions.Acquire.channels "qiskit.pulse.instructions.Acquire.channels") | Returns channels that this schedule uses. |
| [`command`](#qiskit.pulse.instructions.Acquire.command "qiskit.pulse.instructions.Acquire.command") | The associated command. |
| [`discriminator`](#qiskit.pulse.instructions.Acquire.discriminator "qiskit.pulse.instructions.Acquire.discriminator") | Return discrimination settings. |
| [`duration`](#qiskit.pulse.instructions.Acquire.duration "qiskit.pulse.instructions.Acquire.duration") | Duration of this instruction. |
| [`id`](#qiskit.pulse.instructions.Acquire.id "qiskit.pulse.instructions.Acquire.id") | Unique identifier for this instruction. |
| [`instructions`](#qiskit.pulse.instructions.Acquire.instructions "qiskit.pulse.instructions.Acquire.instructions") | Iterable for getting instructions from Schedule tree. |
| [`kernel`](#qiskit.pulse.instructions.Acquire.kernel "qiskit.pulse.instructions.Acquire.kernel") | Return kernel settings. |
| [`mem_slot`](#qiskit.pulse.instructions.Acquire.mem_slot "qiskit.pulse.instructions.Acquire.mem_slot") | The classical memory slot which will store the classified readout result. |
| [`mem_slots`](#qiskit.pulse.instructions.Acquire.mem_slots "qiskit.pulse.instructions.Acquire.mem_slots") | MemorySlots. |
| [`name`](#qiskit.pulse.instructions.Acquire.name "qiskit.pulse.instructions.Acquire.name") | Name of this instruction. |
| [`operands`](#qiskit.pulse.instructions.Acquire.operands "qiskit.pulse.instructions.Acquire.operands") | Return instruction operands. |
| [`reg_slot`](#qiskit.pulse.instructions.Acquire.reg_slot "qiskit.pulse.instructions.Acquire.reg_slot") | The fast-access register slot which will store the classified readout result for fast-feedback computation. |
| [`reg_slots`](#qiskit.pulse.instructions.Acquire.reg_slots "qiskit.pulse.instructions.Acquire.reg_slots") | RegisterSlots. |
| [`start_time`](#qiskit.pulse.instructions.Acquire.start_time "qiskit.pulse.instructions.Acquire.start_time") | Relative begin time of this instruction. |
| [`stop_time`](#qiskit.pulse.instructions.Acquire.stop_time "qiskit.pulse.instructions.Acquire.stop_time") | Relative end time of this instruction. |
| [`timeslots`](#qiskit.pulse.instructions.Acquire.timeslots "qiskit.pulse.instructions.Acquire.timeslots") | Occupied time slots by this instruction. |
### acquire
<Attribute id="qiskit.pulse.instructions.Acquire.acquire">
Acquire channel to acquire data. The `AcquireChannel` index maps trivially to qubit index.
**Return type**
[`AcquireChannel`](qiskit.pulse.channels#acquirechannel "qiskit.pulse.channels.AcquireChannel")
</Attribute>
### acquires
<Attribute id="qiskit.pulse.instructions.Acquire.acquires">
Acquire channels to be acquired on.
**Return type**
`List`\[[`AcquireChannel`](qiskit.pulse.channels#acquirechannel "qiskit.pulse.channels.AcquireChannel")]
</Attribute>
### append
<Function id="qiskit.pulse.instructions.Acquire.append" signature="append(schedule, name=None)">
Return a new [`Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") with `schedule` inserted at the maximum time over all channels shared between `self` and `schedule`.
**Parameters**
* **schedule** (`ScheduleComponent`) schedule to be appended
* **name** (`Optional`\[`str`]) Name of the new schedule. Defaults to name of self
**Return type**
`Schedule`
</Function>
### assign\_parameters
<Function id="qiskit.pulse.instructions.Acquire.assign_parameters" signature="assign_parameters(value_dict)">
Modify and return self with parameters assigned according to the input.
**Parameters**
**value\_dict** (`Dict`\[`ParameterExpression`, `Union`\[`ParameterExpression`, `float`, `int`]]) A mapping from Parameters to either numeric values or another Parameter expression.
**Return type**
`Instruction`
**Returns**
Self with updated parameters.
</Function>
### ch\_duration
<Function id="qiskit.pulse.instructions.Acquire.ch_duration" signature="ch_duration(*channels)">
Return duration of the supplied channels in this Instruction.
**Parameters**
**\*channels** Supplied channels
**Return type**
`int`
</Function>
### ch\_start\_time
<Function id="qiskit.pulse.instructions.Acquire.ch_start_time" signature="ch_start_time(*channels)">
Return minimum start time for supplied channels.
**Parameters**
**\*channels** Supplied channels
**Return type**
`int`
</Function>
### ch\_stop\_time
<Function id="qiskit.pulse.instructions.Acquire.ch_stop_time" signature="ch_stop_time(*channels)">
Return maximum start time for supplied channels.
**Parameters**
**\*channels** Supplied channels
**Return type**
`int`
</Function>
### channel
<Attribute id="qiskit.pulse.instructions.Acquire.channel">
Return the [`Channel`](qiskit.pulse.channels#channel "qiskit.pulse.channels.Channel") that this instruction is scheduled on.
**Return type**
[`AcquireChannel`](qiskit.pulse.channels#acquirechannel "qiskit.pulse.channels.AcquireChannel")
</Attribute>
### channels
<Attribute id="qiskit.pulse.instructions.Acquire.channels">
Returns channels that this schedule uses.
**Return type**
`Tuple`\[[`Channel`](qiskit.pulse.channels#channel "qiskit.pulse.channels.Channel")]
</Attribute>
### command
<Attribute id="qiskit.pulse.instructions.Acquire.command">
The associated command. Commands are deprecated, so this method will be deprecated shortly.
**Returns**
The deprecated command if available.
**Return type**
[Command](qiskit.providers.models.Command "qiskit.providers.models.Command")
</Attribute>
### discriminator
<Attribute id="qiskit.pulse.instructions.Acquire.discriminator">
Return discrimination settings.
**Return type**
`Discriminator`
</Attribute>
### draw
<Function id="qiskit.pulse.instructions.Acquire.draw" signature="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.
**Parameters**
* **dt** (`float`) Time interval of samples
* **style** (*Optional\[*[*SchedStyle*](qiskit.visualization.pulse.qcstyle#schedstyle "qiskit.visualization.pulse.qcstyle.SchedStyle")*]*) A style sheet to configure plot appearance
* **filename** (`Optional`\[`str`]) Name required to save pulse image
* **interp\_method** (`Optional`\[`Callable`]) A function for interpolation
* **scale** (`float`) Relative visual scaling of waveform amplitudes
* **plot\_all** (`bool`) Plot empty channels
* **plot\_range** (`Optional`\[`Tuple`\[`float`]]) A tuple of time range to plot
* **interactive** (`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 instructions
* **label** (`bool`) Label individual instructions
* **framechange** (`bool`) Add framechange indicators
* **channels** (`Optional`\[`List`\[[`Channel`](qiskit.pulse.channels#channel "qiskit.pulse.channels.Channel")]]) A list of channel names to plot
**Returns**
A matplotlib figure object of the pulse schedule
**Return type**
matplotlib.figure
</Function>
### duration
<Attribute id="qiskit.pulse.instructions.Acquire.duration">
Duration of this instruction.
**Return type**
`int`
</Attribute>
### flatten
<Function id="qiskit.pulse.instructions.Acquire.flatten" signature="flatten()">
Return itself as already single instruction.
**Return type**
`Instruction`
</Function>
### id
<Attribute id="qiskit.pulse.instructions.Acquire.id">
Unique identifier for this instruction.
**Return type**
`int`
</Attribute>
### insert
<Function id="qiskit.pulse.instructions.Acquire.insert" signature="insert(start_time, schedule, name=None)">
Return a new [`Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") with `schedule` inserted within `self` at `start_time`.
**Parameters**
* **start\_time** (`int`) Time to insert the schedule schedule
* **schedule** (`ScheduleComponent`) Schedule to insert
* **name** (`Optional`\[`str`]) Name of the new schedule. Defaults to name of self
**Return type**
`Schedule`
</Function>
### instructions
<Attribute id="qiskit.pulse.instructions.Acquire.instructions">
Iterable for getting instructions from Schedule tree.
**Return type**
`Tuple`\[`Tuple`\[`int`, `Instruction`]]
</Attribute>
### kernel
<Attribute id="qiskit.pulse.instructions.Acquire.kernel">
Return kernel settings.
**Return type**
`Kernel`
</Attribute>
### mem\_slot
<Attribute id="qiskit.pulse.instructions.Acquire.mem_slot">
The classical memory slot which will store the classified readout result.
**Return type**
[`MemorySlot`](qiskit.pulse.channels#memoryslot "qiskit.pulse.channels.MemorySlot")
</Attribute>
### mem\_slots
<Attribute id="qiskit.pulse.instructions.Acquire.mem_slots">
MemorySlots.
**Return type**
`List`\[[`MemorySlot`](qiskit.pulse.channels#memoryslot "qiskit.pulse.channels.MemorySlot")]
</Attribute>
### name
<Attribute id="qiskit.pulse.instructions.Acquire.name">
Name of this instruction.
**Return type**
`str`
</Attribute>
### operands
<Attribute id="qiskit.pulse.instructions.Acquire.operands">
Return instruction operands.
**Return type**
`Tuple`
</Attribute>
### reg\_slot
<Attribute id="qiskit.pulse.instructions.Acquire.reg_slot">
The fast-access register slot which will store the classified readout result for fast-feedback computation.
**Return type**
[`RegisterSlot`](qiskit.pulse.channels#registerslot "qiskit.pulse.channels.RegisterSlot")
</Attribute>
### reg\_slots
<Attribute id="qiskit.pulse.instructions.Acquire.reg_slots">
RegisterSlots.
**Return type**
`List`\[[`RegisterSlot`](qiskit.pulse.channels#registerslot "qiskit.pulse.channels.RegisterSlot")]
</Attribute>
### shift
<Function id="qiskit.pulse.instructions.Acquire.shift" signature="shift(time, name=None)">
Return a new schedule shifted forward by time.
**Parameters**
* **time** (`int`) Time to shift by
* **name** (`Optional`\[`str`]) Name of the new schedule. Defaults to name of self
**Return type**
`Schedule`
</Function>
### start\_time
<Attribute id="qiskit.pulse.instructions.Acquire.start_time">
Relative begin time of this instruction.
**Return type**
`int`
</Attribute>
### stop\_time
<Attribute id="qiskit.pulse.instructions.Acquire.stop_time">
Relative end time of this instruction.
**Return type**
`int`
</Attribute>
### timeslots
<Attribute id="qiskit.pulse.instructions.Acquire.timeslots">
Occupied time slots by this instruction.
**Return type**
`Dict`\[[`Channel`](qiskit.pulse.channels#channel "qiskit.pulse.channels.Channel"), `List`\[`Tuple`\[`int`, `int`]]]
</Attribute>
</Class>