Archived
This project has been archived by its maintainers, and is no longer receiving any updates.
⚠️ DEPRECATED ⚠️
This package has been deprecated and is no longer maintained.
Please migrate to the new package:
- PyPI:
qhub-service- NPM:
@quantum-hub/qhub-serviceInstall the new package:
pip install qhub-service # or npm install @quantum-hub/qhub-service
PLANQK Service SDK
Installation
The package is published on PyPI and can be installed via pip:
pip install --upgrade planqk-service-sdk
Usage
import os
from planqk.service.client import PlanqkServiceClient
service_endpoint = "..."
access_key_id = "..."
secret_access_key = "..."
# Create a new PlanqkServiceClient instance
client = PlanqkServiceClient(service_endpoint, access_key_id, secret_access_key)
# Prepare your input data and parameters
data = {"values": [2]}
params = {"shots": 100}
# Start a new service execution
service_execution = client.run(request={"data": data, "params": params})
# 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())
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
planqk_service_sdk-2.12.1.tar.gz
(39.4 kB
view details)
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 planqk_service_sdk-2.12.1.tar.gz.
File metadata
- Download URL: planqk_service_sdk-2.12.1.tar.gz
- Upload date:
- Size: 39.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02daea60128451627b9d5bcd635c9428487a3fcbb1fb696351bfcf93cd3c415b
|
|
| MD5 |
715258abc2e612d6cb65c7d1ef04b484
|
|
| BLAKE2b-256 |
49e869ba957752073dec3c913d16f330c3be712ef0b2f5c1a1b929653942981d
|
File details
Details for the file planqk_service_sdk-2.12.1-py3-none-any.whl.
File metadata
- Download URL: planqk_service_sdk-2.12.1-py3-none-any.whl
- Upload date:
- Size: 52.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62d1f5fc083fb6dce18d2d79869d61f3da3e62e6675965b01d462bebe0f6c735
|
|
| MD5 |
c51367cba660ef89d1a487dad6f71837
|
|
| BLAKE2b-256 |
d1843f4c05d87ec2e54463aedd2d53b99252c9116915297ff5666ae2328582ae
|