Skip to main content

Automatically find detectors in a topologically quantum error corrected computation

Project description

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.

Project details


Download files

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

Source Distribution

tqecd-0.2.0.tar.gz (43.1 kB view details)

Uploaded Source

Built Distribution

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

tqecd-0.2.0-py3-none-any.whl (45.8 kB view details)

Uploaded Python 3

File details

Details for the file tqecd-0.2.0.tar.gz.

File metadata

  • Download URL: tqecd-0.2.0.tar.gz
  • Upload date:
  • Size: 43.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tqecd-0.2.0.tar.gz
Algorithm Hash digest
SHA256 346d9773421715dabfaf6c3952eef50e1d394dd09c6445d634dea651eab12662
MD5 933326a852ef3c371b21bef688337d14
BLAKE2b-256 9b43c0acb4003b568047cdebf0755897647f5b2ad9e83f38d02edf0b8471b884

See more details on using hashes here.

Provenance

The following attestation bundles were made for tqecd-0.2.0.tar.gz:

Publisher: publish.yml on tqec/tqecd

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

File details

Details for the file tqecd-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tqecd-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 45.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tqecd-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2d528df2e27d06cf29c65c79a38b24a86074f13314d83b19a03ca4e2d097d39
MD5 47e2d231b5b93293e3113fc0c84ab055
BLAKE2b-256 e8ba87afe9ce2e6e95080eaefa28a6ecb20ae97f9117ca0739b27c48e88798a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for tqecd-0.2.0-py3-none-any.whl:

Publisher: publish.yml on tqec/tqecd

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page