Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

ProgramBackend

class ProgramBackend(configuration, provider=None, **fields)

GitHub

Bases: qiskit.providers.backend.BackendV1, abc.ABC

Base class for a program backend.

This is a Backend class for runtime programs to submit circuits.

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

In addition to the public abstract methods, subclasses should also implement the following private methods:

_default_options

abstract classmethod _default_options()

Return the default options

This method will return a qiskit.providers.Options subclass object that will be used for the default options. These should be the default parameters to use for the options of the backend.

Returns

A options object with

default values set

Return type

qiskit.providers.Options


Methods

configuration

ProgramBackend.configuration()

Return the backend configuration.

Returns

the configuration for the backend.

Return type

BackendConfiguration

name

ProgramBackend.name()

Return the backend name.

Returns

the name of the backend.

Return type

str

properties

ProgramBackend.properties()

Return the backend properties.

Returns

the configuration for the backend. If the backend does not support properties, it returns None.

Return type

BackendProperties

provider

ProgramBackend.provider()

Return the backend Provider.

Returns

the Provider responsible for the backend.

Return type

Provider

run

abstract ProgramBackend.run(circuits, timeout=None, **run_config)

Run on the backend.

Runtime circuit execution is synchronous, and control will not go back until the execution finishes. You can use the timeout parameter to set a timeout value to wait for the execution to finish. Note that if the execution times out, circuit execution results will not be available.

Parameters

Return type

JobV1

Returns

The job to be executed.

Raises

set_options

ProgramBackend.set_options(**fields)

Set the options fields for the backend

This method is used to update the options of a backend. If you need to change any of the options prior to running just pass in the kwarg with the new value for the options.

Parameters

fields – The fields to update the options

Raises

AttributeError – If the field passed in is not part of the options

status

ProgramBackend.status()

Return the backend status.

Returns

the status of the backend.

Return type

BackendStatus


Attributes

options

Return the options for the backend

The options of a backend are the dynamic parameters defining how the backend is used. These are used to control the run() method.

version

Default value: 1

Was this page helpful?
Report a bug or request content on GitHub.