Skip to content

Part of the Bloqade SDK · Python · CPU and GPU

tsim

Sample noisy quantum circuits with non-Clifford gates using a Stim-like interface and ZX-calculus stabilizer-rank decomposition.

Source: QuEraComputing/tsim

First circuitsample.py
import tsim

circuit = tsim.Circuit("""
    H 0
    T 0
    M 0
    DETECTOR rec[-1]
""")
samples = circuit.compile_detector_sampler().sample(shots=100)
print(samples)

Build a circuit, compile a detector sampler, and sample 100 shots.

§ 1   Explore

Get started with tsim

§ 2   Install

Add tsim

uv add bloqade-tsim

For CUDA acceleration and other install options, see the Installation guide.

Quick Start, Tutorials or API Reference