This release is a pre-release and may not be stable for production use.
Kipu Quantum Hub Service SDK
Installation
The package is published on PyPI and can be installed via pip:
pip install --upgrade qhub-service
Usage
import os
from qhub.service.client import HubServiceClient
service_endpoint = "..."
access_key_id = "..."
secret_access_key = "..."
# Create a new HubServiceClient instance
client = HubServiceClient(service_endpoint, access_key_id, secret_access_key)
# Start a new service execution
service_execution = client.run(request={"values": [2], "shots": 100})
# Wait for the service execution to finish (blocking)
service_execution.wait_for_final_state()
status = service_execution.status
ended_at = service_execution.ended_at
print(f"Service execution finished at '{ended_at}' with status '{status}'")
# Use the client to retrieve a service execution by its ID
service_execution = client.get_service_execution("0030737b-35cb-46a8-88c2-f59d4885484d")
# Get the results of the service execution
result = service_execution.result()
# Get the logs of the service execution
logs = service_execution.logs()
# List the result files
files = service_execution.result_files()
# Download a result file
service_execution.download_result_file(files[0], os.getcwd())
Data Pool Access Grants
Service executions that read from or write to data pools require a short-lived JWT grant. The client can acquire these grants automatically by calling the Hub Platform API on your behalf.
Credentials and the active organization are resolved via the standard DefaultCredentialsProvider and ContextResolver.
If you are already logged in through the qhubctl CLI, no parameters need to be supplied (the HubServiceClient constructs its HubPlatformClient automatically):
from qhub.service.client import HubServiceClient
from qhub.service.datapool import DataPoolGrant, DataPoolPermission
client = HubServiceClient(service_endpoint, access_key_id, secret_access_key)
To override the resolved credentials or organization, pass an explicit HubPlatformClient:
from qhub.service.client import HubServiceClient, HubPlatformClient
from qhub.service.datapool import DataPoolGrant, DataPoolPermission
platform_client = HubPlatformClient(api_key="...", organization_id="...")
client = HubServiceClient(service_endpoint, access_key_id, secret_access_key, platform_client=platform_client)
grants = [
DataPoolGrant(
name="input_data",
datapool_id="dp-abc123",
application_id="app-xyz789",
permission=DataPoolPermission.VIEW,
),
DataPoolGrant(
name="output_data",
datapool_id="dp-def456",
application_id="app-xyz789",
permission=DataPoolPermission.MODIFY,
),
]
service_execution = client.run(request={"shots": 100}, grants=grants)
For each grant, the client injects a DataPoolReference (with the issued JWT) into the request under the supplied name.
Grants are cached per (datapool_id, application_id, permission) until shortly before the JWT expires.
License
Apache-2.0 | Copyright 2026-now Kipu Quantum GmbH
Metadata
Release files for qhub-service 2.0.1rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| qhub_service-2.0.1rc1.tar.gz | 50.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qhub_service-2.0.1rc1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 65.6 kB
Release files / qhub_service-2.0.1rc1.tar.gz
| Download URL | qhub_service-2.0.1rc1.tar.gz |
|---|---|
| Size | 50.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53dc1268e24578a45ffae01b32c1c99325899a441f74e8efbc5fb195bbf4e422
|
|
BLAKE2b-256 checksum How to use checksums |
3df51c492b19c2bd589da1e3f3c2aed7aad807ea9e03576cdd77e0d6c0b9696f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / qhub_service-2.0.1rc1-py3-none-any.whl
| Download URL | qhub_service-2.0.1rc1-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d55ba6cb8d1ce2b3f8326d7732dcfe46bf33474b813767dfe6a10e70992039d3
|
|
BLAKE2b-256 checksum How to use checksums |
94be440d4ccd794d7d3feda1a86b5971ded31226195119b3456d6ad3f70a68f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for qhub-service 2.0.1rc1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.