samplomatic
Serving all of your circuit sampling needs since 2025.
What it is and what it does
Samplomatic is a library for generating randomized variants of quantum circuits with explicit, declarative intent. It works by annotating sections of a Qiskit quantum circuit with randomization instructions (like Twirl for Pauli twirling), then using a build process to generate a template circuit and a sampling engine (samplex) that encodes the randomization logic as a directed acyclic graph. The samplex can then produce many randomized circuit arguments without regenerating circuits, making it efficient for tasks like error mitigation through circuit randomization.
The library is designed for quantum researchers and engineers who need to systematically apply randomization patterns to circuits—whether for Pauli twirling, noise injection, or custom group-based transformations. It depends on qiskit, numpy, rustworkx, pybase64, and orjson. As a beta-stage project (version 0.20.0), it is actively maintained but subject to breaking changes between minor versions; the project may also relocate from its current GitHub home.
Use it for:
- Apply Pauli twirling to quantum circuits for error mitigation in near-term quantum processors.
- Generate multiple randomized circuit variants from a single template for statistical noise characterization.
- Inject sampling-based noise into quantum circuits to study robustness under realistic error models.
- Parametrize quantum circuits with randomization intent for transpiler-based circuit optimization.
- Extend circuit randomization with custom group-based transformations for specialized quantum protocols.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Samplomatic generates randomized variants of quantum circuits with declarative intent, supporting Pauli twirling and extensible noise injection patterns for quantum circuit sampling.
Yes, if you work with Qiskit and need systematic circuit randomization for error mitigation or noise studies. The low install friction, active maintenance, and permissive license make it a reasonable choice. However, expect breaking changes between minor versions (beta stage), so pin your dependency. No known security vulnerabilities as of 2026-08-14.
Install
samplomatic on PyPI
pip
pip install samplomaticuv
uv add samplomaticpoetry
poetry add samplomaticInstalling samplomatic
Before you install
Low friction install with a pure-Python wheel. Active maintenance as of 2026-08-12. Beta-stage library (version 0.20.0) with documented breaking changes between minor versions—pin dependencies accordingly. Requires Python ≥3.10.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install samplomatic
from samplomatic import build, Twirl
from qiskit.circuit import QuantumCircuit
circuit = QuantumCircuit(2)
with circuit.box([Twirl()]):
circuit.sx(0)
circuit.cx(0, 1)
template, samplex = build(circuit)
samples = samplex.sample({"parameter_values": []}, num_randomizations=5)
Requires Python ≥3.10 and qiskit runtime dependency; quantum circuit construction knowledge assumed.
Verify before relying
- Scope and maturity of the extensible randomization group system beyond Pauli twirling.
- Performance characteristics for large circuits or high-volume sampling.
- Whether visualization dependencies (samplomatic[vis]) are commonly needed.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — qiskit, numpy, rustworkx, pybase64, orjson |
| Maintenance | actively maintained — 52 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 306,696/month — #7,785 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: samplomatic-0.20.0-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
qiskitQiskit is an open-source SDK for building and…
permissive · top 5,000 on PyPI
stimStim is a fast simulator for quantum stabilizer…
permissive · top 15,000 on PyPI
qiskit-aerAer is a high-performance quantum circuit…
permissive · top 5,000 on PyPI
sinterSinter performs fast Monte Carlo sampling of…
permissive · top 15,000 on PyPI
quimbQuimb provides Python tools for quantum…
permissive · top 15,000 on PyPI
mqt.qcecVerifies whether two quantum circuits are…
permissive · top 15,000 on PyPI
qiskit-experimentsQiskit Experiments provides tools for building,…
permissive · top 15,000 on PyPI
qiskit-terraQiskit Terra provides the core SDK for building…
permissive · top 15,000 on PyPI
PyMatchingPyMatching is a fast Python/C++ library for…
permissive · top 15,000 on PyPI
pyvscPyVSC generates randomized test stimulus and…
permissive · top 15,000 on PyPI