qiskit-documentation/docs/api/qiskit/0.25/qiskit.qobj.QasmQobjExperim...

77 lines
3.4 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: QasmQobjExperiment
description: API reference for qiskit.qobj.QasmQobjExperiment
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.qobj.QasmQobjExperiment
---
# qiskit.qobj.QasmQobjExperiment
<Class id="qiskit.qobj.QasmQobjExperiment" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.17/qiskit/qobj/qasm_qobj.py" signature="QasmQobjExperiment(config=None, header=None, instructions=None)" modifiers="class">
A QASM Qobj Experiment.
Each instance of this class is used to represent a QASM experiment as part of a larger QASM qobj.
Instantiate a QasmQobjExperiment.
**Parameters**
* **config** ([*QasmQobjExperimentConfig*](qiskit.qobj.QasmQobjExperimentConfig "qiskit.qobj.QasmQobjExperimentConfig")) A config object for the experiment
* **header** (*QasmQobjExperimentHeader*) A header object for the experiment
* **instructions** (*list*) A list of [`QasmQobjInstruction`](qiskit.qobj.QasmQobjInstruction "qiskit.qobj.QasmQobjInstruction") objects
### \_\_init\_\_
<Function id="qiskit.qobj.QasmQobjExperiment.__init__" signature="__init__(config=None, header=None, instructions=None)">
Instantiate a QasmQobjExperiment.
**Parameters**
* **config** ([*QasmQobjExperimentConfig*](qiskit.qobj.QasmQobjExperimentConfig "qiskit.qobj.QasmQobjExperimentConfig")) A config object for the experiment
* **header** (*QasmQobjExperimentHeader*) A header object for the experiment
* **instructions** (*list*) A list of [`QasmQobjInstruction`](qiskit.qobj.QasmQobjInstruction "qiskit.qobj.QasmQobjInstruction") objects
</Function>
## Methods
| | |
| --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| [`__init__`](#qiskit.qobj.QasmQobjExperiment.__init__ "qiskit.qobj.QasmQobjExperiment.__init__")(\[config, header, instructions]) | Instantiate a QasmQobjExperiment. |
| [`from_dict`](#qiskit.qobj.QasmQobjExperiment.from_dict "qiskit.qobj.QasmQobjExperiment.from_dict")(data) | Create a new QasmQobjExperiment object from a dictionary. |
| [`to_dict`](#qiskit.qobj.QasmQobjExperiment.to_dict "qiskit.qobj.QasmQobjExperiment.to_dict")() | Return a dictionary format representation of the Experiment. |
### from\_dict
<Function id="qiskit.qobj.QasmQobjExperiment.from_dict" signature="from_dict(data)" modifiers="classmethod">
Create a new QasmQobjExperiment object from a dictionary.
**Parameters**
**data** (*dict*) A dictionary for the experiment config
**Returns**
The object from the input dictionary.
**Return type**
[QasmQobjExperiment](#qiskit.qobj.QasmQobjExperiment "qiskit.qobj.QasmQobjExperiment")
</Function>
### to\_dict
<Function id="qiskit.qobj.QasmQobjExperiment.to_dict" signature="to_dict()">
Return a dictionary format representation of the Experiment.
**Returns**
The dictionary form of the QasmQObjExperiment.
**Return type**
dict
</Function>
</Class>