203 lines
10 KiB
Plaintext
203 lines
10 KiB
Plaintext
---
|
||
title: QasmBackendConfiguration (v1.2)
|
||
description: API reference for qiskit.providers.models.QasmBackendConfiguration in qiskit v1.2
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.providers.models.QasmBackendConfiguration
|
||
---
|
||
|
||
# QasmBackendConfiguration
|
||
|
||
<Class id="qiskit.providers.models.QasmBackendConfiguration" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/providers/models/backendconfiguration.py#L213-L517" signature="qiskit.providers.models.QasmBackendConfiguration(backend_name, backend_version, n_qubits, basis_gates, gates, local, simulator, conditional, open_pulse, memory, max_shots, coupling_map, supported_instructions=None, dynamic_reprate_enabled=False, rep_delay_range=None, default_rep_delay=None, max_experiments=None, sample_name=None, n_registers=None, register_map=None, configurable=None, credits_required=None, online_date=None, display_name=None, description=None, tags=None, dt=None, dtm=None, processor_type=None, parametric_pulses=None, **kwargs)" modifiers="class">
|
||
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.13)")
|
||
|
||
Class representing an OpenQASM 2.0 Backend Configuration.
|
||
|
||
### backend\_name
|
||
|
||
<Attribute id="qiskit.providers.models.QasmBackendConfiguration.backend_name">
|
||
backend name.
|
||
</Attribute>
|
||
|
||
### backend\_version
|
||
|
||
<Attribute id="qiskit.providers.models.QasmBackendConfiguration.backend_version">
|
||
backend version in the form X.Y.Z.
|
||
</Attribute>
|
||
|
||
### n\_qubits
|
||
|
||
<Attribute id="qiskit.providers.models.QasmBackendConfiguration.n_qubits">
|
||
number of qubits.
|
||
</Attribute>
|
||
|
||
### basis\_gates
|
||
|
||
<Attribute id="qiskit.providers.models.QasmBackendConfiguration.basis_gates">
|
||
list of basis gates names on the backend.
|
||
</Attribute>
|
||
|
||
### gates
|
||
|
||
<Attribute id="qiskit.providers.models.QasmBackendConfiguration.gates">
|
||
list of basis gates on the backend.
|
||
</Attribute>
|
||
|
||
### local
|
||
|
||
<Attribute id="qiskit.providers.models.QasmBackendConfiguration.local">
|
||
backend is local or remote.
|
||
</Attribute>
|
||
|
||
### simulator
|
||
|
||
<Attribute id="qiskit.providers.models.QasmBackendConfiguration.simulator">
|
||
backend is a simulator.
|
||
</Attribute>
|
||
|
||
### conditional
|
||
|
||
<Attribute id="qiskit.providers.models.QasmBackendConfiguration.conditional">
|
||
backend supports conditional operations.
|
||
</Attribute>
|
||
|
||
### open\_pulse
|
||
|
||
<Attribute id="qiskit.providers.models.QasmBackendConfiguration.open_pulse">
|
||
backend supports open pulse.
|
||
</Attribute>
|
||
|
||
### memory
|
||
|
||
<Attribute id="qiskit.providers.models.QasmBackendConfiguration.memory">
|
||
backend supports memory.
|
||
</Attribute>
|
||
|
||
### max\_shots
|
||
|
||
<Attribute id="qiskit.providers.models.QasmBackendConfiguration.max_shots">
|
||
maximum number of shots supported.
|
||
</Attribute>
|
||
|
||
Initialize a QasmBackendConfiguration Object
|
||
|
||
<Admonition title="Deprecated since version 1.2" type="danger">
|
||
The class `qiskit.providers.models.backendconfiguration.QasmBackendConfiguration` is deprecated as of qiskit 1.2. It will be removed in the 2.0 release. The models in `qiskit.providers.models` are part of the deprecated BackendV1 workflow and no longer necessary for BackendV2. If a user workflow requires these representations it likely relies on deprecated functionality and should be updated to use BackendV2.
|
||
</Admonition>
|
||
|
||
**Parameters**
|
||
|
||
* **backend\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) – The backend name
|
||
|
||
* **backend\_version** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) – The backend version in the form X.Y.Z
|
||
|
||
* **n\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) – the number of qubits for the backend
|
||
|
||
* **basis\_gates** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) – The list of strings for the basis gates of the backends
|
||
|
||
* **gates** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) – The list of GateConfig objects for the basis gates of the backend
|
||
|
||
* **local** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) – True if the backend is local or False if remote
|
||
|
||
* **simulator** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) – True if the backend is a simulator
|
||
|
||
* **conditional** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) – True if the backend supports conditional operations
|
||
|
||
* **open\_pulse** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) – True if the backend supports OpenPulse
|
||
|
||
* **memory** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) – True if the backend supports memory
|
||
|
||
* **max\_shots** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) – The maximum number of shots allowed on the backend
|
||
|
||
* **coupling\_map** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) – The coupling map for the device
|
||
|
||
* **supported\_instructions** (*List\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*]*) – Instructions supported by the backend.
|
||
|
||
* **dynamic\_reprate\_enabled** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) – whether delay between programs can be set dynamically (ie via `rep_delay`). Defaults to False.
|
||
|
||
* **rep\_delay\_range** (*List\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*]*) – 2d list defining supported range of repetition delays for backend in μs. First entry is lower end of the range, second entry is higher end of the range. Optional, but will be specified when `dynamic_reprate_enabled=True`.
|
||
|
||
* **default\_rep\_delay** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) – Value of `rep_delay` if not specified by user and `dynamic_reprate_enabled=True`.
|
||
|
||
* **max\_experiments** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) – The maximum number of experiments per job
|
||
|
||
* **sample\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) – Sample name for the backend
|
||
|
||
* **n\_registers** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) – Number of register slots available for feedback (if conditional is True)
|
||
|
||
* **register\_map** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) – An array of dimension n\_qubits X n\_registers that specifies whether a qubit can store a measurement in a certain register slot.
|
||
|
||
* **configurable** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) – True if the backend is configurable, if the backend is a simulator
|
||
|
||
* **credits\_required** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) – True if backend requires credits to run a job.
|
||
|
||
* **online\_date** ([*datetime.datetime*](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.13)")) – The date that the device went online
|
||
|
||
* **display\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) – Alternate name field for the backend
|
||
|
||
* **description** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) – A description for the backend
|
||
|
||
* **tags** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) – A list of string tags to describe the backend
|
||
|
||
* **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) – Qubit drive channel timestep in nanoseconds.
|
||
|
||
* **dtm** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) – Measurement drive channel timestep in nanoseconds.
|
||
|
||
* **processor\_type** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")) –
|
||
|
||
Processor type for this backend. A dictionary of the form `{"family": <str>, "revision": <str>, segment: <str>}` such as `{"family": "Canary", "revision": "1.0", segment: "A"}`.
|
||
|
||
* family: Processor family of this backend.
|
||
* revision: Revision version of this processor.
|
||
* segment: Segment this processor belongs to within a larger chip.
|
||
|
||
* **parametric\_pulses** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) – A list of pulse shapes which are supported on the backend. For example: `['gaussian', 'constant']`
|
||
|
||
* **\*\*kwargs** – optional fields
|
||
|
||
## Attributes
|
||
|
||
### num\_qubits
|
||
|
||
<Attribute id="qiskit.providers.models.QasmBackendConfiguration.num_qubits">
|
||
Returns the number of qubits.
|
||
|
||
In future, n\_qubits should be replaced in favor of num\_qubits for consistent use throughout Qiskit. Until this is properly refactored, this property serves as intermediate solution.
|
||
</Attribute>
|
||
|
||
## Methods
|
||
|
||
### from\_dict
|
||
|
||
<Function id="qiskit.providers.models.QasmBackendConfiguration.from_dict" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/providers/models/backendconfiguration.py#L413-L427" signature="from_dict(data)" modifiers="classmethod">
|
||
Create a new GateConfig object from a dictionary.
|
||
|
||
**Parameters**
|
||
|
||
**data** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")) – A dictionary representing the GateConfig to create. It will be in the same format as output by [`to_dict()`](#qiskit.providers.models.QasmBackendConfiguration.to_dict "qiskit.providers.models.QasmBackendConfiguration.to_dict").
|
||
|
||
**Returns**
|
||
|
||
The GateConfig from the input dictionary.
|
||
|
||
**Return type**
|
||
|
||
[GateConfig](qiskit.providers.models.GateConfig "qiskit.providers.models.GateConfig")
|
||
</Function>
|
||
|
||
### to\_dict
|
||
|
||
<Function id="qiskit.providers.models.QasmBackendConfiguration.to_dict" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/providers/models/backendconfiguration.py#L429-L498" signature="to_dict()">
|
||
Return a dictionary format representation of the GateConfig.
|
||
|
||
**Returns**
|
||
|
||
The dictionary form of the GateConfig.
|
||
|
||
**Return type**
|
||
|
||
[dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")
|
||
</Function>
|
||
</Class>
|
||
|