qiskit-documentation/docs/api/qiskit/0.43/qiskit.assembler.RunConfig.mdx

105 lines
2.5 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

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: RunConfig
description: API reference for qiskit.assembler.RunConfig
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.assembler.RunConfig
---
# RunConfig
<Class id="qiskit.assembler.RunConfig" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.24/qiskit/assembler/run_config.py" signature="RunConfig(shots=None, seed_simulator=None, memory=None, parameter_binds=None, **kwargs)" modifiers="class">
Bases: `SimpleNamespace`
Class for Run Configuration.
### shots
<Attribute id="qiskit.assembler.RunConfig.shots">
the number of shots
**Type**
int
</Attribute>
### seed\_simulator
<Attribute id="qiskit.assembler.RunConfig.seed_simulator">
the seed to use in the simulator
**Type**
int
</Attribute>
### memory
<Attribute id="qiskit.assembler.RunConfig.memory">
whether to request memory from backend (per-shot readouts)
**Type**
bool
</Attribute>
### parameter\_binds
<Attribute id="qiskit.assembler.RunConfig.parameter_binds">
List of parameter bindings
**Type**
list\[dict]
</Attribute>
Initialize a RunConfig object
**Parameters**
* **shots** (*int*) the number of shots
* **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
* **\*\*kwargs** optional fields
## Methods
<span id="qiskit-assembler-runconfig-from-dict" />
### from\_dict
<Function id="qiskit.assembler.RunConfig.from_dict" signature="RunConfig.from_dict(data)" modifiers="classmethod">
Create a new RunConfig object from a dictionary.
**Parameters**
**data** (*dict*) A dictionary representing the RunConfig to create. It will be in the same format as output by [`to_dict()`](qiskit.assembler.RunConfig#to_dict "qiskit.assembler.RunConfig.to_dict").
**Returns**
The RunConfig from the input dictionary.
**Return type**
[RunConfig](qiskit.assembler.RunConfig "qiskit.assembler.RunConfig")
</Function>
<span id="qiskit-assembler-runconfig-to-dict" />
### to\_dict
<Function id="qiskit.assembler.RunConfig.to_dict" signature="RunConfig.to_dict()">
Return a dictionary format representation of the RunConfig
**Returns**
The dictionary form of the RunConfig.
**Return type**
dict
</Function>
</Class>