You're reading the documentation for a development version. For the latest released version, please have a look at 11.0.

iqm.qiskit_iqm.iqm_provider.IQMBackend#

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

Bases: iqm.qiskit_iqm.iqm_backend.IQMBackendBase

Backend for executing quantum circuits on IQM quantum computers.

Parameters
  • client (iqm.iqm_client.iqm_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

Parameters
  • 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 (iqm.iqm_client.iqm_client.IQMClient) –

Raises

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

Attributes

max_circuits

The maximum number of circuits (or Pulse schedules) that can be run in a single job.

Methods

_default_options()

Return the default options

close_client()

Close IQMClient's session with the authentication server.

retrieve_job(job_id)

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

run(run_input, **options)

Run on the backend.

serialize_circuit(circuit)

Serialize a quantum circuit into the IQM data transfer format.

property max_circuits: Optional[int]#

The maximum number of circuits (or Pulse schedules) that can be run in a single job.

If there is no limit this will return None

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.

Parameters
  • run_input (QuantumCircuit or Schedule or ScheduleBlock or list) – An individual or a list of 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.

Returns

The job object for the run

Return type

Job

retrieve_job(job_id)#

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

Parameters

job_id (str) –

Return type

iqm.qiskit_iqm.iqm_job.IQMJob

close_client()#

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

serialize_circuit(circuit)#

Serialize a quantum circuit into the IQM data transfer format.

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

Parameters

circuit (qiskit.circuit.quantumcircuit.QuantumCircuit) – quantum circuit to serialize

Returns

data transfer object representing the circuit

Raises

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

Return type

iqm.iqm_client.iqm_client.Circuit