Architecture¶
The QHEAppE Client is the user-side part of the QaaS solution. It talks to two services:
- LEXIS Platform — authentication, projects and quantum resources (which HEAppE instances and backends you may use)
- HEAppE with QScheduler — the REST API in front of each quantum computer: machine information, calibration, job submission, results and job events
graph TD
User["User code<br/>(Qiskit circuits)"]
P["QProvider"]
B["QBackendIQM / QJob"]
F["QBackendIQMFactory<br/>(IQM version check)"]
C["QClient"]
LEXIS["LEXIS Platform<br/>(auth, projects, resources)"]
HEAppE["HEAppE + QScheduler<br/>(REST API, job events)"]
IQM["IQM quantum computer<br/>(station control)"]
User --> P
User --> B
P --> F
F --> B
P --> C
B --> C
C --> LEXIS
C --> HEAppE
HEAppE --> IQM
Components¶
QProvider¶
The entry point. Takes a LEXIS project and token, creates one QClient per quantum resource (cached), and builds backends through QBackendIQMFactory.
QClient¶
Does all network communication, asynchronously (aiohttp), with a synchronous API on top. Sync calls run on the client's own background event loop, so they also work inside Jupyter and other code that already runs an event loop.
- verifies the LEXIS token and checks access to the project and resource
- discovers the HEAppE clusters (backends) of the resource and checks their availability
- reads
MachineInfo, the machine architecture and calibration data from QScheduler - submits jobs, fetches results and artifacts, cancels jobs, and manages QScheduler sessions
- listens to the HEAppE job-event websocket to know when a job finishes
QBackendIQM and QJob¶
A Qiskit BackendV2 built from the backend's IQM dynamic architecture. It transpiles circuits with IQM's transpiler, serializes them into an IQM circuit job definition and submits it through QClient. QJob waits for the job and converts the results into a Qiskit PrimitiveResult or legacy Result.
QBackendIQMFactory (IQM version selection)¶
Only one generation of the IQM client libraries can be installed at a time (iqm_qiskit = iqm-client 36, iqm35_qiskit = iqm-client 35). The factory compares the installed one with the station_control_version the backend reports in MachineInfo:
| Backend station-control | Works with |
|---|---|
| 50.x (current) | iqm-client 36 |
| 49.x (older) | iqm-client 36 (recommended) or iqm-client 35 |
| unknown | the installed version, with a warning |
On a mismatch it raises a QException with the pip install command for the right extra. The differences between the IQM versions are kept in small adapter modules (qheappe_client.iqm_compat.iqm35 / iqm36).
Job flow¶
What happens when you call backend.run(...) and job.result():
- Job definition — the transpiled circuits are converted into an IQM circuit job definition (JSON), including the calibration set and shot count.
- Submission —
QClientsends it toPOST /heappe/QScheduler/CreateAndSubmitJob; HEAppE returns the job ID. - Execution — QScheduler queues the job and runs it on the IQM quantum computer.
- Completion —
QClientwaits for a terminal job state from the HEAppE event websocket (/heappe/Events). - Results — the results of each task are fetched from
GET /heappe/QScheduler/GetTaskResult(and per-shot measurements as task artifacts) and converted into Qiskit result objects.
Design decisions¶
- Client-side transpilation — circuits are transpiled against the backend's current calibration before submission, so the backend always receives native-gate circuits.
- Current calibration — the dynamic architecture is loaded when the backend is created;
calibration_set_idpins a specific one, anduse_metrics=Trueadds calibration quality metrics to the transpiler target. - Direct QScheduler API — jobs are submitted through the QScheduler REST API instead of HEAppE command templates (used by the legacy
qaasclient). - Optional IQM dependencies — the IQM libraries come from extras, so the client can support more than one IQM release.