Skip to main content
Pre-release

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.1rc4

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

Source distribution (sdist)

Source distribution for qhub-service 2.0.1rc4
File Size Uploaded Provenance Actions
qhub_service-2.0.1rc4.tar.gz 54.8 kB Without provenance Details for qhub_service-2.0.1rc4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qhub-service 2.0.1rc4
File Interpreter ABI Platform Actions
qhub_service-2.0.1rc4-py3-none-any.whl Python 3 none any Details for qhub_service-2.0.1rc4-py3-none-any.whl

Total release size: 70.0 kB

Release files / qhub_service-2.0.1rc4.tar.gz

Download URL qhub_service-2.0.1rc4.tar.gz
Size 54.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ce6b9967ba15edae5ff91545f6d75c26df0ce138e58d0cde6a6cabfccc2d1ef4
BLAKE2b-256 checksum
How to use checksums
d89e2d729ef94ee45ef2a7185d50d8331787cfca175f4e24c4c0cf6282e3f26f
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.1rc4-py3-none-any.whl

Download URL qhub_service-2.0.1rc4-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8bc6074950f22335920fdf6ba9f8ed1fffb721ee1f6636c30160dbbdeb05473a
BLAKE2b-256 checksum
How to use checksums
14a4b37279e8bbf036de5275136cb07ae16dba0d085fa7833e0306f529ecd207
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.1rc4

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.

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

Release history Release notifications | RSS feed

This release
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