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 details)
Built Distribution
File details
Details for the file quantum_serverless-0.0.1.tar.gz
.
File metadata
- Download URL: quantum_serverless-0.0.1.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1ac94be085110119495399375b74687352084aa6feaeb49b7992bd9c6c36369 |
|
MD5 | 1ca20d798126a73f7292e1876ed530a1 |
|
BLAKE2b-256 | 47f1fe3c9fedbb6e40e3a30d84c1053cf6835fef4895aa17755b398f677f590d |
File details
Details for the file quantum_serverless-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: quantum_serverless-0.0.1-py3-none-any.whl
- Upload date:
- Size: 20.1 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 | 3622f44fe4209d63bedffe158c1a2a7b3b011323abfa055bf8648bd7300be6c5 |
|
MD5 | 9fe2899cf7c4d29cf743a3cf875b0b13 |
|
BLAKE2b-256 | 5fb0a1a5c16f6f0ffb00152283565a37723246f4edc996df498f5b5b2490bf10 |