Skip to main content

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

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.2.3.tar.gz (10.5 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.2.3-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for qfaas-0.2.3.tar.gz
Algorithm Hash digest
SHA256 658d9874a2407522a2451a46a039fe001112ea0282b3cf272b66507c261360cb
MD5 44bec28c0573dabd463876b9eb1eefb5
BLAKE2b-256 f58556e1588e863d305701da638e1c4b4c1611ab88cead28c4be9df2d7941c7d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qfaas-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 12.3 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.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 53690141bc5abe8098067cbf789c8aa43005258950d1bdbd524602d3ccb55abd
MD5 e56e77ef9727cf09d6c0da924c1303de
BLAKE2b-256 ec162704393c9b6e006f7e091bed20df3cd153970e06bfb0b7a5436b67ff4041

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page