Skip to content

C++ implementation of Union-Find decoder and its Python binding.

License

Notifications You must be signed in to change notification settings

chaeyeunpark/UnionFind

Repository files navigation

UnionFind

Documentation Status CodeFactor

Introduction

C++ implementation of the Union-Find decoder arXiv:1709:06218. Python interface is also implemented using pybind11.

Based on a Python implementation by Kai Meinerz.

Under the LGPL lisence.

This repository includes codes for arXiv:2101.07285 which explores a machine learning assisted preprocessing combined with conventional decoders such as minimum-weight perfect matching (MWPM) and the Union-Find decoder.

Installation

Currently, you can install this project by cloning the source code tree and compiling it. To clone the source tree, use git clone as

git clone https://github.com/chaeyeunpark/UnionFind.git && cd UnionFind
git submodule update --init --recursive

Then you can compile the code using

pip install -r requirements.txt
python3 setup.py install

Note that a compiler with some C++20 supports (e.g. GCC version => 10 or Clang++ version => 12) is required. For example, if you are using Ubuntu

apt install -y g++-10
CXX=g++-10 python3 setup.py install

will work.

PyPI support will be available soon.

Basic Usage

from UnionFindPy import Decoder
decoder = Decoder(parity_matrix)
decoder.decode(syndromes) # syndromes is a list of measurment outcomes of each parity operator

For details, check the document and examples directory.

Notes

This repository does not contain an implementation of weighted Union-Find decoder.

Reference

When you cite this repository, please use the following:

@misc{UnionFindCPP,
    author = {Chae-Yeun Park and Kai Meinerz},
    title = {Open-source C++ implementation of the Union-Find decoder},
    year = {2020},
    publisher = {GitHub},
    journal = {GitHub repository},
    doi = {10.5281/zenodo.10044828},
    howpublished = {\url{https://github.com/chaeyeunpark/UnionFind}}
}

About

C++ implementation of Union-Find decoder and its Python binding.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published