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

101 lines
3.6 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 (v1.2)
description: API reference for qiskit.assembler.RunConfig in qiskit v1.2
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/1.2/qiskit/assembler/run_config.py#L18-L77" signature="qiskit.assembler.RunConfig(shots=None, seed_simulator=None, memory=None, parameter_binds=None, **kwargs)" modifiers="class">
Bases: [`SimpleNamespace`](https://docs.python.org/3/library/types.html#types.SimpleNamespace "(in Python v3.13)")
Class for Run Configuration.
### shots
<Attribute id="qiskit.assembler.RunConfig.shots">
the number of shots
**Type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### seed\_simulator
<Attribute id="qiskit.assembler.RunConfig.seed_simulator">
the seed to use in the simulator
**Type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### memory
<Attribute id="qiskit.assembler.RunConfig.memory">
whether to request memory from backend (per-shot readouts)
**Type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Attribute>
### parameter\_binds
<Attribute id="qiskit.assembler.RunConfig.parameter_binds">
List of parameter bindings
**Type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")\[[dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")]
</Attribute>
Initialize a RunConfig object
**Parameters**
* **shots** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) the number of shots
* **seed\_simulator** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) the seed to use in the simulator
* **memory** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) whether to request memory from backend (per-shot readouts)
* **parameter\_binds** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")*]*) List of parameter bindings
* **\*\*kwargs** optional fields
## Methods
### from\_dict
<Function id="qiskit.assembler.RunConfig.from_dict" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/assembler/run_config.py#L57-L69" signature="from_dict(data)" modifiers="classmethod">
Create a new RunConfig object from a dictionary.
**Parameters**
**data** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")) 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>
### to\_dict
<Function id="qiskit.assembler.RunConfig.to_dict" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/assembler/run_config.py#L71-L77" signature="to_dict()">
Return a dictionary format representation of the RunConfig
**Returns**
The dictionary form of the RunConfig.
**Return type**
[dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")
</Function>
</Class>