emlint
stim simulates. sinter samples. emlint verifies.
emlint is a static linter for Stim Detector Error Models (DEMs). It finds structural problems before simulation.
v0.2 is preliminary. The user-facing behavior is usable, but internal APIs and implementation details may change before v1.0.
Quick start
Install emlint:
pip install emlint
Lint a DEM file or raw DEM text:
emlint check circuit.dem
emlint check 'error(0.01) D0 L0
detector D0'
A failing result includes a counter-example identifying the relevant mechanism, detector, or observable. For command options and exit codes, see the CLI reference.
Python
import emlint
import stim
circuit = stim.Circuit.generated(
"surface_code:rotated_memory_z",
distance=3,
rounds=3,
after_clifford_depolarization=0.001,
)
report = emlint.check(circuit.detector_error_model())
print(emlint.format_text(report))
emlint.check() also accepts a raw DEM string or an explicit pathlib.Path.
Documentation
| Guide | Use it for |
|---|---|
| CLI reference | Commands, options, output, and exit codes |
| Check catalog | What the six checks detect and how to interpret findings |
| Debugging guide | Check-specific causes and investigation steps |
| Formal grounding | DEM vocabulary and formal properties |
| v0.2 limitations | Scope, warnings, repeat blocks, and provisional behavior |
CI
For a minimal GitHub Actions setup, install emlint and run it on changed DEM files:
- name: Install emlint
run: pip install emlint
- name: Lint DEM files
run: find . -name "*.dem" -print0 | xargs -0 -r -n1 emlint check
Contributing
See CONTRIBUTING.md for development setup, how to add a check, test requirements, and quality gates.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file emlint-0.2.0.tar.gz.
File metadata
- Download URL: emlint-0.2.0.tar.gz
- Upload date:
- Size: 49.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c93d70c7a32ae1c6ee02d83905549c4416a2f8ff2d2365e6bb22dc71bb65b18
|
|
| MD5 |
04620b180cb2a2b61691c8b6d54b6606
|
|
| BLAKE2b-256 |
1d5764d1be9b8457dc3a1d07e40c3bacb4765b30264fb49783af624c77b5c0e5
|
Provenance
The following attestation bundles were made for emlint-0.2.0.tar.gz:
Publisher:
publish.yml on MathysRennela/emlint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
emlint-0.2.0.tar.gz -
Subject digest:
4c93d70c7a32ae1c6ee02d83905549c4416a2f8ff2d2365e6bb22dc71bb65b18 - Sigstore transparency entry: 2368929125
- Sigstore integration time:
-
Permalink:
MathysRennela/emlint@5f01edc4e27738945df737ea3bf73f0e0990f120 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/MathysRennela
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5f01edc4e27738945df737ea3bf73f0e0990f120 -
Trigger Event:
push
-
Statement type:
File details
Details for the file emlint-0.2.0-py3-none-any.whl.
File metadata
- Download URL: emlint-0.2.0-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af5dabb171b4efcce9af9b4b8da4d70212493654871766d963ee5f0be707f637
|
|
| MD5 |
ab4aee7189e39f2405566af5d73287cc
|
|
| BLAKE2b-256 |
ea0b0d095cd172be80c7ad4fd5c529956582509bb37e3ee9edf7c0f15918c023
|
Provenance
The following attestation bundles were made for emlint-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on MathysRennela/emlint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
emlint-0.2.0-py3-none-any.whl -
Subject digest:
af5dabb171b4efcce9af9b4b8da4d70212493654871766d963ee5f0be707f637 - Sigstore transparency entry: 2368929878
- Sigstore integration time:
-
Permalink:
MathysRennela/emlint@5f01edc4e27738945df737ea3bf73f0e0990f120 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/MathysRennela
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5f01edc4e27738945df737ea3bf73f0e0990f120 -
Trigger Event:
push
-
Statement type: