qiskit-documentation/docs/api/qiskit/0.27/qiskit.qobj.QasmQobjConfig.mdx

95 lines
5.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: QasmQobjConfig
description: API reference for qiskit.qobj.QasmQobjConfig
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.qobj.QasmQobjConfig
---
# qiskit.qobj.QasmQobjConfig
<Class id="qiskit.qobj.QasmQobjConfig" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.17/qiskit/qobj/qasm_qobj.py" signature="QasmQobjConfig(shots=None, max_credits=None, seed_simulator=None, memory=None, parameter_binds=None, meas_level=None, meas_return=None, memory_slots=None, n_qubits=None, pulse_library=None, calibrations=None, rep_delay=None, **kwargs)" modifiers="class">
A configuration for a QASM Qobj.
Model for RunConfig.
**Parameters**
* **shots** (*int*) the number of shots.
* **max\_credits** (*int*) the max\_credits to use on the IBMQ public devices.
* **seed\_simulator** (*int*) the seed to use in the simulator
* **memory** (*bool*) whether to request memory from backend (per-shot readouts)
* **parameter\_binds** (*list\[dict]*) List of parameter bindings
* **meas\_level** (*int*) Measurement level 0, 1, or 2
* **meas\_return** (*str*) For measurement level \< 2, whether single or avg shots are returned
* **memory\_slots** (*int*) The number of memory slots on the device
* **n\_qubits** (*int*) The number of qubits on the device
* **pulse\_library** (*list*) List of [`PulseLibraryItem`](qiskit.qobj.PulseLibraryItem "qiskit.qobj.PulseLibraryItem").
* **calibrations** ([*QasmExperimentCalibrations*](qiskit.qobj.QasmExperimentCalibrations "qiskit.qobj.QasmExperimentCalibrations")) Information required for Pulse gates.
* **rep\_delay** (*float*) Delay between programs in sec. Only supported on certain backends (`backend.configuration().dynamic_reprate_enabled` ). Must be from the range supplied by the backend (`backend.configuration().rep_delay_range`). Default is `backend.configuration().default_rep_delay`.
* **kwargs** Additional free form key value fields to add to the configuration.
### \_\_init\_\_
<Function id="qiskit.qobj.QasmQobjConfig.__init__" signature="__init__(shots=None, max_credits=None, seed_simulator=None, memory=None, parameter_binds=None, meas_level=None, meas_return=None, memory_slots=None, n_qubits=None, pulse_library=None, calibrations=None, rep_delay=None, **kwargs)">
Model for RunConfig.
**Parameters**
* **shots** (*int*) the number of shots.
* **max\_credits** (*int*) the max\_credits to use on the IBMQ public devices.
* **seed\_simulator** (*int*) the seed to use in the simulator
* **memory** (*bool*) whether to request memory from backend (per-shot readouts)
* **parameter\_binds** (*list\[dict]*) List of parameter bindings
* **meas\_level** (*int*) Measurement level 0, 1, or 2
* **meas\_return** (*str*) For measurement level \< 2, whether single or avg shots are returned
* **memory\_slots** (*int*) The number of memory slots on the device
* **n\_qubits** (*int*) The number of qubits on the device
* **pulse\_library** (*list*) List of [`PulseLibraryItem`](qiskit.qobj.PulseLibraryItem "qiskit.qobj.PulseLibraryItem").
* **calibrations** ([*QasmExperimentCalibrations*](qiskit.qobj.QasmExperimentCalibrations "qiskit.qobj.QasmExperimentCalibrations")) Information required for Pulse gates.
* **rep\_delay** (*float*) Delay between programs in sec. Only supported on certain backends (`backend.configuration().dynamic_reprate_enabled` ). Must be from the range supplied by the backend (`backend.configuration().rep_delay_range`). Default is `backend.configuration().default_rep_delay`.
* **kwargs** Additional free form key value fields to add to the configuration.
</Function>
## Methods
| | |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| [`__init__`](#qiskit.qobj.QasmQobjConfig.__init__ "qiskit.qobj.QasmQobjConfig.__init__")(\[shots, max\_credits, …]) | Model for RunConfig. |
| [`from_dict`](#qiskit.qobj.QasmQobjConfig.from_dict "qiskit.qobj.QasmQobjConfig.from_dict")(data) | Create a new QasmQobjConfig object from a dictionary. |
| [`to_dict`](#qiskit.qobj.QasmQobjConfig.to_dict "qiskit.qobj.QasmQobjConfig.to_dict")() | Return a dictionary format representation of the QASM Qobj config. |
### from\_dict
<Function id="qiskit.qobj.QasmQobjConfig.from_dict" signature="from_dict(data)" modifiers="classmethod">
Create a new QasmQobjConfig object from a dictionary.
**Parameters**
**data** (*dict*) A dictionary for the config
**Returns**
The object from the input dictionary.
**Return type**
[QasmQobjConfig](#qiskit.qobj.QasmQobjConfig "qiskit.qobj.QasmQobjConfig")
</Function>
### to\_dict
<Function id="qiskit.qobj.QasmQobjConfig.to_dict" signature="to_dict()">
Return a dictionary format representation of the QASM Qobj config.
**Returns**
The dictionary form of the QasmQobjConfig.
**Return type**
dict
</Function>
</Class>