qiskit-documentation/docs/api/qiskit/0.26/qiskit.qobj.PulseQobjInstru...

105 lines
7.2 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: PulseQobjInstruction (v0.26)
description: API reference for qiskit.qobj.PulseQobjInstruction in qiskit v0.26
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.qobj.PulseQobjInstruction
---
<span id="qiskit-qobj-pulseqobjinstruction" />
# qiskit.qobj.PulseQobjInstruction
<Class id="qiskit.qobj.PulseQobjInstruction" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.17/qiskit/qobj/pulse_qobj.py" signature="PulseQobjInstruction(name, t0, ch=None, conditional=None, val=None, phase=None, duration=None, qubits=None, memory_slot=None, register_slot=None, kernels=None, discriminators=None, label=None, type=None, pulse_shape=None, parameters=None, frequency=None)" modifiers="class">
A class representing a single instruction in an PulseQobj Experiment.
Instantiate a new PulseQobjInstruction object.
**Parameters**
* **name** (*str*) The name of the instruction
* **t0** (*int*) Pulse start time in integer **dt** units.
* **ch** (*str*) The channel to apply the pulse instruction.
* **conditional** (*int*) The register to use for a conditional for this instruction
* **val** (*complex*) Complex value to apply, bounded by an absolute value of 1.
* **phase** (*float*) if a `fc` instruction, the frame change phase in radians.
* **frequency** (*float*) if a `sf` instruction, the frequency in Hz.
* **duration** (*int*) The duration of the pulse in **dt** units.
* **qubits** (*list*) A list of `int` representing the qubits the instruction operates on
* **memory\_slot** (*list*) If a `measure` instruction this is a list of `int` containing the list of memory slots to store the measurement results in (must be the same length as qubits). If a `bfunc` instruction this is a single `int` of the memory slot to store the boolean function result in.
* **register\_slot** (*list*) If a `measure` instruction this is a list of `int` containing the list of register slots in which to store the measurement results (must be the same length as qubits). If a `bfunc` instruction this is a single `int` of the register slot in which to store the result.
* **kernels** (*list*) List of [`QobjMeasurementOption`](qiskit.qobj.QobjMeasurementOption "qiskit.qobj.QobjMeasurementOption") objects defining the measurement kernels and set of parameters if the measurement level is 1 or 2. Only used for `acquire` instructions.
* **discriminators** (*list*) A list of [`QobjMeasurementOption`](qiskit.qobj.QobjMeasurementOption "qiskit.qobj.QobjMeasurementOption") used to set the discriminators to be used if the measurement level is 2. Only used for `acquire` instructions.
* **label** (*str*) Label of instruction
* **type** (*str*) Type of instruction
* **pulse\_shape** (*str*) The shape of the parametric pulse
* **parameters** (*dict*) The parameters for a parametric pulse
### \_\_init\_\_
<Function id="qiskit.qobj.PulseQobjInstruction.__init__" signature="__init__(name, t0, ch=None, conditional=None, val=None, phase=None, duration=None, qubits=None, memory_slot=None, register_slot=None, kernels=None, discriminators=None, label=None, type=None, pulse_shape=None, parameters=None, frequency=None)">
Instantiate a new PulseQobjInstruction object.
**Parameters**
* **name** (*str*) The name of the instruction
* **t0** (*int*) Pulse start time in integer **dt** units.
* **ch** (*str*) The channel to apply the pulse instruction.
* **conditional** (*int*) The register to use for a conditional for this instruction
* **val** (*complex*) Complex value to apply, bounded by an absolute value of 1.
* **phase** (*float*) if a `fc` instruction, the frame change phase in radians.
* **frequency** (*float*) if a `sf` instruction, the frequency in Hz.
* **duration** (*int*) The duration of the pulse in **dt** units.
* **qubits** (*list*) A list of `int` representing the qubits the instruction operates on
* **memory\_slot** (*list*) If a `measure` instruction this is a list of `int` containing the list of memory slots to store the measurement results in (must be the same length as qubits). If a `bfunc` instruction this is a single `int` of the memory slot to store the boolean function result in.
* **register\_slot** (*list*) If a `measure` instruction this is a list of `int` containing the list of register slots in which to store the measurement results (must be the same length as qubits). If a `bfunc` instruction this is a single `int` of the register slot in which to store the result.
* **kernels** (*list*) List of [`QobjMeasurementOption`](qiskit.qobj.QobjMeasurementOption "qiskit.qobj.QobjMeasurementOption") objects defining the measurement kernels and set of parameters if the measurement level is 1 or 2. Only used for `acquire` instructions.
* **discriminators** (*list*) A list of [`QobjMeasurementOption`](qiskit.qobj.QobjMeasurementOption "qiskit.qobj.QobjMeasurementOption") used to set the discriminators to be used if the measurement level is 2. Only used for `acquire` instructions.
* **label** (*str*) Label of instruction
* **type** (*str*) Type of instruction
* **pulse\_shape** (*str*) The shape of the parametric pulse
* **parameters** (*dict*) The parameters for a parametric pulse
</Function>
## Methods
| | |
| ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- |
| [`__init__`](#qiskit.qobj.PulseQobjInstruction.__init__ "qiskit.qobj.PulseQobjInstruction.__init__")(name, t0\[, ch, conditional, val, …]) | Instantiate a new PulseQobjInstruction object. |
| [`from_dict`](#qiskit.qobj.PulseQobjInstruction.from_dict "qiskit.qobj.PulseQobjInstruction.from_dict")(data) | Create a new PulseQobjExperimentConfig object from a dictionary. |
| [`to_dict`](#qiskit.qobj.PulseQobjInstruction.to_dict "qiskit.qobj.PulseQobjInstruction.to_dict")() | Return a dictionary format representation of the Instruction. |
### from\_dict
<Function id="qiskit.qobj.PulseQobjInstruction.from_dict" signature="from_dict(data)" modifiers="classmethod">
Create a new PulseQobjExperimentConfig object from a dictionary.
**Parameters**
**data** (*dict*) A dictionary for the experiment config
**Returns**
The object from the input dictionary.
**Return type**
[PulseQobjInstruction](#qiskit.qobj.PulseQobjInstruction "qiskit.qobj.PulseQobjInstruction")
</Function>
### to\_dict
<Function id="qiskit.qobj.PulseQobjInstruction.to_dict" signature="to_dict()">
Return a dictionary format representation of the Instruction.
**Returns**
The dictionary form of the PulseQobjInstruction.
**Return type**
dict
</Function>
</Class>