Skip to main content

PRISM-Q (Python)

Python bindings for PRISM-Q, a performance-first quantum circuit simulator written in Rust.

Install

pip install prism-q

Quick start

import prism_q

# Build a Bell state and run it.
circuit = prism_q.CircuitBuilder(2).h(0).cx(0, 1).build()
outcome = prism_q.simulate(circuit).seed(42).run()
print(outcome.probabilities)        # array([0.5, 0., 0., 0.5])

# Parse OpenQASM and sample shots.
qasm = """
OPENQASM 3.0;
qubit[2] q;
bit[2] c;
h q[0];
cx q[0], q[1];
c = measure q;
"""
result = prism_q.simulate(prism_q.parse_qasm(qasm)).seed(7).shots(1000)
print(result.counts())              # {'00': ~500, '11': ~500}

# Exact statevector as a NumPy array.
sv = prism_q.simulate(prism_q.circuits.ghz(3)).seed(1).state_vector()
print(sv.dtype, sv.shape)           # complex128 (8,)

Bit ordering

Count keys and measurement bit indices are LSB-first: in a bitstring key, the leftmost character is classical bit 0, and q[0] is the least-significant qubit. This is reversed relative to Qiskit. For example, the state where only q[0] is set reads as "10...", not "...01".

Features

  • Fluent CircuitBuilder and OpenQASM 3.0 parsing.
  • Reusable circuit generators (prism_q.circuits): QFT, GHZ, QAOA, hardware-efficient ansatz, quantum volume, and more.
  • Backend selection via BackendKind (statevector, stabilizer, sparse, MPS, Pauli propagation, ...).
  • Parameter sweeps without a rebuild (Parameters, PreparedCircuit) plus adjoint gradients.
  • Noise models (NoiseModel, NoiseChannel) for shot sampling.
  • Native QEC programs (QecProgram) with detector and observable sampling.
  • NumPy output for probabilities, statevectors, and QEC bit matrices.

License

MIT OR Apache-2.0

Metadata

Release files for prism-q 0.34.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prism-q 0.34.0
File Size Uploaded
prism_q-0.34.0.tar.gz 2.6 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for prism-q 0.34.0
File
prism_q-0.34.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
prism_q-0.34.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details
prism_q-0.34.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details
prism_q-0.34.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details

Total release size: 14.3 MB

Release files / prism_q-0.34.0.tar.gz

Download URL prism_q-0.34.0.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
dd0e693a6705cda5c397fb55e3969738ea4ec4ca69d869bac8e25ac7bdb6e2e6
BLAKE2b-256 checksum
How to use checksums
487686f3c4d43f1f6946afdee1ba88c80eb7503d3cfff72f7151a4d12ae13d95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / prism_q-0.34.0-cp311-abi3-win_amd64.whl

Download URL prism_q-0.34.0-cp311-abi3-win_amd64.whl
Size 3.3 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
c1ea150c9368e91184cf3e9bb8dc5087afb485bf36c6cd8137669646c1fff398
BLAKE2b-256 checksum
How to use checksums
2d4ef0a8b5de8cca7ec226311fe47a1d559b64043ce3019f355d87ab8fd548a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / prism_q-0.34.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL prism_q-0.34.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.2 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
1bde15fd4889c7fb7e7c0ae00ce97890def93c73da214a0ba36e3c08334f00d2
BLAKE2b-256 checksum
How to use checksums
0657aca2863336130cd831fd8b38c67f255dae68028ddf2dfd7b10da6a31b62f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / prism_q-0.34.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL prism_q-0.34.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.6 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
2d7026ca05aea84a9456af349dd30c7a6d133b838bfae4d6122969ec1cdbd63c
BLAKE2b-256 checksum
How to use checksums
bf4299d99a561255807396ba71aacdef61710a140ea3485a7f3a5c1506544a53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / prism_q-0.34.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL prism_q-0.34.0-cp311-abi3-macosx_11_0_arm64.whl
Size 2.5 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9b7794d555ca3c28633d86409760f042ef57a6e953ed6f737cb070c49e2b7891
BLAKE2b-256 checksum
How to use checksums
1c7cc3dc8a0200d2c2f9aa8692309cb01898b9753ba539226811bf70f1d32b2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

0.35.0

5 release files

This release

0.34.0 This release

5 release files

0.33.0

4 release files

0.32.0

4 release files

0.30.0

4 release files

0.29.0

4 release files

0.27.0

4 release files

0.26.0

4 release files

0.25.0

4 release files

0.24.0

4 release files

0.23.0

4 release files

0.22.1

4 release files

0.22.0

4 release files

0.21.1

4 release 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