# tsim ## Docs - [tsim](https://bloqade.quera.com/tsim/index.md): A GPU-accelerated quantum circuit sampler based on ZX-calculus stabilizer rank decomposition. - [Installation](https://bloqade.quera.com/tsim/install.md): Install tsim with uv or pip, with optional CUDA support. - [Overview](https://bloqade.quera.com/tsim/tutorials/overview.md) - [Contributing](https://bloqade.quera.com/tsim/contributing.md): How to set up your development environment, run tests, and contribute to tsim. - [Quantum State Encoding with a Color Code](https://bloqade.quera.com/tsim/tutorials/encoding_demo.md) - [Logical magic state distillation](https://bloqade.quera.com/tsim/tutorials/magic_state_distillation.md) - [From Stim to Tsim](https://bloqade.quera.com/tsim/tutorials/from_stim_to_tsim.md) - [tsim](https://bloqade.quera.com/tsim/api-reference/index.md): ZX-calculus based circuit sampler for universal quantum circuits. - [circuit](https://bloqade.quera.com/tsim/api-reference/circuit.md): Quantum circuit wrapper around stim.Circuit with non-Clifford gate support. - [sampler](https://bloqade.quera.com/tsim/api-reference/sampler.md): Compiled samplers for measurements and detectors. - [compile](https://bloqade.quera.com/tsim/api-reference/compile/compile.md): Compilation of ZX graphs into JAX-compatible data structures. - [evaluate](https://bloqade.quera.com/tsim/api-reference/compile/evaluate.md): Evaluation of compiled scalar graphs using exact arithmetic. - [pipeline](https://bloqade.quera.com/tsim/api-reference/compile/pipeline.md): Compilation pipeline from prepared graphs to executable programs. - [stabrank](https://bloqade.quera.com/tsim/api-reference/compile/stabrank.md): Stabilizer rank decomposition for non-Clifford ZX graphs. - [terms](https://bloqade.quera.com/tsim/api-reference/compile/terms.md): Term-family modules for compiled scalar graphs. - [exact_scalar](https://bloqade.quera.com/tsim/api-reference/core/exact_scalar.md): Exact scalar arithmetic for ZX-calculus phase computations. - [graph](https://bloqade.quera.com/tsim/api-reference/core/graph.md): ZX graph construction, manipulation, and preparation for sampling. - [instructions](https://bloqade.quera.com/tsim/api-reference/core/instructions.md): ZX graph representations of quantum gates and instructions. - [parse](https://bloqade.quera.com/tsim/api-reference/core/parse.md): Parser for converting stim circuits to ZX graph representations. - [tags](https://bloqade.quera.com/tsim/api-reference/core/tags.md): Helpers for tags that encode tsim-specific gate metadata. - [types](https://bloqade.quera.com/tsim/api-reference/core/types.md): Core data types for the tsim compilation and sampling pipeline. - [channels](https://bloqade.quera.com/tsim/api-reference/noise/channels.md): Pauli noise channels and error sampling infrastructure. - [dem](https://bloqade.quera.com/tsim/api-reference/noise/dem.md): Detector error model generation for QEC decoder integration. - [clifford](https://bloqade.quera.com/tsim/api-reference/utils/clifford.md): Mapping tables for converting parametric rotations with half-pi angles to Clifford gates. - [cuda_helpers](https://bloqade.quera.com/tsim/api-reference/utils/cuda_helpers.md): CUDA-runtime helpers used by the sampler hot path. - [diagram](https://bloqade.quera.com/tsim/api-reference/utils/diagram.md): SVG diagram rendering for quantum circuits. - [encoder](https://bloqade.quera.com/tsim/api-reference/utils/encoder.md): Transversal encoder utilities for QEC code experiments. - [linalg](https://bloqade.quera.com/tsim/api-reference/utils/linalg.md): Linear algebra utilities for GF(2) operations. - [program_text](https://bloqade.quera.com/tsim/api-reference/utils/program_text.md): Conversion utilities between tsim shorthand and stim program text.