Skip to main content

tqecd

The tqecd package is a spin-off from the tqec package that allows the automatic search of detectors in structured quantum error correction circuits.

This package was initially part of tqec and has been outsourced to make it accessible to anyone wanting to use it outside of the tqec library.

Documentation

Documentation is available at https://tqec.github.io/tqecd/index.html.

Installation

Currently, tqecd needs to be installed from source using

python -m pip install git+https://github.com/tqec/tqecd.git

Basic usage

import stim

from tqecd import annotate_detectors_automatically

# Example circuit that contains a detector
XXXX = stim.Circuit("""\
QUBIT_COORDS(1, 1) 0
QUBIT_COORDS(0, 0) 1
QUBIT_COORDS(2, 0) 2
QUBIT_COORDS(0, 2) 3
QUBIT_COORDS(2, 2) 4
RX 0 1 2 3 4
TICK
CX 0 1
TICK
CX 0 2
TICK
CX 0 3
TICK
CX 0 4
TICK
MX 0
""")
assert XXXX.num_detectors == 0

annotated_circuit = annotate_detectors_automatically(XXXX)
print(annotated_circuit)

should output the following quantum circuit:

QUBIT_COORDS(1, 1) 0
QUBIT_COORDS(0, 0) 1
QUBIT_COORDS(2, 0) 2
QUBIT_COORDS(0, 2) 3
QUBIT_COORDS(2, 2) 4
RX 0 1 2 3 4
TICK
CX 0 1
TICK
CX 0 2
TICK
CX 0 3
TICK
CX 0 4
TICK
MX 0
DETECTOR(1, 1, 0) rec[-1]

Contributing

Pull requests and issues are more than welcomed!

See the contributing page for specific contributing instructions.

Metadata

Release files for tqecd 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tqecd 0.2.1
File Size Uploaded Provenance
tqecd-0.2.1.tar.gz 45.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tqecd 0.2.1
File Interpreter ABI Platform
tqecd-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 95.1 kB

Release files / tqecd-0.2.1.tar.gz

Download URL tqecd-0.2.1.tar.gz
Size 45.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2ece998ad0b1955ef336a4fac3a3e58c4a1afda926e134d82d0a5cf4e96fc04e
BLAKE2b-256 checksum
How to use checksums
a396feda08dbf09f8b20b7223e25dbf4fd51714439f9f7254a21f5faeeb4eb92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 5, 2026.

Transparency log

Release files / tqecd-0.2.1-py3-none-any.whl

Download URL tqecd-0.2.1-py3-none-any.whl
Size 49.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eac5e9f526220d909250f8de950784375bb4b8a3ad599e9b9a9c8f298bcfba51
BLAKE2b-256 checksum
How to use checksums
a9d6d2720c89d56bdd8e545caa9b64a47a20634ec17be5a1d60f1ae045c27d59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 5, 2026.

Transparency log

Security for tqecd 0.2.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 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tqecd-0.2.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 Jul 5, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files Full provenance

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