Skip to main contentIBM Quantum Documentation

Get backend information with Qiskit

Package versions

The code on this page was developed using the following requirements. We recommend using these versions or newer.

qiskit[all]~=1.2.4
qiskit-aer~=0.15.1
qiskit-ibm-runtime~=0.31.0
qiskit-serverless~=0.17.1
qiskit-ibm-catalog~=0.1

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:

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

Output:

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

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:

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)
service.backends(simulator=False, operational=True, min_num_qubits=5)

Output:

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

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:

service.least_busy(operational=True, min_num_qubits=5)

Output:

<IBMBackend('ibm_brisbane')>

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.

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.

backend.qubit_properties(0)  # properties of qubit 0

Output:

QubitProperties(t1=0.0004359191921774979, t2=9.098970775335616e-05, 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.

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

Output:

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

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

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

Output:

InstructionProperties(duration=1.216e-06, error=0.007400000000000073, calibration=PulseQobj)

Next steps

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