BackendV1

class BackendV1(configuration, provider=None, **fields)[source]

Abstract class for Backends

This abstract class is to be used for all Backend objects created by a provider. There are several classes of information contained in a Backend. The first are the attributes of the class itself. These should be used to defined the immutable characteristics of the backend. The options attribute of the backend is used to contain the dynamic user configurable options of the backend. It should be used more for runtime options that configure how the backend is used. For example, something like a shots field for a backend that runs experiments which would contain an int for how many shots to execute. The properties attribute is optionally defined BackendProperties object and is used to return measured properties, or properties of a backend that may change over time. The simplest example of this would be a version string, which will change as a backend is updated, but also could be something like noise parameters for backends that run experiments.

This first version of the Backend abstract class is written to be mostly backwards compatible with the legacy providers interface. This includes reusing the model objects BackendProperties and BackendConfiguration. This was done to ease the transition for users and provider maintainers to the new versioned providers. Expect, future versions of this abstract class to change the data model and interface.

Initialize a backend class

Parameters
  • configuration (BackendConfiguration) – A backend configuration object for the backend object.

  • provider (qiskit.providers.Provider) – Optionally, the provider object that this Backend comes from.

  • fields – kwargs for the values to use to override the default options.

Raises

AttributeError – if input field not a valid options

Attributes

BackendV1.options

Return the options for the backend

BackendV1.version

Methods

BackendV1.configuration()

Return the backend configuration.

BackendV1.name()

Return the backend name.

BackendV1.properties()

Return the backend properties.

BackendV1.provider()

Return the backend Provider.

BackendV1.run(run_input, **options)

Run on the backend.

BackendV1.set_options(**fields)

Set the options fields for the backend

BackendV1.status()

Return the backend status.