Skip to main content

FastQSim SDK — submit and manage quantum simulation jobs via OpenQASM 3.0

Project description

fastqsim

FastQSim SDK — submit and manage quantum simulation jobs on the FastQubit platform using OpenQASM 3.0.

Installation

pip install fastqsim

Quick Start

import fastqsim

# Initialise with your pod token (starts with fqp_)
fastqsim.init("fqp_your_pod_token_here")

from fastqsim import FastQSimClient, RunArgs, SimulationType

client = FastQSimClient()

qasm = """
OPENQASM 3.0;
qubit[2] q;
h q[0];
cx q[0], q[1];
measure q;
"""

# Submit a job
job = client.run(RunArgs(
    qasm_input=qasm,
    shots=1024,
    simulation_type=SimulationType.STATEVECTOR,
))

# Poll until done, then fetch result
result = client.get_result(job.id)
print(result.counts)   # e.g. {'00': 512, '11': 512}

Simulation Types

Type Description
statevector Full state-vector (default)
density_matrix Noisy / open-system simulation
mps Matrix Product State (low-entanglement)
chp Clifford / stabilizer (Clifford gates only)

API

from fastqsim import (
    init, reset,              # module-level helpers
    FastQSimClient,           # main client class
    Job, Result, Session,     # data types
    JobStatus, SimulationType, RunArgs,
    # exceptions:
    FastQSimError, AuthenticationError, JobFailedError,
    JobTimeoutError, ValidationError, QuotaExceededError,
    # ... (15 exception types total)
)

FastQSimClient methods

Method Description
client.run(args) Submit a job, returns Job
client.get_result(job_id) Fetch result (polls until complete)
client.cancel(job_id) Cancel a queued/running job
client.get_session() Get current session info

Requirements

  • Python >= 3.8
  • requests >= 2.28

Documentation

Full docs at https://aneeq-ahmed-malik.github.io/QSim/

License

MIT

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

fastqsim-0.1.1.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

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

fastqsim-0.1.1-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastqsim-0.1.1.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fastqsim-0.1.1.tar.gz
Algorithm Hash digest
SHA256 88b1063522e00baece8f555a573170b906d302bd0d5d83b7b94d884766e6ea4e
MD5 6978035dc173dee4a40ad0d9b3e9b901
BLAKE2b-256 ab5ab5578b034c56f5dd9ca811b113811a2470c1a9d36b56d5cbbb68ed2c50ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastqsim-0.1.1.tar.gz:

Publisher: publish-fastqsim.yml on Aneeq-Ahmed-Malik/QSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: fastqsim-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fastqsim-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 31e419213ddafa565ecb0bc9e9e35a5839811dc7b8cb1db4d8e92a936a7f33cd
MD5 2a864547cd8efd850f34327aadc01e8b
BLAKE2b-256 3924382c35094e3c265127a6d1d3de8debecac1aee25ea481b803bf8262046dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastqsim-0.1.1-py3-none-any.whl:

Publisher: publish-fastqsim.yml on Aneeq-Ahmed-Malik/QSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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