Skip to main content

SDK to interact with PLANQK Managed Services.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

⚠️ DEPRECATED ⚠️

This package has been deprecated and is no longer maintained.

Please migrate to the new package:

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

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

planqk_service_sdk-2.12.1.tar.gz (39.4 kB view details)

Uploaded Source

Built Distribution

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

planqk_service_sdk-2.12.1-py3-none-any.whl (52.4 kB view details)

Uploaded Python 3

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

Hashes for planqk_service_sdk-2.12.1.tar.gz
Algorithm Hash digest
SHA256 02daea60128451627b9d5bcd635c9428487a3fcbb1fb696351bfcf93cd3c415b
MD5 715258abc2e612d6cb65c7d1ef04b484
BLAKE2b-256 49e869ba957752073dec3c913d16f330c3be712ef0b2f5c1a1b929653942981d

See more details on using hashes here.

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

Hashes for planqk_service_sdk-2.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 62d1f5fc083fb6dce18d2d79869d61f3da3e62e6675965b01d462bebe0f6c735
MD5 c51367cba660ef89d1a487dad6f71837
BLAKE2b-256 d1843f4c05d87ec2e54463aedd2d53b99252c9116915297ff5666ae2328582ae

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