{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/improved-simulation-of-stabilizer-circuits","title":"Improved Simulation of Stabilizer Circuits","arxiv_id":"quant-ph/0406196","date":"2004-06-25","proceeding":null,"authors":["Scott Aaronson","Daniel Gottesman"],"abstract":"The Gottesman-Knill theorem says that a stabilizer circuit -- that is, a quantum circuit consisting solely of CNOT, Hadamard, and phase gates -- can be simulated efficiently on a classical computer. This paper improves that theorem in several directions. First, by removing the need for Gaussian elimination, we make the simulation algorithm much faster at the cost of a factor-2 increase in the number of bits needed to represent a state. We have implemented the improved algorithm in a freely-available program called CHP (CNOT-Hadamard-Phase), which can handle thousands of qubits easily. Second, we show that the problem of simulating stabilizer circuits is complete for the classical complexity class ParityL, which means that stabilizer circuits are probably not even universal for classical computation. Third, we give efficient algorithms for computing the inner product between two stabilizer states, putting any n-qubit stabilizer circuit into a \"canonical form\" that requires at most O(n^2/log n) gates, and other useful tasks. Fourth, we extend our simulation algorithm to circuits acting on mixed states, circuits containing a limited number of non-stabilizer gates, and circuits acting on general tensor-product initial states but containing only a limited number of measurements.","url_abs":"https://arxiv.org/abs/quant-ph/0406196v5","url_pdf":"https://arxiv.org/pdf/quant-ph/0406196v5.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"improved-simulation-of-stabilizer-circuits","repo_url":"https://github.com/KittenHero/stabilizer-sim","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"improved-simulation-of-stabilizer-circuits","repo_url":"https://github.com/KittenHero/stabilzer-sim","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"improved-simulation-of-stabilizer-circuits","repo_url":"https://github.com/SimakovIlya/StabilizerCircuits","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"improved-simulation-of-stabilizer-circuits","repo_url":"https://github.com/StationQ/Liquid","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"improved-simulation-of-stabilizer-circuits","repo_url":"https://github.com/b63/chp","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"improved-simulation-of-stabilizer-circuits","repo_url":"https://github.com/hhy37/Liquid","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"improved-simulation-of-stabilizer-circuits","repo_url":"https://github.com/kklocke/cliffordcircuits","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"improved-simulation-of-stabilizer-circuits","repo_url":"https://github.com/or1426/Clifford-T-estimator","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"improved-simulation-of-stabilizer-circuits","repo_url":"https://github.com/qsi-baqs/jabalizer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"improved-simulation-of-stabilizer-circuits","repo_url":"https://github.com/qsi-baqs/jabalizer.jl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"improved-simulation-of-stabilizer-circuits","repo_url":"https://github.com/quantumlib/stim","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"improved-simulation-of-stabilizer-circuits","repo_url":"https://github.com/rharper2/Juqst","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=quant-ph%2F0406196","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"quant-ph/0406196"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hhy37/Liquid","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/quantumlib/stim","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kklocke/cliffordcircuits","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/KittenHero/stabilzer-sim","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/StationQ/Liquid","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rharper2/Juqst","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/SimakovIlya/StabilizerCircuits","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/qsi-baqs/jabalizer","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/b63/chp","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/or1426/Clifford-T-estimator","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/qsi-baqs/jabalizer.jl","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/KittenHero/stabilizer-sim","reach":{"status":"ok"}}],"summary":{"unverified":11},"by_repo_kind":{"listed":{"samples":11,"ran":0,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"27a3574bfd53ad9a","entry":"LMin","repo":"or1426/Clifford-T-estimator","repo_kind":"listed","path":"estimate.py","file_url":"https://github.com/or1426/Clifford-T-estimator/blob/HEAD/estimate.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"27a3574bfd53ad9a"}},{"code_sha256_prefix":"63b5fac16913cd36","entry":"a2str","repo":"or1426/Clifford-T-estimator","repo_kind":"listed","path":"util.py","file_url":"https://github.com/or1426/Clifford-T-estimator/blob/HEAD/util.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"63b5fac16913cd36"}},{"code_sha256_prefix":"1205728b447c787a","entry":"benchmark","repo":"quantumlib/stim","repo_kind":"listed","path":"src/stim/circuit/circuit_pybind_perf.py","file_url":"https://github.com/quantumlib/stim/blob/HEAD/src/stim/circuit/circuit_pybind_perf.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1205728b447c787a"}},{"code_sha256_prefix":"aa3519dd333778a5","entry":"benchmark_go","repo":"quantumlib/stim","repo_kind":"listed","path":"src/stim/circuit/circuit_pybind_perf.py","file_url":"https://github.com/quantumlib/stim/blob/HEAD/src/stim/circuit/circuit_pybind_perf.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"aa3519dd333778a5"}},{"code_sha256_prefix":"e842f57630b81f56","entry":"deltaPrime","repo":"or1426/Clifford-T-estimator","repo_kind":"listed","path":"estimate.py","file_url":"https://github.com/or1426/Clifford-T-estimator/blob/HEAD/estimate.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e842f57630b81f56"}},{"code_sha256_prefix":"793ddace2837fd38","entry":"epsPrime","repo":"or1426/Clifford-T-estimator","repo_kind":"listed","path":"estimate.py","file_url":"https://github.com/or1426/Clifford-T-estimator/blob/HEAD/estimate.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"793ddace2837fd38"}},{"code_sha256_prefix":"e0e8a79a01ff0e8f","entry":"no_really_i_have_a_doc_why_is_this_needed_argh","repo":"quantumlib/stim","repo_kind":"listed","path":"dev/doctest_proper.py","file_url":"https://github.com/quantumlib/stim/blob/HEAD/dev/doctest_proper.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e0e8a79a01ff0e8f"}},{"code_sha256_prefix":"6dfda233dc5c1159","entry":"normalize_doc_string","repo":"quantumlib/stim","repo_kind":"listed","path":"dev/util_gen_stub_file.py","file_url":"https://github.com/quantumlib/stim/blob/HEAD/dev/util_gen_stub_file.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6dfda233dc5c1159"}},{"code_sha256_prefix":"40b74173abf64c50","entry":"rref","repo":"or1426/Clifford-T-estimator","repo_kind":"listed","path":"util.py","file_url":"https://github.com/or1426/Clifford-T-estimator/blob/HEAD/util.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"40b74173abf64c50"}},{"code_sha256_prefix":"670b6e92f440d6bd","entry":"si2","repo":"quantumlib/stim","repo_kind":"listed","path":"src/stim/circuit/circuit_pybind_perf.py","file_url":"https://github.com/quantumlib/stim/blob/HEAD/src/stim/circuit/circuit_pybind_perf.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"670b6e92f440d6bd"}},{"code_sha256_prefix":"39f943cac460a842","entry":"splay_signature","repo":"quantumlib/stim","repo_kind":"listed","path":"dev/util_gen_stub_file.py","file_url":"https://github.com/quantumlib/stim/blob/HEAD/dev/util_gen_stub_file.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"39f943cac460a842"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}