Skip to main contentIBM Quantum Documentation Preview

Get backend information with Qiskit

This page explains how to use Qiskit to find information about your available backends.


List backends

To view the backends you have access to, you can either view a list on the Compute resources page, or you can use the QiskitRuntimeService.backends() method. This method returns a list of IBMBackend instances:

[1] :
# Initialize your account
from qiskit_ibm_runtime import QiskitRuntimeService
service = QiskitRuntimeService(instance="ibm-q/open/main")
 
service.backends()

Output:

[<IBMBackend('ibm_brisbane')>,
 <IBMBackend('ibm_sherbrooke')>,
 <IBMBackend('ibm_kyiv')>]

The QiskitRuntimeService.backend() method (note that this is singular: backend) takes the name of the backend as the input parameter and returns an IBMBackend instance representing that particular backend:

[2] :
service.backend("ibm_brisbane")

Output:

<IBMBackend('ibm_brisbane')>

Filter backends

You can also filter the available backends by their properties. For more general filters, set the filters argument to a function that accepts a backend object and returns True if it meets your criteria. Refer to the API documentation for more details.

The following code returns only backends that fit these criteria:

  • Are real quantum devices (simulator=False)
  • Are currently operational (operational=True)
  • Have at least 5 qubits (min_num_qubits=5)
[3] :
service.backends(simulator=False, operational=True, min_num_qubits=5)

Output:

[<IBMBackend('ibm_brisbane')>,
 <IBMBackend('ibm_sherbrooke')>,
 <IBMBackend('ibm_kyiv')>]

Use these keyword arguments to filter by any attribute in backend configuration (JSON schema) or status (JSON schema). A similar method is QiskitRuntimeService.least_busy(), which takes the same filters as backends() but returns the backend that matches the filters and has the least number of jobs pending in the queue:

[4] :
service.least_busy(operational=True, min_num_qubits=5)

Output:

<IBMBackend('ibm_sherbrooke')>

Static backend information

Some information about a backend does not change regularly, such as its name, version, the number of qubits it has, and the types of features it supports. This information is available as attributes of the backend object.

The following cell builds a description of a backend.

[5] :
backend = service.backend("ibm_sherbrooke")
 
print(
    f"Name: {backend.name}\n"
    f"Version: {backend.version}\n"
    f"No. of qubits: {backend.num_qubits}\n"
)

Output:

Name: ibm_sherbrooke
Version: 2
No. of qubits: 127

For a full list of attributes, see the IBMBackend API documentation.


Dynamic backend information

Backends can also have properties that change whenever the backed is calibrated, such as qubit frequency and operation error rates. Backends are usually calibrated every 24 hours, and their properties update after the calibration sequence completes. These properties can be used when optimizing quantum circuits or to construct noise models for a classical simulator.

Qubit properties

The backend.qubit_properties method returns information about the qubits' physical attributes. This includes the qubit frequency in GHz and decay times (t1 and t2) in µs.

[6] :
backend.qubit_properties(0)  # properties of qubit 0

Output:

QubitProperties(t1=0.0002648987050342707, t2=0.00022849632444269408, frequency=4635662846.425661)

Instruction properties

The backend.target attribute is a qiskit.transpiler.Target object: an object that contains all the information needed to transpile a circuit for that backend. This includes instruction errors and durations. For example, the following cell gets the properties for an ecr gate acting between qubits 1 and 0.

[7] :
backend.target["ecr"][(1,0)]

Output:

InstructionProperties(duration=5.333333333333332e-07, error=0.0060208139584001785, calibration=PulseQobj)

The following cell shows the properties for a measurement operation (including the readout error) on qubit 0.

[8] :
backend.target["measure"][(0,)]

Output:

InstructionProperties(duration=1.2444444444444443e-06, error=0.0032999999999999696, calibration=PulseQobj)

Next steps

Recommendations