Quantum-as-a-Service utilizing IQMProvider, IQMBackend, IQMJob and HEAppE. Developed by IT4Innovations.
Project description
Access IQM quantum hardware through the LEXIS platform via HEAppE.
Documentation: https://it4innovations.github.io/quantum-as-a-service/
Requirements
Python 3.11+
required Python packages: see dependencies in pyproject.toml
Quick start
QaaS is available on PyPI, so you can install it easily using pip.
pip install qaas
Alternatively, you can install the latest (development) version using:
pip install git+https://github.com/It4innovations/quantum-as-a-service.git@main
Example usage:
from py4lexis.session import LexisSession
from qaas import QProvider
from qiskit import QuantumCircuit
token = LexisSession().get_access_token()
backend = QProvider(token, "my_project").get_backend("EQE1-CZ-P0001")
qc = QuantumCircuit(2, 2)
qc.h(0); qc.cx(0, 1); qc.measure_all()
counts = backend.run(backend.transpile(qc), shots=1000).result().get_counts()
print(counts)
Also OpenQASM is supported on input:
from qiskit.qasm3 import dumps as qasm3dumps
qc = QuantumCircuit(2, 2)
qc.h(0); qc.cx(0, 1); qc.measure_all()
qasm_transpiled_qc:str = qasm3dumps(backend.transpile(qc))
counts = backend.run([qasm_transpiled_qc], shots=1000).result().get_counts()
print(counts)
IQM Pulla
from qiskit import QuantumCircuit, visualization
from qiskit.compiler import transpile
from iqm.qiskit_iqm.iqm_transpilation import optimize_single_qubit_gates
from iqm.pulla.utils_qiskit import sweep_job_to_qiskit
from qaas.client import QProvider, QBackend
from qaas.client.qpulla import qiskit_to_pulla, QPullaBackendIQM
provider = QProvider(lexis_access_token, "my_project")
client = provider.get_client(lexis_resource_name)
dqa = client.get_dynamic_architecture()
compiler = p.get_standard_compiler()
# Create Pulla instance
p = provider.get_pulla(lexis_resource_name)
pulla_backend: QPullaBackendIQM = QPullaBackendIQM(dqa,p,compiler)
qc_transpiled = backend.transpile(
qc,
layout_method='sabre',
optimization_level=0
)
# Optimize single-qubit gates
qc_optimized = optimize_single_qubit_gates(qc_transpiled)
circuits, compiler = qiskit_to_pulla(p, pulla_backend, [qc_optimized])
playlist, context = compiler.compile(circuits[0])
# Build settings for execution
settings, context = compiler.build_settings(context, shots=100)
# Submit playlist returns SweepJob
job = p.submit_playlist(playlist, settings, context=context)
job.wait_for_completion()
# Get raw results
raw_results = job.result()
# Convert to Qiskit result format
qiskit_result = sweep_job_to_qiskit(
job,
shots=100,
execution_options=context['options']
)
# Qiskit Counts
counts = qiskit_result.get_counts()
License
Apache 2.0 — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qaas-0.3.2.tar.gz.
File metadata
- Download URL: qaas-0.3.2.tar.gz
- Upload date:
- Size: 61.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8342bb9264543b6853862edab91e54e43535d19fe224779070658d8546178576
|
|
| MD5 |
f95cc03b438625582ad326f81785b5a3
|
|
| BLAKE2b-256 |
5c876afdb39034e7a1c049e5dbaffb5cc55f9be32ed1b51d131de47f5e514eab
|
Provenance
The following attestation bundles were made for qaas-0.3.2.tar.gz:
Publisher:
build.yml on It4innovations/quantum-as-a-service
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qaas-0.3.2.tar.gz -
Subject digest:
8342bb9264543b6853862edab91e54e43535d19fe224779070658d8546178576 - Sigstore transparency entry: 1848977855
- Sigstore integration time:
-
Permalink:
It4innovations/quantum-as-a-service@ba1d89ca15ee26f643156b46f299b54c9b1805f7 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/It4innovations
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@ba1d89ca15ee26f643156b46f299b54c9b1805f7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file qaas-0.3.2-py3-none-any.whl.
File metadata
- Download URL: qaas-0.3.2-py3-none-any.whl
- Upload date:
- Size: 67.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff846de15bd4643ee0ef75cfc831969a4a1dc73bf04882683db75408a9a9cb7c
|
|
| MD5 |
56b5052c27a512acdb41a8d9bf3f6536
|
|
| BLAKE2b-256 |
9a91b3b0cef98c2805d27bfe89d2d457973d4b43c9d74e45ca78eeacbe459a49
|
Provenance
The following attestation bundles were made for qaas-0.3.2-py3-none-any.whl:
Publisher:
build.yml on It4innovations/quantum-as-a-service
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qaas-0.3.2-py3-none-any.whl -
Subject digest:
ff846de15bd4643ee0ef75cfc831969a4a1dc73bf04882683db75408a9a9cb7c - Sigstore transparency entry: 1848978927
- Sigstore integration time:
-
Permalink:
It4innovations/quantum-as-a-service@ba1d89ca15ee26f643156b46f299b54c9b1805f7 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/It4innovations
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@ba1d89ca15ee26f643156b46f299b54c9b1805f7 -
Trigger Event:
push
-
Statement type: