sinter
Samples stim circuits and decodes them using pymatching.
What it is and what it does
Sinter is a Python library and command-line tool for sampling quantum error correction circuits and measuring logical error rates. It takes Stim circuits annotated with noise, detectors, and logical observables, uses Stim to generate samples, applies a decoder to predict whether logical errors occurred from detector data, and records success and failure rates. The tool uses Python multiprocessing to parallelize sampling across multiple CPU cores, dynamically allocates additional samples to circuits that need them based on user-specified targets (such as a minimum error count), saves results in CSV format, and provides basic plotting utilities for visualization.
Sinter is designed for single-machine benchmarking of quantum error correction codes. It scales well across machines with varying core counts (tested on 2, 4, and 96 core systems) and achieves good resource utilization when batch sizes are tuned appropriately. The library exposes both a Python API for programmatic use and a command-line interface for batch processing of circuit files, making it suitable for researchers prototyping and analyzing error correction schemes.
Use it for:
- Benchmark surface code implementations by sampling circuits at various physical error rates and measuring resulting logical error rates.
- Compare decoder performance on the same set of QEC circuits by running collection with different decoders and analyzing CSV output.
- Automate large-scale QEC sampling campaigns on a multi-core workstation, resuming interrupted runs without data loss via checkpoint files.
- Generate plots of logical error probability versus physical error rate to visualize code performance across parameter sweeps.
- Prototype and validate new quantum error correction codes by generating custom Stim circuits and collecting statistics via the Python API.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Sinter performs fast Monte Carlo sampling of quantum error correction circuits, using stim to generate samples and decoders like pymatching to predict logical errors from detector data.
Yes, with conditions. Install if you are actively researching or benchmarking quantum error correction codes and have stim and a decoder like pymatching available. The high install friction (four runtime dependencies) and the requirement to structure code around multiprocessing make it less suitable for casual exploration, but the active maintenance, permissive license, and no known vulnerabilities make it safe for production research use. Verify that pymatching or your chosen decoder is available before committing to the full stack.
Install
sinter on PyPI
pip
pip install sinteruv
uv add sinterpoetry
poetry add sinterInstalling sinter
Before you install
High install friction: requires four runtime dependencies (matplotlib, numpy, stim, scipy). Maintenance status is active with a recent release (84 days ago), but the heavy dependency footprint and compiled components in stim may add setup complexity.
License in practice
Licensed under Apache 2, a permissive license that allows commercial and private use with minimal restrictions—suitable for most research and production contexts.
Quickstart
pip install sinter
import sinter
import stim
tasks = [sinter.Task(circuit=stim.Circuit.generated(...), json_metadata={...})]
samples = sinter.collect(num_workers=4, max_shots=1_000_000, max_errors=1000, tasks=tasks, decoders=['pymatching'])
Requires Python >=3.7.0 and stim installed; multiprocessing-based collection must be wrapped in `if __name__ == '__main__'` to avoid child process re-execution.
Verify before relying
- Whether pymatching is a required dependency or optional; description mentions it as a decoder but it is not listed in runtime deps.
- Performance scaling characteristics on machines with different core counts beyond the stated testing range.
- Compatibility with decoders other than pymatching and whether custom decoders can be plugged in.
Package facts
| License | Apache 2 (permissive) |
| Python support | supports the current Python release (>=3.7.0) |
| Install friction | high — source build required |
| Runtime dependencies | 4 — matplotlib, numpy, stim, scipy |
| Maintenance | actively maintained — 84 days since the last release |
| First released | |
| Downloads | 92,090/month — #13,481 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sinter-1.16.0.tar.gz
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
stimStim is a fast simulator for quantum stabilizer…
permissive · top 15,000 on PyPI
samplomaticSamplomatic generates randomized variants of…
permissive · top 15,000 on PyPI
PyMatchingPyMatching is a fast Python/C++ library for…
permissive · top 15,000 on PyPI
qiskit-ibm-runtimeProvides a Python client to access IBM Quantum…
permissive · top 15,000 on PyPI
mqt.qcecVerifies whether two quantum circuits are…
permissive · top 15,000 on PyPI
cirqCirq is a Python framework for writing,…
permissive · top 15,000 on PyPI
qiskit-aerAer is a high-performance quantum circuit…
permissive · top 5,000 on PyPI
ldpcProvides decoders for low-density parity check…
permissive · top 15,000 on PyPI
cirq-ionqIntegrates Cirq quantum circuits with IonQ…
permissive · top 15,000 on PyPI
cirq-coreCirq-core provides the foundational framework…
permissive · top 15,000 on PyPI