Skip to main content

QHEAppE — Quantum-as-a-Service through HEAppE

PyPI version Python versions 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, also for pulse-level access (Pulla). qaas[iqm35_qiskit] (iqm-client 35.x) is only needed for 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}")

job.result() returns a Qiskit PrimitiveResult by default, or a legacy Result with qiskit_legacy=True. The difference is explained in PrimitiveResult vs. legacy Result.

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

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.0
File Size Uploaded Provenance Actions
qaas-1.0.0.tar.gz 128.4 kB With provenance Details for qaas-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 269.9 kB

Release files / qaas-1.0.0.tar.gz

Download URL qaas-1.0.0.tar.gz
Size 128.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d8ece55edb192b08def06f55953fd364abfe776a93c2eb10fb0967e54183e1b0
BLAKE2b-256 checksum
How to use checksums
3c3d617a9b2934299254d7b50ad75c0e7a8d3ca44e9f376c5cf7fed54a3cd5ff
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 6, 2026.

Transparency log

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

Download URL qaas-1.0.0-py3-none-any.whl
Size 141.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0bcb58c0496c1fd9cf95dcc87dcca2cdcaf0454b4d68274b7449610359cccc53
BLAKE2b-256 checksum
How to use checksums
1fd63162f0d258f3c74d420e2f2af2ef297a9c52146cccc263c56aa4c5ca6294
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 6, 2026.

Transparency log

Security for qaas 1.0.0

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.0.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 6, 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