Skip to main content

C++ implemenation of UnionFind with a python binding

Project description

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},
    howpublished = {\url{https://github.com/chaeyeunpark/UnionFind}}
}

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

UnionFindPy-0.2.1-cp310-cp310-win_amd64.whl (102.9 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

UnionFindPy-0.2.1-cp310-cp310-macosx_11_0_arm64.whl (97.0 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

UnionFindPy-0.2.1-cp310-cp310-macosx_10_14_x86_64.whl (97.0 kB view hashes)

Uploaded CPython 3.10 macOS 10.14+ x86-64

UnionFindPy-0.2.1-cp39-cp39-win_amd64.whl (102.5 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

UnionFindPy-0.2.1-cp39-cp39-macosx_11_0_arm64.whl (97.0 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

UnionFindPy-0.2.1-cp39-cp39-macosx_10_14_x86_64.whl (97.0 kB view hashes)

Uploaded CPython 3.9 macOS 10.14+ x86-64

UnionFindPy-0.2.1-cp38-cp38-win_amd64.whl (102.9 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

UnionFindPy-0.2.1-cp38-cp38-macosx_11_0_arm64.whl (96.9 kB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

UnionFindPy-0.2.1-cp38-cp38-macosx_10_14_x86_64.whl (96.9 kB view hashes)

Uploaded CPython 3.8 macOS 10.14+ x86-64

UnionFindPy-0.2.1-cp37-cp37m-win_amd64.whl (103.3 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

UnionFindPy-0.2.1-cp37-cp37m-macosx_10_14_x86_64.whl (96.6 kB view hashes)

Uploaded CPython 3.7m macOS 10.14+ 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