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

The tqecd package has some dependencies that might be harder to install than a simple pip install. If you have any issues with the simple installation method above, please look at the full installation page.

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.1.3.tar.gz (46.9 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.1.3-py3-none-any.whl (50.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tqecd-0.1.3.tar.gz
Algorithm Hash digest
SHA256 cfb9102d7ea8b5d5d86e669d51213eab1376e36bb50f5e0fb171dfcfdee8fb46
MD5 fcd38d747471c314a24de0737c4b6560
BLAKE2b-256 6961c05fe9db15e540416a0d2afc709cc3b343f131fed6ee96ebbf2e293d1c74

See more details on using hashes here.

Provenance

The following attestation bundles were made for tqecd-0.1.3.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.1.3-py3-none-any.whl.

File metadata

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

File hashes

Hashes for tqecd-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d142a63c2000a5113f4aa3e41190ea0876968474323d402c2f47ed5c99c507d0
MD5 81774b0cc333cfc4f04efb9022c2902b
BLAKE2b-256 a8b28f489d672960595ca01d6bdeafa1663cb4d44336fa775b11c2fb9ea79e94

See more details on using hashes here.

Provenance

The following attestation bundles were made for tqecd-0.1.3-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