Fast universal quantum circuit sampler for QEC
https://tsim.mintlify.app/ โ HEALTH ? 92 / Healthy
Fast universal quantum circuit sampler for QEC
https://tsim.mintlify.app/ โ// readme
A fast sampler for noisy quantum circuits with non-Clifford gates, built on the ZX-calculus.
Tsim feels just like Stim, but supports T gates, arbitrary rotations, and
other non-Clifford instructions.
Tsim requires Python 3.11 or later. Install with pip:
pip install bloqade-tsim
Or with uv:
uv add bloqade-tsim
The default sampling strategy runs on the CPU. To run the stabilizer-rank strategies on an NVIDIA GPU, install the JAX CUDA extra:
pip install "bloqade-tsim[cuda13]" # or bloqade-tsim[cuda12]
An introductory tutorial is available here. Please also refer to the documentation.
For many existing scripts, replacing stim with tsim should just work. Tsim mirrors the Stim API and supports all Stim instructions, plus the non-Clifford instructions listed below.
import tsim
c = tsim.Circuit(
"""
RX 0
Rโฆ