C++ implemenation of UnionFind with a python binding
Project description
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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for UnionFindPy-0.3.0.dev0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65fa91903496012efb60558f8ac21c4e9df191f8c422ae4a515d09247d8e6338 |
|
MD5 | 95d317c50ee39f89bd63aac7fbb81067 |
|
BLAKE2b-256 | f9bfd6c446ac0b21ced2fdde0ee922f21ef36c0c8f79f62cda427abe226c5385 |
Hashes for UnionFindPy-0.3.0.dev0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae24fa25f730e7790e200972f9033c7637392659cded870595cf8c45a5939e61 |
|
MD5 | 47270fa60118916355587c3a6e8064bd |
|
BLAKE2b-256 | 996f649f229c1df169b39ba6b31d4f46a7a799b79d3cec2c66462d7d6014221a |
Hashes for UnionFindPy-0.3.0.dev0-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5e6d57a4456a17a0c18d04ba12752b7ea88f3543de357609718902b386b1c1c |
|
MD5 | f007859d2544756d397e018c828b8374 |
|
BLAKE2b-256 | db4061561f1220c6409171371c7e4293ecf880b22835e144ff9e6e28e579eb5c |
Hashes for UnionFindPy-0.3.0.dev0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a23febf5ef02134ebf747998fc13849f79a18640ee456b3cb064743d81f6ddf6 |
|
MD5 | b42c323c29401c7c73f36b0592a532a9 |
|
BLAKE2b-256 | 89233f524a39c5802624576d2a8939d34744cb78efd3208bc0b224925eee5101 |
Hashes for UnionFindPy-0.3.0.dev0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d1fcf366d1c1459643f741ae64931f95f0e76b53343a767d2d1f99da3fa8a2f |
|
MD5 | c387c3662bfb7cd520ad44a4a3bc99fd |
|
BLAKE2b-256 | aade13218f40fded38fec3e39ef72762c461aead211b28d6692382f8b7f6259e |
Hashes for UnionFindPy-0.3.0.dev0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f25c633d6a3310d6ccdaaefa821e0675f954120a904be6495f3dd072ebe5b4f |
|
MD5 | 4a3c3848997ce283cc2de479b2e1bd73 |
|
BLAKE2b-256 | a8a42952131a462c305e4afbfb2e5dd34f07661c3d93becc219f69580182d4a8 |
Hashes for UnionFindPy-0.3.0.dev0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aef37607d07c0eb9633fe79da02a4179c1b7a884195dd0491a6a5032d2c2bd69 |
|
MD5 | faccceaf96cf96447c0f78804b1c6d7f |
|
BLAKE2b-256 | 7d63380687ebd581293d974834bc39e39a1c94eb2a40bc376801734283999235 |
Hashes for UnionFindPy-0.3.0.dev0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca2fac99754c9e82cbc558ce2cc5446521421d6b31d9da49e2e1d7f82c627f42 |
|
MD5 | 6da06a5744f93702c678d29472258456 |
|
BLAKE2b-256 | 7828c9540e3a7d813ce9e84e92262652294b2df9cc8042bf839ca661ada150f4 |
Hashes for UnionFindPy-0.3.0.dev0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 665ca63fe2fc3fbbce39266ab43f4037a6e47391c063bb59ebd8804a9248f426 |
|
MD5 | 781edeffcc4fef4259307dbad09e179f |
|
BLAKE2b-256 | 5763034f0f3a26e7a5260d0bc7213758d6c0567add6aa8c830b012c0eac05c26 |
Hashes for UnionFindPy-0.3.0.dev0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 778f1b49a1a9ac8ffd8c6d84f329d2f78e287d2c68692d6c4b2f7e36d6928de4 |
|
MD5 | f4ebb63b8794b535e372dd155a5d1cd7 |
|
BLAKE2b-256 | 221f8147909d9bfe785b081b18eb6e0acebbde5b5dffab2695be3fa8582a713b |
Hashes for UnionFindPy-0.3.0.dev0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10aa27e87b16af5e3a3d5fe741ff14cd006b191b7083b09089ff50e62e5956e9 |
|
MD5 | 37c86a7915c86898963e69cf877f6e44 |
|
BLAKE2b-256 | 881819b68bc7470e831c90bee69cf159689b9639e4bf81f77a5227230aa66aed |