qiskit-documentation/docs/api/qiskit/1.2/qiskit.providers.models.Bac...

65 lines
2.9 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: BackendConfiguration (v1.2)
description: API reference for qiskit.providers.models.BackendConfiguration in qiskit v1.2
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.providers.models.BackendConfiguration
---
# BackendConfiguration
<Class id="qiskit.providers.models.BackendConfiguration" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/providers/models/backendconfiguration.py#L520-L533" signature="qiskit.providers.models.BackendConfiguration(*args, **kwargs)" modifiers="class">
Bases: [`QasmBackendConfiguration`](qiskit.providers.models.QasmBackendConfiguration "qiskit.providers.models.backendconfiguration.QasmBackendConfiguration")
Backwards compatibility shim representing an abstract backend configuration.
<Admonition title="Deprecated since version 1.2" type="danger">
The class `qiskit.providers.models.backendconfiguration.BackendConfiguration` 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>
## Attributes
### num\_qubits
<Attribute id="qiskit.providers.models.BackendConfiguration.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.BackendConfiguration.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.BackendConfiguration.to_dict "qiskit.providers.models.BackendConfiguration.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.BackendConfiguration.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>