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.0.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.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastqsim-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 6f43af1e74a69a4131bd5494d8be0ec94326762e31c4423e21950d1744ee2ec2
MD5 aef86b4d33b5fdf2594d63b4fa522341
BLAKE2b-256 59f06d6da12addfb90bd063a88094161b0e2a77fc25e644975e0f2312a199d44

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastqsim-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: fastqsim-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0cbba1ba9e54ffc6df34f592fcb488c93088f3d42aacf7198228b966133d3543
MD5 f65afe96cba7b0c25cd4913c4b59207b
BLAKE2b-256 46581bf91f7729e4d087c7116aa025ac0d177166495f67222c3d7838957dc85a

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastqsim-0.1.0-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