class iqm.qiskit_iqm.iqm_provider.IQMBackend(client, **kwargs)#

Bases: IQMBackendBase

Backend for executing quantum circuits on IQM quantum computers.

  • client (IQMClient) – client instance for communicating with an IQM server

  • **kwargs – optional arguments to be passed to the parent Backend initializer

Initialize a BackendV2 based backend

  • provider – An optional backwards reference to the Provider object that the backend is from

  • name – An optional name for the backend

  • description – An optional description of the backend

  • online_date – An optional datetime the backend was brought online

  • backend_version – An optional backend version string. This differs from the version attribute as version is for the abstract Backend abstract interface version of the object while backend_version is for versioning the backend itself.

  • fields – kwargs for the values to use to override the default options.

  • client (IQMClient) –


AttributeError – If a field is specified that’s outside the backend’s options



Maximum number of circuits that should be run in a single batch.



Name of the backend.


Optional human-readable description.


Date that the backend came online.


Version of the backend being provided.



Return the default options


Close IQMClient's session with the authentication server.


Create and return an IQMJob instance associated with this backend with given job id.

run(run_input, **options)

Run on the backend.


Serialize a quantum circuit into the IQM data transfer format.

property max_circuits: int | None#

Maximum number of circuits that should be run in a single batch.

Currently there is no hard limit on the number of circuits that can be executed in a single batch/job. However, some libraries like Qiskit Experiments use this property to split multi-circuit computational tasks into multiple baches/jobs.

The default value is None, meaning there is no limit. You can set it to a specific integer value to force these libraries to execute at most that many circuits in a single batch.

run(run_input, **options)#

Run on the backend.

This method returns a Job object that runs circuits. Depending on the backend this may be either an async or sync call. It is at the discretion of the provider to decide whether running should block until the execution is finished or not: the Job class can handle either situation.

  • run_input (QuantumCircuit or Schedule or ScheduleBlock or list) – An individual or a list of QuantumCircuit, ScheduleBlock, or Schedule objects to run on the backend.

  • options – Any kwarg options to pass to the backend for running the config. If a key is also present in the options attribute/object then the expectation is that the value specified will be used instead of what’s set in the options object.


The job object for the run

Return type:



Create and return an IQMJob instance associated with this backend with given job id.


job_id (str) –

Return type:



Close IQMClient’s session with the authentication server. Discard the client.


Serialize a quantum circuit into the IQM data transfer format.

Serializing is not strictly bound to the native gateset, i.e. some gates that are not explicitly mentioned in the native gateset of the backend can still be serialized. For example, the native single qubit gate for IQM backend is the ‘r’ gate, however ‘x’, ‘rx’, ‘y’ and ‘ry’ gates can also be serialized since they are just particular cases of the ‘r’ gate. If the circuit was transpiled against a backend using Qiskit’s transpiler machinery, these gates are not supposed to be present. However, when constructing circuits manually and submitting directly to the backend, it is sometimes more explicit and understandable to use these concrete gates rather than ‘r’. Serializing them explicitly makes it possible for the backend to accept such circuits.

Qiskit uses one measurement instruction per qubit (i.e. there is no measurement grouping concept). While serializing we do not group any measurements together but rather associate a unique measurement key with each measurement instruction, so that the results can later be reconstructed correctly (see MeasurementKey documentation for more details).


circuit (QuantumCircuit) – quantum circuit to serialize


data transfer object representing the circuit


ValueError – circuit contains an unsupported instruction or is not transpiled in general

Return type: