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 PlanqkServiceClient 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.0.2.tar.gz (14.4 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.0.2-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qhub_service-1.0.2.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for qhub_service-1.0.2.tar.gz
Algorithm Hash digest
SHA256 1d2914ecd3ae478ff7bd91189cf8664e26ab380d90c58fa0d54b9865d0189d9c
MD5 2ac87e8bb385644cfeef3cc8a2a5cd67
BLAKE2b-256 f7f4e92e31b4b8eecf56f46fa4cd3268d9d36c16a0c6723b731a455f67648015

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qhub_service-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for qhub_service-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f2173d8f2d8c7684b8b7cbdefa6dd7fa7b4afdde717ac25f023f1b982ad0dcbc
MD5 ed8b9e904dfa047cbabccf3934296aa1
BLAKE2b-256 1205f0dbf56fc507119651203ea4a007f5f1678d2e40b853dbe025f2270b9c5f

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