qrunch.quantum.backends.iqm_resonance.iqm_resonance_backend
Module with implementation of IQM’s backend for running quantum circuits.
Classes
Job class for handling job on IQM. |
|
Class for handling IQM's quantum devices. |
|
Available IQM devices. |
- class IqmJob
Bases:
BackendJobJob class for handling job on IQM.
- __init__(backend: IqmResonanceBackend, job_id: UUID, mappings: list[dict[int, int]], shots: int, error_log: str) None
Initialize an IQM job.
- Parameters:
backend (IqmResonanceBackend) – Backend used for the job.
job_id (UUID) – id of the job.
mappings (list[dict[int, int]]) – list of the mappings of each circuit.
shots (int) – number of shots.
error_log (str) – Message to log in case of errors.
- Return type:
None
- cancel() None
Cancel the job.
- Return type:
None
- property job_id: str
ID of the job.
- result() BackendResult
Get the results of the job.
- Return type:
- status() BackendJobStatus
Return the collective status of all tasks in the job.
- Return type:
- wait_for_final_state(timeout: float | None = None) None
Wait until the job status is in a final state, i.e.,
DONE,CANCELLED, orFAILED.- Parameters:
timeout (float | None) – Seconds to wait for the job. If
None, wait forever.- Raises:
TimeoutError – If the job does not reach a final state before the specified timeout.
- Return type:
None
- class IqmResonanceBackend
Bases:
BackendClass for handling IQM’s quantum devices.
- __init__(token: str, device: IqmResonanceDevices = IqmResonanceDevices.GARNET, *, is_timeslot: bool = False, compiler: Compiler | None = None, layout_synthesizer: LayoutSynthesizer | None = None, iqm_options: CircuitCompilationOptions | None = None) None
Initialize an IQM backend.
The backend can be used to launch quantum circuits to quantum devices on IQM’s cloud.
- Parameters:
token (str) – Token used to access IQM’s cloud.
device (IqmResonanceDevices) – Device to run circuit on.
is_timeslot (bool) – If True, the device is a timeslot device.
compiler (Compiler | None) – Compiler for changing into universal gates. the compiler must implement the to_universal_gates method.
layout_synthesizer (LayoutSynthesizer | None) – Layout synthesizer to use if the device is not all-to-all connected.
iqm_options (CircuitCompilationOptions | None) – Options to be passed to the IQM backend when running the circuits.
- Return type:
None
- property client: IQMClient
IQM Client.
- get_device_data() DeviceData
Get the device data for the IQM backend.
- Return type:
- property name: str
Name of the backend.
- supports_shots_equals_none() bool
Return whether the backend supports shots = None.
IQM Backend does not support shots = None.
- Return type:
bool