stabilizer_qec 2.0.0

Quantum error-correction simulation and decoding: Stim-format circuits and error models, a bit-parallel sampler, sparse-blossom, correlated and belief matching, BP+OSD, window decoders, bivariate bicycle codes, lattice surgery, Clifford+T circuits with coherent noise, and sampling and BP on the GPU.
Documentation
[build-system]
requires = ["maturin>=1.9,<2"]
build-backend = "maturin"

[project]
name = "stabilizer-qec"
# The Python package is versioned on its own; the Rust crate has its own version (Cargo.toml).
version = "2.0.0"
description = "A quantum error-correction simulator and decoder in Rust: circuits and error models in Stim's formats, exact sparse-blossom, correlated and belief matching, BP+OSD for IBM's gross code, lattice surgery, window decoders for real time, the APIs of twenty-five other QEC tools, Clifford+T circuits with coherent noise, fault-tolerant compilation and resource estimates, and sampling and BP on the GPU."
readme = "python/README.md"
license = "MIT AND Apache-2.0"
license-files = ["LICENSE", "LICENSES/Apache-2.0.txt", "THIRD_PARTY_NOTICES.md"]
requires-python = ">=3.9"
dependencies = ["numpy>=1.21"]
authors = [{ name = "Jasper Sands" }]
keywords = ["quantum error correction", "surface code", "decoder", "matching", "stim", "bp-osd", "qldpc", "lattice surgery", "clifford+t", "coherent noise", "resource estimation", "gpu"]
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Science/Research",
    "Operating System :: OS Independent",
    "Programming Language :: Rust",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3 :: Only",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Programming Language :: Python :: 3.14",
    "Topic :: Scientific/Engineering :: Physics",
    "Typing :: Typed",
]

[project.optional-dependencies]
# stabilizer_qec.sinter needs nothing more, but plots with matplotlib.
plot = ["matplotlib>=3.5"]
# 1.x's name for the extra (it installed sinter and Stim, which 2.0 does without).
sinter = ["matplotlib>=3.5"]
# stabilizer_qec.ldpc returns scipy's sparse matrices, as ldpc does.
ldpc = ["scipy>=1.7"]
# stabilizer_qec.qldpc (qLDPC 0.4.1) needs what qLDPC needs beyond its QEC stack, and Python 3.11.
qldpc = [
  "scipy>=1.14.1; python_version >= '3.11'",
  "galois>=0.4.2; python_version >= '3.11'",
  "sympy>=1.12; python_version >= '3.11'",
  "cvxpy>=1.3.2; python_version >= '3.11'",
  "networkx>=2.6.2; python_version >= '3.11'",
  "diskcache>=5; python_version >= '3.11'",
  "platformdirs>=4; python_version >= '3.11'",
  "pyperclip>=1.11; python_version >= '3.11'",
  "tqdm>=4; python_version >= '3.11'",
]
# stabilizer_qec.qecsim (qecsim 1.0b9) and stabilizer_qec.bposd (bposd 2.1) need what those do.
qecsim = ["scipy>=1.3", "networkx>=2.1", "mpmath>=1", "click>=7"]
bposd = ["scipy>=1.7"]
# stabilizer_qec.mqt_qecc (MQT QECC 2.0.0) needs what MQT QECC does, but for the tools of
# this package's own (Stim, sinter, ldpc, PyMatching, qecsim, bposd): Python 3.10.
mqt = [
  "qiskit[qasm3-import]>=1.0.0; python_version >= '3.10'",
  "matplotlib>=3.7.1; python_version >= '3.10'",
  "numba>=0.57; python_version >= '3.10'",
  "scipy>=1.15.2; python_version >= '3.10'",
  "z3-solver>=4.15.3; python_version >= '3.10'",
  "multiprocess>=0.70.17; python_version >= '3.10'",
  "tqdm>=4.66.2; python_version >= '3.10'",
  "networkx>=3.4.2; python_version >= '3.10'",
  "mpmath>=1; python_version >= '3.10'",
  "click>=7; python_version >= '3.10'",
]
# stabilizer_qec.quits (QUITS 1.2.0) needs what QUITS does beyond Stim and ldpc: Python 3.10.
quits = [
  "scipy>=1.9.3; python_version >= '3.10'",
  "networkx>=2.8.8; python_version >= '3.10'",
  "tqdm>=4; python_version >= '3.10'",
  "matplotlib>=3.5; python_version >= '3.10'",
]
# stabilizer_qec.panqec (PanQEC 0.1.7) needs what PanQEC does beyond ldpc and PyMatching; its
# GUI needs Flask too (`panqec-gui`).
panqec = ["scipy>=1.8.0", "pandas>=1.4.2", "matplotlib>=3.3.4", "tqdm>=4.59.0", "python-dotenv>=0.17.0", "psutil>=5.8.0", "click>=8.1.2"]
# stabilizer_qec.pecos (PECOS 0.2.0) needs what PECOS does (on NumPy 2 and networkx 3 too).
pecos = ["scipy>=1.1.0", "matplotlib>=2.2.0", "networkx>=2.1.0", "sortedcontainers>=2.0.0"]
# stabilizer_qec.deltakit (Deltakit 0.10: deltakit-circuit, -core and -decode 0.9.2, -explorer 0.9.4)
# needs what Deltakit does beyond Stim and PyMatching (its cloud client's gql and requests too):
# Python 3.11.
deltakit = [
  "numpy>=2.0; python_version >= '3.11'",
  "scipy>=1.15.3; python_version >= '3.11'",
  "networkx>=3.1; python_version >= '3.11'",
  "matplotlib>=3.9.2; python_version >= '3.11'",
  "seaborn>=0.12; python_version >= '3.11'",
  "plotly>=6.5; python_version >= '3.11'",
  "pathos>=0.3.5; python_version >= '3.11'",
  "pandas>=2.2.2; python_version >= '3.11'",
  "tqdm>=4.66; python_version >= '3.11'",
  "galois>=0.4.11; python_version >= '3.11'",
  "uncertainties>=3.2.3; python_version >= '3.11'",
  "adjustText>=1.3; python_version >= '3.11'",
  "typing-extensions>=4.15; python_version >= '3.11'",
  "packaging>=25; python_version >= '3.11'",
  "gql[requests]>=3.5; python_version >= '3.11'",
  "graphql-core>=3.2.11; python_version >= '3.11'",
  "requests>=2.32; python_version >= '3.11'",
]
panqec-gui = ["scipy>=1.8.0", "pandas>=1.4.2", "matplotlib>=3.3.4", "tqdm>=4.59.0", "python-dotenv>=0.17.0", "psutil>=5.8.0", "click>=8.1.2", "Flask>=2.0.1"]

[project.scripts]
stabilizer-qec = "stabilizer_qec._cli:main"

[project.urls]
Homepage = "https://qcompiler.jaspersands.com"
Repository = "https://github.com/Jaspersands/quantum-simulator-qec"

[tool.maturin]
# Every wheel carries the GPU samplers and decoder (wgpu: Metal, Vulkan, DX12); without a device
# `device="gpu"` raises and `gpu_device()` is None.
features = ["python", "highs", "gpu"]
profile = "python"
module-name = "stabilizer_qec._core"
python-source = "python"