Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

QHEAppE — Quantum-as-a-Service through HEAppE

Documentation

Access IQM quantum hardware through the LEXIS Platform via HEAppE.

Documentation: https://it4innovations.github.io/quantum-as-a-service/

Requirements

  • Python 3.12

  • Required Python packages: see dependencies in pyproject.toml

Installation

QHEAppE can be installed using pip. To install the package along with optional dependencies for IQM integration:

pip install qaas[iqm_qiskit] --extra-index-url https://opencode.it4i.eu/api/v4/projects/107/packages/pypi/simple

iqm_qiskit installs the current IQM libraries (iqm-client 36.x). They work with current backends (station-control 50.x) and with older ones (49.x), so this is the extra to use. qaas[iqm35_qiskit] (iqm-client 35.x) is only needed for code that uses Pulla (e.g. the legacy qaas client) and works with 49.x backends only. Install only one of the two. QProvider.get_backend() checks the version the backend reports and raises an error that names the extra to install if it does not match.

Architecture

QHEAppE Architecture Diagram

Quick start

The following example demonstrates the basic usage of the QProvider and QBackend interfaces:

from qheappe_client.qprovider import QProvider
from qiskit import QuantumCircuit

# 1. Build a Qiskit circuit (Bell state)
qc = QuantumCircuit(2, 3)
qc.h(0)
qc.cx(0, 1)
qc.measure([0, 1], [0, 1])
qc.h(0)
qc.measure(0, 2)

# 2. Instantiate QProvider with your LEXIS authentication details
lexis_project = "your_project_name"
resource_name = "your_resource_name"

provider = QProvider(
    lexis_project=lexis_project,
    # Without passing token, an interactive login flow through the browser will happen
    # token=os.getenv("LEXIS_TOKEN"),
)

# Alternatively, you can log in via py4lexis and then pass the session (recommended for remote scripts executed on remote HW via terminal, etc.)
# from py4lexis.session import LexisSession
# session = LexisSession()  # Interactive login flow
# token = session.get_access_token()

# 3. Initialize the QBackend with the client
backend = provider.get_backend(
    lexis_resource=resource_name, backend_name="target_backend_name"
)

# 4. Transpile the circuit
qc_transpiled = backend.transpile(qc)

# 5. Submit the circuit job
job = backend.run(qc_transpiled, shots=1024, job_name="demo_bell_state")
print(f"Job submitted successfully. Job ID: {job.job_id()}")

# 6. Retrieve results
result_legacy = job.result(qiskit_legacy=True, with_measurements=True)
counts_legacy = result_legacy.get_counts()
bitstring_legacy = result_legacy.get_memory()

result = job.result(with_measurements=True)
counts = result[0].data.meas.get_counts()
bitstrings = result[0].data.meas.get_bitstrings()

print("Legacy Execution Results:")
print("Counts:", counts_legacy)
print(f"Bitstring: {bitstring_legacy!s:.20s}")

print("Primitive Execution Results:")
print("Counts:", counts)
print(f"Bitstring: {bitstrings!s:.20s}")

How to Fetch Calibration Data

Use the client to retrieve a calibration set by its UUID. To retrieve the default calibration set, pass None instead.

from uuid import UUID
from qheappe_client.qprovider import QProvider

provider = QProvider("your_project_name")
calibration_set = provider.get_backend(
    lexis_resource="your_resource_name",
    calibration_set_id=UUID("3a83e2f3-c5a8-43b7-9aa1-e9738ca3204b")
).get_backend_info().calibration_set_id

Authors

License

Apache 2.0 — see LICENSE.

Metadata

Release files for qaas 1.0.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qaas 1.0.0a1
File Size Uploaded Provenance Actions
qaas-1.0.0a1.tar.gz 121.8 kB With provenance Details for qaas-1.0.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qaas 1.0.0a1
File Interpreter ABI Platform Actions
qaas-1.0.0a1-py3-none-any.whl Python 3 none any Details for qaas-1.0.0a1-py3-none-any.whl

Total release size: 251.2 kB

Release files / qaas-1.0.0a1.tar.gz

Download URL qaas-1.0.0a1.tar.gz
Size 121.8 kB
Tags Source
SHA-256 checksum
How to use checksums
02e17b6abe09d9912b6699c4c208de9994df4d321ffbcd8d0acb2ab8914b012a
BLAKE2b-256 checksum
How to use checksums
36fd2b43cb9bfab343b6bad1574a7d6add20a505376acfc0092f5f6d8374a25c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / qaas-1.0.0a1-py3-none-any.whl

Download URL qaas-1.0.0a1-py3-none-any.whl
Size 129.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab3e2cde97cc5185733f4068da70d4b0dc22765d440348d562bb1b7b9d3829c7
BLAKE2b-256 checksum
How to use checksums
8e2bf11cd9ea485a8136887cdb3d7362a89491e1ae76711dff70f77be688bb47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for qaas 1.0.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for qaas-1.0.0a1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page