ELLIS: Extremely Fast Quantum Circuit Simulation under Qubit Loss and Leakage
ELLIS (Efficient Loss and Leakage Invariant-reference Simulation) samples Clifford circuits with qubit loss and leakage exactly. It uses a masked Pauli frame and one shared reference record, so each shot does not need its own tableau reference.
- One sampling API.
ellis.compile_samplercertifies the circuit. When one reference is proven exact, it samples with the C++ masked frameellis._core.MaskFrameSampler, built on Stim'sFrameSimulator. Otherwise it samples with Clifft's noncomputational sampler in online mode. Both drop a lost qubit's later gates and read its measurements as heralded fair coins. - Common-reference certificates.
ellis.certifyproves that one reference is exact for every loss pattern by frame-CSS relabelling or closed S/CZ blocks, or returns a signed-parity contradiction that shows no such reference exists. Pass the circuit with its noise injected: losses and reloads happen at itsI_ERROR[loss]andI_ERROR[reload]markers. A circuit with neither marker is certified underPESSIMISTIC(loss after every operation, |0> reload anywhere), so its reference holds under every loss model. An explicitLossModeloverrides both.frame_cssdecides frame-CSS exactly; a circuit outside the assumptions that make the decision exact (classical feedback, multi-qubit measurements, a prefix with too many open frame choices) gets verdict"outside-assumptions"instead.
Loss instructions
ELLIS reads Stim circuits and adds two tagged I_ERROR instructions. Stim parses both and ignores them.
| Instruction | Meaning |
|---|---|
I_ERROR[loss](p) q... |
Each atom q is lost with probability p. Its later gates are dropped and its readouts become fair coins. |
I_ERROR[reload](p) q... |
Each empty slot q gets a fresh atom in |0> with probability p (default 1). A present atom is left alone. |
A reload happens only where its marker stands. To reload at a reset, write the marker just before it:
CX 0 1
I_ERROR[loss](0.001) 0 1
M 1
I_ERROR[reload] 1
R 1
Sampling performance
Install
uv add ellis-qec # or: pip install ellis-qec
uv add "ellis-qec[sinter]" # also sinter, for ellis.sinter
Import it as ellis. Wheels support CPython 3.12, 3.13, and 3.14 on Linux x86-64 and macOS arm64 (macOS 15 or
later).
Build from source
uv sync # builds ellis._core with CMake (fetches Stim 1.16.0 once)
uv sync --extra sinter # also sinter, for ellis.sinter
The build needs a C++20 compiler: GCC 10 or newer, or Apple clang.
Use
import ellis
from ellis.noise import surface_memory
circuit = surface_memory(d=5, rounds=5, p=1e-3, p_loss=1e-3) # I_ERROR[loss](p) marks loss sites
sampler = ellis.compile_sampler(circuit, seed=1) # certifies: verdict "proven", method "frame-css"
sampler.method # "frame"
r = sampler.sample(10**4) # r.measurements, r.detectors, r.observables, r.heralds
r = sampler.sample(10**6, bit_packed=True, threads=8) # the same fields, bit-packed, on 8 threads
compile_sampler route |
Sampler |
|---|---|
method="auto", certificate proven without gauge Paulis |
C++ masked frame with the certified reference |
method="auto", any other certificate |
Clifft online |
method="frame" |
C++ masked frame; Stim's reference (unverified) unless a proven certificate is given |
method="clifft" |
Clifft online |
method="auto" certifies with ellis.certify.certify(circuit, model=MARKED, **certify_options) unless
certificate= is given: sampling loses atoms only at the markers.
sample returns a SampleResult with all four fields from one simulation pass; bit_packed=True uses Stim's
layout. Detection events are relative to the noiseless reference sample, as in Stim.
docs/sampling.md is the full reference: supported operations, loss semantics, routing, result
layout, heralds, and performance.
The sinter adapter ellis.sinter is under development.
Layout
| Path | Contents |
|---|---|
src/ellis/frame/ |
C++ masked frame: program compilation, stim::FrameSimulator with alive masks, batched sampler |
src/python/ |
bindings.cc (the ellis._core_<variant> modules), cpu.cc (ellis._cpu, which picks the variant) |
src/python/ellis/ |
sampler (compile_sampler), _clifft (Clifft route), frame (loss semantics), certify/ (frame_css, blocks, constraints), noise, sinter, gf2, check_exact |
tests/python/ |
tests against Stim on explicit lossy circuits and between the frame and Clifft routes; fixtures in tests/fixtures/ |
tools/ |
bench/bench_frame.py (masked frame and Stim speed), classify_lightstim.py (certify each LightStim protocol), fixture exporters |
cmake/ |
Stim fetch, compiler selection, SIMD variants |
.github/workflows/ |
test.yml (the tests on both x86-64 variants), wheels.yml (sdist and wheels; publishes to TestPyPI and PyPI on a v* tag, see RELEASING.md) |
Test
uv run pytest -n 8
uv run python -m ellis.check_exact 'tests/fixtures/lightstim/*.stim' # sampler vs Stim on random loss patterns
uv run python tools/classify_lightstim.py --benchmark # paper App. C classification
License
Apache-2.0.
Citation
If you find ELLIS useful in your work, please cite our paper:
@misc{hou2026ellis,
title={Ellis: Extremely Fast Quantum Circuit Simulation under Qubit Loss and Leakage},
author={Yuewen Hou and Gokul Subramanian Ravi},
year={2026},
eprint={2611.26173},
archivePrefix={arXiv},
primaryClass={quant-ph},
url={https://arxiv.org/abs/2611.26173},
}
For circuits without a proven common reference, such as circuits that are not frame-CSS, ELLIS samples with
Clifft's non-computational sampler in online mode, adapted to ELLIS's
loss and reload markers (ellis._clifft). If your results use that route (sampler.method == "clifft"), please also
cite Clifft:
@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},
}
Metadata
Release files for ellis-qec 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ellis_qec-0.1.1.tar.gz | 152.3 kB | With provenance | Details for ellis_qec-0.1.1.tar.gz |
Built distributions (wheels)
Total release size: 3.8 MB
Release files / ellis_qec-0.1.1.tar.gz
| Download URL | ellis_qec-0.1.1.tar.gz |
|---|---|
| Size | 152.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bcdfe63a6ed398d0298b493a3d4439c9a2cb91489ac5349823447e513c8fa5e9
|
|
BLAKE2b-256 checksum How to use checksums |
ffb59e74a8eaf72d7bd69872eba1b3847f93dcd50384719a24f1826fbedcb4bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / ellis_qec-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | ellis_qec-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 865.1 kB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
345f0f4accb8925cc5544caced06e28c406dc074f2b11c66a53a98e8319bae06
|
|
BLAKE2b-256 checksum How to use checksums |
5079b1dff7c47753d208bdd825d6cb7911129817d38593fb0d853a72441792d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / ellis_qec-0.1.1-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | ellis_qec-0.1.1-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 343.9 kB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f9f1652321f6e62ea80c3cfd7415d42c566cf03f5eeece02ab23742547100d40
|
|
BLAKE2b-256 checksum How to use checksums |
017cef3909e21841c6c5580a92eb4fc0511941b9f08a5b1b8d8bb2f89d052819
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / ellis_qec-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | ellis_qec-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 865.1 kB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b762984088cd1684e04ca3d19a03c868abb710a39ae9adf19de4a75fc655699e
|
|
BLAKE2b-256 checksum How to use checksums |
f125647d7fdce808deb2022dc7f4991324421af415c9b9a5498da7fe21610414
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / ellis_qec-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | ellis_qec-0.1.1-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 343.3 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
61d48e3fc76c47c6255778d16bb3bf7be00f5ad2801810b82b8b658160a99b25
|
|
BLAKE2b-256 checksum How to use checksums |
0b1ce20f6312234469e251ceacd99bc0f200e6710b9e84d9c821b5282953faf6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / ellis_qec-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | ellis_qec-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 864.6 kB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
e43a1b98afa19fd584098fd11455f440a7ca3f1c314301b9c5f5756223400781
|
|
BLAKE2b-256 checksum How to use checksums |
e9eb6557e9a6dff4bf1600bfdd3c9c5339d4a1b3b4fb93ee44388f059c1ba76f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / ellis_qec-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | ellis_qec-0.1.1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 343.2 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1e2adb9181d707dfa416701e6529ecf3a96bc275e98a8859332e7eb562d0634a
|
|
BLAKE2b-256 checksum How to use checksums |
48f55291ad6e4ea63c1f1ef343d9025d63215ce879c759b15a17261433dbf058
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logSecurity for ellis-qec 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 7 files in this release have been uploaded with provenance metadata.
Attestation for ellis_qec-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.