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
sample.pyimport 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-tsimFor CUDA acceleration and other install options, see the Installation guide.