No project description provided
Project description
Quantum Serverless client
Client part of quantum serverless project. Installable python library to communicate with provisioned infrastructure.
Table of Contents
Installation
pip install quantum_serverless
or local installation from source
pip install -e .
Usage
from quantum_serverless import QuantumServerless, run_qiskit_remote, get
# 1. let's annotate out function to convert it
# to function that can be executed remotely
# using `run_qiskit_remote` decorator
@run_qiskit_remote()
def my_qiskit_function():
# Doing compute things here!
return "Computed result"
# 2. Next let's create out serverless object to control
# where our remote function will be executed
serverless = QuantumServerless()
# 3. create serverless context
with serverless: # or serverless.provider("<NAME_OF_AVAILABLE_PROVIDER>")
# 4. run our function and get back reference to it
# as now our function it remote one
function_reference = my_qiskit_function()
# 4.1 or we can run N of them in parallel
N = 4
function_references = [my_qiskit_function() for _ in range(N)]
# 5. to get results back from reference
# we need to call `get` on function reference
print(get(function_reference))
print(get(function_references))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
quantum_serverless-0.0.1.tar.gz
(11.9 kB
view hashes)
Built Distribution
Close
Hashes for quantum_serverless-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3622f44fe4209d63bedffe158c1a2a7b3b011323abfa055bf8648bd7300be6c5 |
|
MD5 | 9fe2899cf7c4d29cf743a3cf875b0b13 |
|
BLAKE2b-256 | 5fb0a1a5c16f6f0ffb00152283565a37723246f4edc996df498f5b5b2490bf10 |