PlanQK Service SDK
Installation
The package is published on PyPI and can be installed via pip
:
pip install --upgrade planqk-service-sdk
Usage
from planqk.service.client import PlanqkServiceClient
consumer_key = "..."
consumer_secret = "..."
service_endpoint = "..."
client = PlanqkServiceClient(service_endpoint, consumer_key, consumer_secret)
data = {"input": {"a": 1, "b": 2}}
params = {"param1": "value1", "param2": "value2"}
job = client.start_execution(data=data, params=params)
print(job.id, job.status)
job.cancel()
result = job.result()
interim_results = job.interim_results()
Development
To create a new Conda environment, run:
conda env create -f environment.yml
Then, to activate the environment:
conda activate planqk-service-sdk
To install the package in development mode, run:
pip install -e .