qiskit-documentation/docs/api/qiskit/0.27/qiskit.providers.BaseBacken...

152 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: BaseBackend
description: API reference for qiskit.providers.BaseBackend
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.providers.BaseBackend
---
# qiskit.providers.BaseBackend
<Class id="qiskit.providers.BaseBackend" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.17/qiskit/providers/basebackend.py" signature="BaseBackend(configuration, provider=None)" modifiers="class">
Legacy Base class for backends.
Base class for backends.
This method should initialize the module and its configuration, and raise an exception if a component of the module is not available.
**Parameters**
* **configuration** ([*BackendConfiguration*](qiskit.providers.models.BackendConfiguration "qiskit.providers.models.BackendConfiguration")) backend configuration
* **provider** ([*BaseProvider*](qiskit.providers.BaseProvider "qiskit.providers.BaseProvider")) provider responsible for this backend
**Raises**
**QiskitError** if an error occurred when instantiating the backend.
### \_\_init\_\_
<Function id="qiskit.providers.BaseBackend.__init__" signature="__init__(configuration, provider=None)" modifiers="abstract">
Base class for backends.
This method should initialize the module and its configuration, and raise an exception if a component of the module is not available.
**Parameters**
* **configuration** ([*BackendConfiguration*](qiskit.providers.models.BackendConfiguration "qiskit.providers.models.BackendConfiguration")) backend configuration
* **provider** ([*BaseProvider*](qiskit.providers.BaseProvider "qiskit.providers.BaseProvider")) provider responsible for this backend
**Raises**
**QiskitError** if an error occurred when instantiating the backend.
</Function>
## Methods
| | |
| ------------------------------------------------------------------------------------------------------------------------ | --------------------------------- |
| [`__init__`](#qiskit.providers.BaseBackend.__init__ "qiskit.providers.BaseBackend.__init__")(configuration\[, provider]) | Base class for backends. |
| [`configuration`](#qiskit.providers.BaseBackend.configuration "qiskit.providers.BaseBackend.configuration")() | Return the backend configuration. |
| [`name`](#qiskit.providers.BaseBackend.name "qiskit.providers.BaseBackend.name")() | Return the backend name. |
| [`properties`](#qiskit.providers.BaseBackend.properties "qiskit.providers.BaseBackend.properties")() | Return the backend properties. |
| [`provider`](#qiskit.providers.BaseBackend.provider "qiskit.providers.BaseBackend.provider")() | Return the backend Provider. |
| [`run`](#qiskit.providers.BaseBackend.run "qiskit.providers.BaseBackend.run")(qobj) | Run a Qobj on the the backend. |
| [`status`](#qiskit.providers.BaseBackend.status "qiskit.providers.BaseBackend.status")() | Return the backend status. |
| [`version`](#qiskit.providers.BaseBackend.version "qiskit.providers.BaseBackend.version")() | Return the backend version. |
### configuration
<Function id="qiskit.providers.BaseBackend.configuration" signature="configuration()">
Return the backend configuration.
**Returns**
the configuration for the backend.
**Return type**
[BackendConfiguration](qiskit.providers.models.BackendConfiguration "qiskit.providers.models.BackendConfiguration")
</Function>
### name
<Function id="qiskit.providers.BaseBackend.name" signature="name()">
Return the backend name.
**Returns**
the name of the backend.
**Return type**
str
</Function>
### properties
<Function id="qiskit.providers.BaseBackend.properties" signature="properties()">
Return the backend properties.
**Returns**
the configuration for the backend. If the backend does not support properties, it returns `None`.
**Return type**
[BackendProperties](qiskit.providers.models.BackendProperties "qiskit.providers.models.BackendProperties")
</Function>
### provider
<Function id="qiskit.providers.BaseBackend.provider" signature="provider()">
Return the backend Provider.
**Returns**
the Provider responsible for the backend.
**Return type**
[BaseProvider](qiskit.providers.BaseProvider "qiskit.providers.BaseProvider")
</Function>
### run
<Function id="qiskit.providers.BaseBackend.run" signature="run(qobj)" modifiers="abstract">
Run a Qobj on the the backend.
**Parameters**
**qobj** ([*Qobj*](qiskit.qobj.Qobj "qiskit.qobj.Qobj")) the Qobj to be executed.
</Function>
### status
<Function id="qiskit.providers.BaseBackend.status" signature="status()">
Return the backend status.
**Returns**
the status of the backend.
**Return type**
[BackendStatus](qiskit.providers.models.BackendStatus "qiskit.providers.models.BackendStatus")
</Function>
### version
<Function id="qiskit.providers.BaseBackend.version" signature="version()">
Return the backend version.
**Returns**
the X.X.X version of the backend.
**Return type**
str
</Function>
</Class>