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.2.tar.gz
(12.0 kB
view details)
Built Distribution
File details
Details for the file quantum_serverless-0.0.2.tar.gz
.
File metadata
- Download URL: quantum_serverless-0.0.2.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6491bd04b8a059ae717d3d792e251f0cf1864b5961e50981fcaa72d2271b232b |
|
MD5 | 977008d63cfc587da927a67de15208b7 |
|
BLAKE2b-256 | 2472511b1a8eeb789b577c8412dc9d3765e56f17f9867cbbf55dfce82da220fe |
File details
Details for the file quantum_serverless-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: quantum_serverless-0.0.2-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84b47f770ccbe453c4e388b32e54ed7e7553dc774b4c50a4482f7e275f7ae87c |
|
MD5 | 7009bad596ab679525a694da5de0ada6 |
|
BLAKE2b-256 | ab769fe90778f5631cb08aa72ffd0fed62b9487aaf712911b4c2be9565ae2dec |