Stim: a fast stabilizer circuit simulator

Craig Gidney
3/3/2021
quant-ph

Official code: quantumlib/Stim (835 stars, Apache-2.0, last commit 2026-10-20).

Abstract

This paper presents ``Stim", a fast simulator for quantum stabilizer circuits. The paper explains how Stim works and compares it to existing tools. With no foreknowledge, Stim can analyze a distance 100 surface code circuit (20 thousand qubits, 8 million gates, 1 million measurements) in 15 seconds and then begin sampling full circuit shots at a rate of 1 kHz. Stim uses a stabilizer tableau representation, similar to Aaronson and Gottesman's CHP simulator, but with three main improvements. First, Stim improves the asymptotic complexity of deterministic measurement from quadratic to linear by tracking the {\em inverse} of the circuit's stabilizer tableau. Second, Stim improves the constant factors of the algorithm by using a cache-friendly data layout and 256 bit wide SIMD instructions. Third, Stim only uses expensive stabilizer tableau simulation to create an initial reference sample. Further samples are collected in bulk by using that sample as a reference for batches of Pauli frames propagating through the circuit.

View on arXivView PDF

Code Implementations(1)

quantumlib/StimOfficial100%
Apache-2.0

A fast stabilizer circuit library.

835244C, C++Feb 19, 20215 days agoApache-2.0
quantum-computingstabilizer-circuits

Similar Papers

Cite this paper

@article{gidney2021stim,
  title  = {Stim: a fast stabilizer circuit simulator},
  author = {Craig Gidney},
  year   = {2021},
  eprint = {2103.02202},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2103.02202}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2103.02202.svg)](https://codeofpaper.com/paper/2103.02202)

Discussion