Skip to main content

MQT QECC - A Tool for Quantum Error Correcting Codes

Project description

License: MIT CI Python CI Bindings codecov

MQT QECC - A tool for Quantum Error Correcting Codes written in C++

:warning: This project is still in early development and breaking changes might happen frequently.

(Additionally to the basic numerical results already provided, further data will be published continually)

A tool for quantum error correcting codes and numerical simulations developed by the Chair for Design Automation at the Technical University of Munich based on methods proposed in [1]. QECC is part of the Munich Quantum Toolkit (MQT).

The tool can be used to decode quantum LDPC codes and conduct respective numerical simulations.

At the moment the general QLDPC decoder [2] and a heuristic (which improves the runtime of the algorithm) [1] are implemented. Currently, open-source software by Joschka Roffe et al.: [3] is used to construct codes (toric, lifted product and hypergraph product).

Documentation

If you have any questions, feel free to contact us via quantum.cda@xcit.tum.de or by creating an issue on GitHub.

Getting Started

QECC is available via PyPI for Linux, macOS, and Windows.

(venv) $ pip install mqt.qecc

The following code gives an example on the usage:

from mqt.qecc import *
import numpy as np

H = [
    [1, 0, 0, 1, 0, 1, 1],
    [0, 1, 0, 1, 1, 0, 1],
    [0, 0, 1, 0, 1, 1, 1]
]
code = Code(H, H)
decoder = UFHeuristic()
decoder.set_code(code)
x_err = sample_iid_pauli_err(code.N, 0.05)
decoder.decode(code.get_x_syndrome(x_err))
result = decoder.result
print(result)
residual_err = np.array(x_err) ^ np.array(result.estimate)
print(code.is_x_stabilizer(residual_err))

Detailed documentation on all available methods, options, and input formats is available at ReadTheDocs.

Note Pre-built wheels are not yet available. They will be released soon. In the meantime, follow the instructions below for cloning the repository and call pip install --editable . in the cloned directory to install the Python package.

System Requirements and Building

The implementation is compatible with any C++17 compiler and a minimum CMake version of 3.14. Please refer to the documentation on how to build the project.

Building (and running) is continuously tested under Linux, macOS, and Windows using the latest available system versions for GitHub Actions.

Reference

If you use our tool for your research, we will be thankful if you refer to it by citing the appropriate publication:

a L. Berent, L. Burgholzer, and R. Wille, "Software Tools for Decoding Quantum Low-Density Parity Check Codes," in Asia and South Pacific Design Automation Conference (ASP-DAC), 2023

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

mqt.qecc-1.0.1.tar.gz (1.5 MB view hashes)

Uploaded Source

Built Distributions

mqt.qecc-1.0.1-cp311-cp311-manylinux_2_28_x86_64.whl (17.4 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

mqt.qecc-1.0.1-cp311-cp311-macosx_10_15_x86_64.whl (4.1 MB view hashes)

Uploaded CPython 3.11 macOS 10.15+ x86-64

mqt.qecc-1.0.1-cp310-cp310-manylinux_2_28_x86_64.whl (17.4 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

mqt.qecc-1.0.1-cp310-cp310-macosx_10_15_x86_64.whl (4.1 MB view hashes)

Uploaded CPython 3.10 macOS 10.15+ x86-64

mqt.qecc-1.0.1-cp39-cp39-manylinux_2_28_x86_64.whl (17.4 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

mqt.qecc-1.0.1-cp39-cp39-macosx_10_15_x86_64.whl (4.1 MB view hashes)

Uploaded CPython 3.9 macOS 10.15+ x86-64

mqt.qecc-1.0.1-cp38-cp38-manylinux_2_28_x86_64.whl (17.4 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

mqt.qecc-1.0.1-cp38-cp38-macosx_10_15_x86_64.whl (4.1 MB view hashes)

Uploaded CPython 3.8 macOS 10.15+ x86-64

mqt.qecc-1.0.1-cp37-cp37m-manylinux_2_28_x86_64.whl (17.4 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.28+ x86-64

mqt.qecc-1.0.1-cp37-cp37m-macosx_10_15_x86_64.whl (4.1 MB view hashes)

Uploaded CPython 3.7m macOS 10.15+ x86-64

Supported by

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