IBMQBackend

class IBMQBackend(configuration, provider, credentials, api)[source]

Backend class interfacing with an IBM Quantum Experience device.

You can run experiments on a backend using the run() method after assembling them into the Qobj format. The run() method returns an IBMQJob instance that represents the submitted job. Each job has a unique job ID, which can later be used to retrieve the job. An example of this flow:

from qiskit import IBMQ, assemble, transpile
from qiskit.circuit.random import random_circuit

provider = IBMQ.load_account()
backend = provider.backends.ibmq_vigo
qx = random_circuit(n_qubits=5, depth=4)
qobj = assemble(transpile(qx, backend=backend), backend=backend)
job = backend.run(qobj)
retrieved_job = backend.retrieve_job(job.job_id())

Note

You should not instantiate the IBMQBackend class directly. Instead, use the methods provided by an AccountProvider instance to retrieve and handle backends.

Other methods return information about the backend. For example, the status() method returns a BackendStatus instance. The instance contains the operational and pending_jobs attributes, which state whether the backend is operational and also the number of jobs in the server queue for the backend, respectively:

status = backend.status()
is_operational = status.operational
jobs_in_queue = status.pending_jobs

It is also possible to see the number of remaining jobs you are able to submit to the backend with the job_limit() method, which returns a BackendJobLimit instance:

job_limit = backend.job_limit()

IBMQBackend constructor.

Parameters

Methods

IBMQBackend.active_jobs([limit])

Return the unfinished jobs submitted to this backend.

IBMQBackend.configuration()

Return the backend configuration.

IBMQBackend.defaults([refresh])

Return the pulse defaults for the backend.

IBMQBackend.job_limit()

Return the job limit for the backend.

IBMQBackend.jobs([limit, skip, status, …])

Return the jobs submitted to this backend, subject to optional filtering.

IBMQBackend.name()

Return the backend name.

IBMQBackend.properties([refresh, datetime])

Return the backend properties, subject to optional filtering.

IBMQBackend.provider()

Return the backend Provider.

IBMQBackend.remaining_jobs_count()

Return the number of remaining jobs that could be submitted to the backend.

IBMQBackend.retrieve_job(job_id)

Return a single job submitted to this backend.

IBMQBackend.run(qobj[, job_name, …])

Run a Qobj asynchronously.

IBMQBackend.status()

Return the backend status.

IBMQBackend.version()

Return the backend version.