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
CircuitBuilderand 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
Release files for prism-q 0.33.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| prism_q-0.33.0.tar.gz | 2.4 MB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prism_q-0.33.0-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details |
| prism_q-0.33.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.33.0-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 10.9 MB
Release files / prism_q-0.33.0.tar.gz
| Download URL | prism_q-0.33.0.tar.gz |
|---|---|
| Size | 2.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9fd39b757e57303d634607281d1ce0625fb8fb5ea0d7477497f0e32f5b475737
|
|
BLAKE2b-256 checksum How to use checksums |
bdb31e4c35b57fc9f6d131ef8d181cf1d84f4531b15d7181c82ca9ad8adee764
|
| 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 Sep 24, 2026.
Transparency logRelease files / prism_q-0.33.0-cp311-abi3-win_amd64.whl
| Download URL | prism_q-0.33.0-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
4274b0fbaf20933a442bdba89640ab69efb39c6437dbab8e612a1eabde685caf
|
|
BLAKE2b-256 checksum How to use checksums |
0b403281585cf977937b7c2e835ec3353be7d3cb5e6bf877be4018b90f71246b
|
| 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 Sep 24, 2026.
Transparency logRelease files / prism_q-0.33.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | prism_q-0.33.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
ad07b235afdd626a5f9e682dc4d894cf85de018b00fa33b88508f8bebac4017c
|
|
BLAKE2b-256 checksum How to use checksums |
85ac191e021b57675c31b311a54f3074c13cd315e1bdc4f86b396b20457c13cf
|
| 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 Sep 24, 2026.
Transparency logRelease files / prism_q-0.33.0-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | prism_q-0.33.0-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f9555ced645e84a5ca612b0ae84b6f0ef6a14da20d926d88217ae1d6e6fdfd20
|
|
BLAKE2b-256 checksum How to use checksums |
ed09dd407c523d5973409d3afdc23e7730c52bb497fa35b4ac3a3fc424aa087a
|
| 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 Sep 24, 2026.
Transparency log