{"id":24592,"library":"sinter","title":"Sinter","description":"Sinter is a Python library for sampling and decoding quantum error correction circuits using Stim, with integrated support for PyMatching and various decoders. Current version 1.15.0; released roughly monthly. It provides CLI tools and a Python API for collecting statistics, plotting error curves, and managing batch jobs.","status":"active","version":"1.15.0","language":"python","source_language":"en","source_url":"https://github.com/quantumlib/sinter","tags":["quantum error correction","stim","pymatching","circuit sampling","decoding"],"install":[{"cmd":"pip install sinter","lang":"bash","label":"Standard install"}],"dependencies":[{"reason":"Circuit generation and sampling engine","package":"stim","optional":false},{"reason":"Default decoder for matching-based decoding","package":"pymatching","optional":true},{"reason":"Plotting error curves","package":"matplotlib","optional":true}],"imports":[{"note":"","wrong":null,"symbol":"sinter","correct":"import sinter"},{"note":"","wrong":null,"symbol":"sinter.Collection","correct":"from sinter import Collection"},{"note":"","wrong":null,"symbol":"sinter.Task","correct":"from sinter import Task"},{"note":"","wrong":null,"symbol":"sinter.Stats","correct":"from sinter import Stats"}],"quickstart":{"code":"import sinter\nimport stim\n\ntasks = [\n    sinter.Task(\n        circuit=stim.Circuit.generated(\n            'repetition_code:memory',\n            rounds=100,\n            distance=5\n        ),\n        decoder='pymatching',\n    )\n]\n\nsample = sinter.collect(\n    num_workers=4,\n    max_errors=1_000,\n    start_batch_size=100,\n    tasks=tasks,\n)\n\nprint(sample)\n\n# Plot results\nfig, ax = sinter.plot.error_rate_vs_error_probability(sample)\nfig.savefig('plot.png')","lang":"python","description":"Create a repetition code circuit, sample it with PyMatching decoder, and plot error rate vs physical error probability."},"warnings":[{"fix":"Use `sinter.plot.error_rate_vs_error_probability(sample, ax=ax)` instead of passing collection as keyword or using `show=True`.","message":"In sinter v1.10+, the `sinter.plot.error_rate_vs_error_probability` function changed its signature: the `collection` argument is now positional-only and `show` parameter is removed.","severity":"breaking","affected_versions":">=1.10.0"},{"fix":"Replace `num_workers=4` with `num_processes=4`.","message":"`sinter.collect()` parameter `num_workers` is deprecated in favor of `num_processes`.","severity":"deprecated","affected_versions":">=1.13.0"},{"fix":"Install pymatching via `pip install pymatching` or use a different decoder like 'fusion_blossom' that doesn't require pymatching.","message":"If you don't install pymatching, sinter will raise a runtime error when trying to use 'pymatching' decoder. It is not installed by default.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install sinter` in your active Python environment.","cause":"Sinter is not installed or installed in a different environment.","error":"ModuleNotFoundError: No module named 'sinter'"},{"fix":"Upgrade to latest version: `pip install --upgrade sinter`.","cause":"Outdated version of sinter (<0.1). The API changed significantly in earlier versions.","error":"AttributeError: module 'sinter' has no attribute 'collect'"},{"fix":"Install pymatching: `pip install pymatching`.","cause":"pymatching library is not installed.","error":"RuntimeError: Failed to decode: decoder 'pymatching' not available"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}