Spanish
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

IBMQBackend

class IBMQBackend(configuration, provider, credentials, api_client)[fuente]

Bases: BackendV1

Backend class interfacing with an IBM Quantum Experience device.

You can run experiments on a backend using the run() method. The run() method takes one or more QuantumCircuit or Schedule and 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.backend.ibmq_vigo
qx = random_circuit(n_qubits=5, depth=4)
transpiled = transpile(qx, backend=backend)
job = backend.run(transpiled)
retrieved_job = backend.retrieve_job(job.job_id())

Nota

  • Unlike qiskit.execute(), the run() method does not transpile the circuits/schedules for you, so be sure to do so before submitting them.

  • 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.

Parámetros

Methods

active_jobs

Return the unfinished jobs submitted to this backend.

configuration

Return the backend configuration.

defaults

Return the pulse defaults for the backend.

job_limit

Return the job limit for the backend.

jobs

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

name

Return the backend name.

properties

Return the backend properties, subject to optional filtering.

provider

Return the backend Provider.

remaining_jobs_count

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

reservations

Return backend reservations.

retrieve_job

Return a single job submitted to this backend.

run

Run on the backend.

set_options

Set the options fields for the backend

status

Return the backend status.

Attributes

id_warning_issued = False
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.

qobj_warning_issued = False
version = 1