Skip to main content

mimiq-exaqt (python wrapper, rust core)

Python bindings for exaqt-rs — a SIMD-accelerated state-vector quantum simulator. The distribution is mimiq-exaqt and the import package is exaqt; the native module is exaqt._core, whose public types are re-exported on the top-level package.

Install (release wheel)

Wheels are published to PyPI on each v* tag — one abi3 wheel per platform (Linux x86_64, macOS arm64, Windows x86_64), covering Python 3.10 and every later version:

pip install mimiq-exaqt

The wheel bundles the documentation. Read it offline, without a network round trip, with:

exaqt docs                  # open the bundled site in a browser
exaqt docs --print-path     # or just print where it lives

Install (development checkout)

From this repository, with maturin and uv available (the Nix devshell provides both):

cd exaqt-python
uv venv && uv pip install "mimiqcircuits>=0.28.0" pytest numpy
.venv/bin/maturin develop --release
.venv/bin/python -m pytest -q tests/

A maturin develop build does not build the docs, so exaqt docs has nothing to open. To produce the wheel exactly as CI publishes it — documentation included — run python scripts/build_wheel.py instead.

Quick example

import numpy as np
from exaqt import ExaqtSV, Rng

sv = ExaqtSV.zero(3)
sv.apply_h(0)
sv.apply_cx(0, 1)
sv.apply_cx(0, 2)
print(sv.amplitudes())          # numpy complex128 array, length 2**3

# Multi-qubit Pauli expectation (no need to build a 2^k × 2^k matrix).
print(sv.expectation_pauli("XXX", [0, 1, 2]))   # +1 for the GHZ state

# Sampling.
r = Rng(seed=42)
shots = sv.sample(r, nsamples=1000)             # shape (1000, 3) uint8

mimiqcircuits integration

import mimiqcircuits as mc
from exaqt import ExaqtQCS

c = mc.Circuit()
c.push(mc.GateH(), 0)
c.push(mc.GateCX(), 0, 1)

sim = ExaqtQCS()
result = sim.execute(c, nsamples=1000)   # returns a mimiqcircuits.QCSResults
print(result)

Conventions

  • Qubit ordering. Qubit 0 is the least-significant bit of the basis-state index (matches Qiskit and MimiqCircuitsBase).
  • 2-qubit gate basis. For apply_gate_2q(M, q1, q2), q1 is the most significant bit of the gate's local 2×2-bit basis. See the Rust crate's docs for the precise layout.
  • Cross-language reproducibility. The same Rng(seed) produces the same Xoshiro256++ stream in the Rust core, the Python wrapper, and the Julia wrapper.

Errors

The wrapper raises Python exception subclasses of ExaqtError:

  • GateShapeError — gate matrix has the wrong shape or layout.
  • QubitIndexError — qubit index out of bounds, or duplicate qubits.
  • DegenerateStateError — sampling a state with zero / non-finite norm.
  • NonUnitaryError — only raised when the Rust crate is built with the unitary-checks feature; flags a non-unitary user matrix.

MemoryError is raised for state-vector allocations that won't fit (e.g. ExaqtSV.zero(40)) — instead of aborting the process.

Metadata

Release files for mimiq-exaqt 0.4.0

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

Built distributions (wheels)

Table of built distributions (wheels) for mimiq-exaqt 0.4.0
File Actions
mimiq_exaqt-0.4.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for mimiq_exaqt-0.4.0-cp310-abi3-win_amd64.whl
mimiq_exaqt-0.4.0-cp310-abi3-manylinux_2_34_x86_64.whl CPython 3.10 abi3 Linux glibc 2.34+ x86-64 Details for mimiq_exaqt-0.4.0-cp310-abi3-manylinux_2_34_x86_64.whl
mimiq_exaqt-0.4.0-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details for mimiq_exaqt-0.4.0-cp310-abi3-manylinux_2_28_x86_64.whl
mimiq_exaqt-0.4.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for mimiq_exaqt-0.4.0-cp310-abi3-macosx_11_0_arm64.whl

Total release size: 5.7 MB

Release files / mimiq_exaqt-0.4.0-cp310-abi3-win_amd64.whl

Download URL mimiq_exaqt-0.4.0-cp310-abi3-win_amd64.whl
Size 1.5 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
22893d086b7eca5095cf5fb3dc9fa8b35bd147bd93e6bd9cb6411ba3498e3bf4
BLAKE2b-256 checksum
How to use checksums
237e7d4b198e9b34d1bf5e4d80fc3f9d0ee0a392d6cffee2a74410651abbe539
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / mimiq_exaqt-0.4.0-cp310-abi3-manylinux_2_34_x86_64.whl

Download URL mimiq_exaqt-0.4.0-cp310-abi3-manylinux_2_34_x86_64.whl
Size 910.9 kB
Tags CPython 3.10 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
b3879a0b6758fd29c75c7a38ea6d72256e9ea98333d7199540896a4fb7948816
BLAKE2b-256 checksum
How to use checksums
6423b2f4f2a5f2c5ece7e2dafe19b40c33e928c1b90687c029f99bb858456e2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / mimiq_exaqt-0.4.0-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL mimiq_exaqt-0.4.0-cp310-abi3-manylinux_2_28_x86_64.whl
Size 1.7 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
e93a3447834f520d52b45612641e07b4a9664544d667c111df3926362d8e7378
BLAKE2b-256 checksum
How to use checksums
115fa87d3ce2824ae2f88a6945536d355508bb03b5d7b270d069be48a03a566d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / mimiq_exaqt-0.4.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL mimiq_exaqt-0.4.0-cp310-abi3-macosx_11_0_arm64.whl
Size 1.6 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e5c41c1e25cad0f46bb20f6a902db0e70630ff4ebd123b49801005f000134b0a
BLAKE2b-256 checksum
How to use checksums
7fe3176c52c51e4c0a5a2cf81c972efebc35a919c381c4184b17846209fbfb31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for mimiq-exaqt 0.4.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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