Skip to main content

QFaaS Library supporting QFaaS Serverless framework for Quantum Computing

Project description

qfaas-lib

qfaas-lib is a supporting library for QFaaS Serverless framework for Quantum Computing.

Installation

Install qfaas-lib with pip (Python >=3.10)

  pip install qfaas

Usage/Examples

from qfaas import Backend, RequestData, Utils

# Define sdk name
sdk = "braket"

# Pre-processing input data
def pre_process(input):
    data = RequestData(input, sdk)
    return data

# Post-processing output data
def post_process(job):
    output = Utils.counts_post_process(job)
    return output


def handle(event, context):
    # 1. Pre-processing
    requestData = pre_process(event)

    # 2. Generate Quantum Circuit
    qc = generate_circuit(requestData.input)

    # 3. Verify and get Backend information
    backend = Backend(requestData, qc)

    # 4. Submit job and wait up to 1 min for job to complete.
    job = backend.submit_job(qc)

    # 5. Post-process
    if job.jobResult:
        job = post_process(job)
    response = Utils.generate_response(job)

    # 6. Send back the result
    return response

Authors

Documentation

TBA

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

qfaas-0.1.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

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

qfaas-0.1.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file qfaas-0.1.1.tar.gz.

File metadata

  • Download URL: qfaas-0.1.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for qfaas-0.1.1.tar.gz
Algorithm Hash digest
SHA256 38ad07cdf649881ad140c4ca5c1905a5d023e16dbe5a505ebde76fe0b7fcc715
MD5 fdf1beee3f0a5effae73f714dcdc6b14
BLAKE2b-256 c77f13d5e6d7b246916b01c8eaf02f4f46f9fa1efdda1b60d47b11e54c770cc9

See more details on using hashes here.

File details

Details for the file qfaas-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: qfaas-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for qfaas-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a2637397b0a02018ffd33b0d32c8f819dd9ab4374aa2b851fd8fed7b6ecd32fd
MD5 7f118c071505268824348aaa162221f3
BLAKE2b-256 50902a4cfd7999b45339d600b35e94e5f9ce1b7aca0dff51dffa78beb38ddeb8

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