Skip to main content

Clifft

Unitary Foundation Docs arXiv License Discord Chat

PyPI version Downloads CI codecov Contributor Covenant

Clifft is a fast exact simulator for near-Clifford quantum circuits.

Built and maintained by the Unitary Foundation.

Clifft accepts Stim-format circuits, extends them with non-Clifford gates, and compiles them into symbolic-coordinate sampling plans. It is designed for circuits whose dominant structure is Clifford, but whose behavior depends on localized non-Clifford operations.

The dense active state has 2^k amplitudes, where k is its active width. The main simulation cost therefore scales with 2^k, rather than directly with the total number of physical qubits n. Non-Clifford operations can increase k, while measurements can reduce it.

Clifft's original design established this factored active-state architecture, described in the Clifft paper. SymFT, by Wang Fang, Huazhe Lou, and Riling Li, is the second-generation successor to SOFT. Its planner builds on SOFT's generalized-stabilizer simulation and Clifft's dense active-state representation. SymFT adds symbolic Clifford-Pauli-frame factorization, adaptive stabilizer-coordinate planning, and direct multi-coordinate kernels. Clifft's current sampler adopts these SymFT developments alongside Clifft-specific compiler, continuation, and API machinery. See the theoretical overview for the fuller lineage and implementation boundaries. The symbolic sampling update explains the migration from the original SVM and reports matched release-target benchmarks.

Why Clifft?

  • Stim-compatible format and API: parse Stim-format circuits with noise, detectors, observables, and repeat blocks, plus non-Clifford extensions.
  • Exact near-Clifford simulation: simulate localized non-Clifford effects without approximating the quantum state.
  • Optimizing compiler pipeline: resolve Clifford coordinates and symbolic dependencies once, then sample many shots from a prepared plan.
  • Active-width scaling: for low-magic circuits, runtime and memory scale with the localized active state rather than the full Hilbert space.

For QEC workflows, Clifft also supports detector-based post-selection, survivor sampling, and stratified importance sampling for rare-event estimation.

Installation

pip install clifft
Platform / CPU family PyPI wheel
Linux x86_64 with AVX2 Supported
Linux aarch64 Supported
macOS arm64 Supported
Windows amd64 Supported

All other platforms and CPU families should build from source. See the installation docs.

Quick Start

import clifft

program = clifft.compile("""
    H 0
    CNOT 0 1
    T 2
    M 0 1 2
""")

result = clifft.sample(program, shots=1000, seed=42)
print(result.measurements[:5])

For more details and examples, check out the documentation or take Clifft for a spin in the web-based interactive playground.

Front-End Integrations

Clifft's native API accepts Stim-compatible circuit text. If your workflow starts in another circuit framework, companion packages make the supported path discoverable:

  • Qiskit: clifft-qiskit provides a Qiskit BackendV2 provider for running supported QuantumCircuit instances on Clifft.
  • Cirq: clifft-cirq converts parameter-resolved cirq.Circuit instances to Clifft text and provides a Cirq-style sampler backed by Clifft.

See the front-end integrations guide for installation commands, minimal examples, and current limitations.

Citation

If you use Clifft in your work, please cite the arXiv preprint below.

@misc{chase2026clifftfastexactsimulation,
      title={Clifft: Fast Exact Simulation of Near-Clifford Quantum Circuits},
      author={Bradley A. Chase and Farrokh Labib},
      year={2026},
      eprint={2604.27058},
      archivePrefix={arXiv},
      primaryClass={quant-ph},
      url={https://arxiv.org/abs/2604.27058},
}

Development

See the building from source guide for build instructions.

AI Acknowledgement

We used generative AI tools during parts of the research, software-development, and writing workflow for this project. These tools assisted with code generation and review, implementation analysis, documentation editing, and checks of selected derivations or arguments. All substantive design, validation, and release decisions were made by the human contributors.

Funding

This work was supported by the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research, Accelerated Research in Quantum Computing under Award Number DE-SC0025336.

This material is also based upon work supported by the U.S. Department of Energy, Office of Science, National Quantum Information Science Research Centers, Quantum Science Center.

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clifft-0.8.0.tar.gz (1.8 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

clifft-0.8.0-cp312-abi3-win_amd64.whl (456.6 kB view details)

Uploaded CPython 3.12+Windows x86-64

clifft-0.8.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (671.3 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

clifft-0.8.0-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (592.3 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

clifft-0.8.0-cp312-abi3-macosx_14_0_arm64.whl (448.4 kB view details)

Uploaded CPython 3.12+macOS 14.0+ ARM64

File details

Details for the file clifft-0.8.0.tar.gz.

File metadata

  • Download URL: clifft-0.8.0.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for clifft-0.8.0.tar.gz
Algorithm Hash digest
SHA256 9a181688ef081a1f2ea6a385430ace7dc4fbca779cf866d7210a18c9b42b3ff3
MD5 3c4ec240d07b3fc1f5b75c06faf677fe
BLAKE2b-256 40c0cbf68b2d6e035ce319e286c3c520dbc7151ae67ed8996b23e41bdb6663bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for clifft-0.8.0.tar.gz:

Publisher: release.yml on unitaryfoundation/clifft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clifft-0.8.0-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: clifft-0.8.0-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 456.6 kB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for clifft-0.8.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 082413a33eedfab476994f4b8db215b1c3a03adec6b623afa522ffe23d93bda6
MD5 c4226054d521da8ba5e1d28c617de8c1
BLAKE2b-256 956fe3714490992e4ed255e9f54f131602f82348f2218efb50237560ee8b5da1

See more details on using hashes here.

Provenance

The following attestation bundles were made for clifft-0.8.0-cp312-abi3-win_amd64.whl:

Publisher: release.yml on unitaryfoundation/clifft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clifft-0.8.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for clifft-0.8.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a9b5703ccb510ec3737bf44943f17ca714ac2e1e1722fa189f7aa0c719b20f9c
MD5 99c5f026e90bcacf44e04719b135d310
BLAKE2b-256 0e9cc51f1a0aaee27651037c4c36e06beac6f73c71c78084924ec533acd7fe54

See more details on using hashes here.

Provenance

The following attestation bundles were made for clifft-0.8.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on unitaryfoundation/clifft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clifft-0.8.0-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for clifft-0.8.0-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 15804a759970b98abbd4329da0941f30e69f5406fa7d7c46a74d14169d4fd15b
MD5 d8b99f1ee09bc2eb3efb334882d43e87
BLAKE2b-256 0a1e94f0e2b3ff9a5b144e72eef09b91e21b8352bf553a85a585a7e9cfd69bab

See more details on using hashes here.

Provenance

The following attestation bundles were made for clifft-0.8.0-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: release.yml on unitaryfoundation/clifft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clifft-0.8.0-cp312-abi3-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for clifft-0.8.0-cp312-abi3-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 f8b789bf8d511059a19d7629fdca191bb107ef2f3b9d32d0f1a2dc1428c54222
MD5 f6c4c56fffe82c31fcf6f6d78d1528a5
BLAKE2b-256 67d90bf975f1062d603f36b329cd5c293c1f8b577ee1704c87000aa8e5d581c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for clifft-0.8.0-cp312-abi3-macosx_14_0_arm64.whl:

Publisher: release.yml on unitaryfoundation/clifft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.10.1

5 files

0.10.0

5 files

0.9.0

5 files

This release

0.8.0 This release

5 files

0.7.0

5 files

0.6.0

5 files

0.5.0

5 files

0.4.1

5 files

0.4.0

5 files

0.3.0

5 files

0.2.0

5 files

0.1.0

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page