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.2.tar.gz (46.4 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.2-py3-none-any.whl (50.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tqecd-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8c2c621ca2cb6a85651a113fabf9f9acb062123240b06b10a23e4c6f30f2cf43
MD5 f1056a8ae74734be948355c6f7ead9b8
BLAKE2b-256 5be15f218083507960d8cdbd24c7db7ffc1a8fb2b6535d56ddafacadeff1ab09

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for tqecd-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 74d447bca48ef9e2a4c7a0a3abe9c2ced3a62bf0a6fead878b50daac9d449789
MD5 ac3a69b467ca21f1ffb8b52d0512b2a9
BLAKE2b-256 893cdb4a9390815ba01c849474c797d921de1593c10abc376e999684d0d5e4f9

See more details on using hashes here.

Provenance

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