qiskit.providers.ibmq.runtime.ProgramBackend
class ProgramBackend(configuration, provider=None, **fields)
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
__init__
__init__(configuration, provider=None, **fields)
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
Methods
__init__ (configuration[, provider]) | Initialize a backend class |
configuration () | Return the backend configuration. |
name () | Return the backend name. |
properties () | Return the backend properties. |
provider () | Return the backend Provider. |
run (circuits[, timeout]) | Run on the backend. |
set_options (**fields) | Set the options fields for the backend |
status () | Return the backend status. |
Attributes
options | Return the options for the backend |
version |
configuration
configuration()
Return the backend configuration.
Returns
the configuration for the backend.
Return type
name
name()
Return the backend name.
Returns
the name of the backend.
Return type
str
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.
properties
properties()
Return the backend properties.
Returns
the configuration for the backend. If the backend does not support properties, it returns None
.
Return type
provider
provider()
Return the backend Provider.
Returns
the Provider responsible for the backend.
Return type
run
abstract 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
- circuits (
Union
[QasmQobj
,PulseQobj
,QuantumCircuit
,Schedule
,List
[Union
[QuantumCircuit
,Schedule
]]]) – An individual or a list ofQuantumCircuit
orSchedule
objects to run on the backend. AQasmQobj
or aPulseQobj
object is also supported but is deprecated. - timeout (
Optional
[int
]) – Seconds to wait for circuit execution to finish. - **run_config – Extra arguments used to configure the run.
Return type
JobV1
Returns
The job to be executed.
Raises
- IBMQBackendApiError – If an unexpected error occurred while submitting the job.
- IBMQBackendApiProtocolError – If an unexpected value received from the server.
- IBMQBackendValueError – If an input parameter value is not valid.
set_options
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