Skip to main content

SDK to interact with managed services on the Kipu Quantum Hub.

Project description

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())

License

Apache-2.0 | Copyright 2026-now Kipu Quantum GmbH

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

qhub_service-1.4.0.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qhub_service-1.4.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file qhub_service-1.4.0.tar.gz.

File metadata

  • Download URL: qhub_service-1.4.0.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for qhub_service-1.4.0.tar.gz
Algorithm Hash digest
SHA256 fc6068aa2756551da610a9e536f0f875f1c6f98845cd33c13db1120de512b0b3
MD5 c8fb13e9fa8267c507c0d7cb91cff2a5
BLAKE2b-256 ab463f71505e741c0ccde2e06ec616b42c136d9d2ef67dc256c7eec4399d3907

See more details on using hashes here.

File details

Details for the file qhub_service-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: qhub_service-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for qhub_service-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a2cde3648f146c5dff584ad957ab45423ad625aaa808212cb4ee37dc8349512
MD5 2e2576ecf987329850822aea1e887f89
BLAKE2b-256 c41511d9dccc593193652bd6ee6d7b5b15fb0a2c3be8fc6933aa5b7bbcc58e64

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page