Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Analog information decoding #183

Merged
merged 130 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
f9eb191
init commit
lucasberent Nov 2, 2023
068f2a4
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 2, 2023
43c18bb
add link to raw simulation data
lucasberent Nov 2, 2023
feefba9
Merge remote-tracking branch 'origin/analog-information-decoding' int…
lucasberent Nov 2, 2023
b2c92dd
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 2, 2023
7836157
add bp parameter plots
lucasberent Nov 3, 2023
a53c4bf
Merge remote-tracking branch 'origin/analog-information-decoding' int…
lucasberent Nov 3, 2023
535fe85
adapt readmes
lucasberent Nov 3, 2023
fa22c8d
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 3, 2023
0f8cbb6
rename top module
lucasberent Nov 3, 2023
7edebf8
adapt readme
lucasberent Nov 3, 2023
520a49f
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 3, 2023
8510c48
fix relative imports
lucasberent Nov 3, 2023
25caf4a
Merge remote-tracking branch 'origin/analog-information-decoding' int…
lucasberent Nov 3, 2023
dc6382b
update bp parameter comparisons overview
lucasberent Nov 3, 2023
7b28c6c
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 3, 2023
2c0ea05
fix some mypy issues
lucasberent Nov 8, 2023
637054c
mypy fixes
lucasberent Nov 8, 2023
42f0a3e
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 8, 2023
0819fdd
down to 30 mypy errors
lucasberent Nov 8, 2023
56602d9
fix mypy :)
lucasberent Nov 9, 2023
b0fd8ba
further fixes
lucasberent Nov 9, 2023
3932993
maybe fix mypy
lucasberent Nov 9, 2023
0aae41b
try to make formatter happier
lucasberent Nov 13, 2023
2c1df62
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 13, 2023
c5a20f8
small fixes
lucasberent Nov 13, 2023
1af9236
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 13, 2023
c0ceec5
ignore some ruff type warnings for now
lucasberent Nov 13, 2023
50ea9bf
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 13, 2023
9b69cb6
Merge branch 'main' into analog-information-decoding
burgholzer Nov 14, 2023
f18ebb1
🔧 run pre-commit autoupdate
burgholzer Nov 14, 2023
fe1b22d
⬆️ update ruff configuration
burgholzer Nov 14, 2023
1c47233
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 14, 2023
a9c869f
move tests to proper directory
lucasberent Nov 15, 2023
f825057
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 15, 2023
7f7e560
move readme to doc
lucasberent Nov 15, 2023
9302579
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 15, 2023
60f7024
make ruff happy and readme update
lucasberent Nov 21, 2023
ad2952b
adapt config of mypy and codecov
lucasberent Nov 24, 2023
a1ee2ed
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 24, 2023
009ebe7
fix ruff ignore
lucasberent Nov 24, 2023
46a4d4f
maybe fix rst warnings with code mentions
lucasberent Nov 24, 2023
b7a5161
mypy ignores
lucasberent Nov 24, 2023
9d11b4a
Merge branch 'main' into analog-information-decoding
lucasberent Nov 24, 2023
cbbcbab
remove unnecessary ignores
lucasberent Nov 24, 2023
725fc87
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 24, 2023
995da03
fix codespell issues
lucasberent Nov 24, 2023
34e7092
ignore ser (=syndrome error rate) in codespell
lucasberent Nov 25, 2023
fc20a6c
try fix mypy exclude toml strings
lucasberent Nov 25, 2023
7c548e1
maybe fix precommit improper capitalization warning
lucasberent Nov 25, 2023
b8bb62e
try fix mypy ignore with precommit integration
lucasberent Nov 25, 2023
c371a2a
add atd example script
lucasberent Nov 25, 2023
30c9371
add some atd sim tests
lucasberent Nov 25, 2023
6654194
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 25, 2023
e640041
more tests
lucasberent Nov 25, 2023
4433922
push merges
lucasberent Nov 26, 2023
c1ae230
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 26, 2023
d9bf296
try include test dependencies
lucasberent Nov 29, 2023
49210ee
Merge remote-tracking branch 'origin/analog-information-decoding' int…
lucasberent Nov 29, 2023
cc49dbf
add dependency to .toml
lucasberent Nov 29, 2023
b084dfe
remove abs path
lucasberent Nov 29, 2023
1c251b4
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 29, 2023
b04387c
try to include numba in readthedocs requirements
lucasberent Nov 29, 2023
1985cf2
merge
lucasberent Nov 29, 2023
2082ee3
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 29, 2023
c7db572
readthedocs requirements
lucasberent Nov 29, 2023
ea0f984
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 29, 2023
df20631
try unfix numba
lucasberent Nov 29, 2023
5730641
add numba for docs dependency
lucasberent Nov 29, 2023
8acdb3c
add docs pymatching dependency
lucasberent Nov 29, 2023
fa2c964
try fix some mypy warnings
lucasberent Nov 29, 2023
8a1eb2f
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 29, 2023
fdc9eb2
maybe fix mypy
lucasberent Nov 29, 2023
ffdf285
fix more mypy
lucasberent Nov 30, 2023
520cf35
try fix more mypy
lucasberent Nov 30, 2023
db2a83c
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 30, 2023
6a1f279
fix more mypy
lucasberent Nov 30, 2023
ceeeddc
mypy fixes
lucasberent Nov 30, 2023
06b0ecc
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 30, 2023
3d5f85d
fixing mypy ctd
lucasberent Nov 30, 2023
7e1f4a1
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 30, 2023
f09270f
mypy ctd
lucasberent Nov 30, 2023
aaaf828
refactor AtdSmulator code param passing
lucasberent Nov 30, 2023
986e752
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 30, 2023
76cd150
remove unnecessary file
lucasberent Nov 30, 2023
cf757dc
fix tests
lucasberent Nov 30, 2023
bd79980
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 30, 2023
c1da240
try fix tests
lucasberent Nov 30, 2023
c1304e3
remove file
lucasberent Nov 30, 2023
7d7cf1e
try fix pipeline
lucasberent Nov 30, 2023
cf01a44
try fix tests
lucasberent Nov 30, 2023
101f1ca
fix some tests
lucasberent Nov 30, 2023
1effc0c
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 30, 2023
f46a578
add deprecation warning ignore
lucasberent Nov 30, 2023
3056525
add decode mr test
lucasberent Nov 30, 2023
6180f76
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 30, 2023
f8fc87d
improve tests, add fixtures
lucasberent Dec 1, 2023
8a4645d
commit merge changes
lucasberent Dec 1, 2023
5df5ac1
add some basic tests for single shot simulator
lucasberent Dec 1, 2023
0ea8eb5
fix memory experiment test
lucasberent Dec 3, 2023
0624a6c
mypy stuff
lucasberent Dec 3, 2023
0bec282
add test for run
lucasberent Dec 3, 2023
e69e7c8
🎨 pre-commit fixes
pre-commit-ci[bot] Dec 3, 2023
b009fee
trying to make codecov happy
lucasberent Dec 4, 2023
dfb40b2
Merge branch 'main' into analog-information-decoding
lucasberent Dec 8, 2023
15bdf17
disable numba for ci codecov action
lucasberent Dec 8, 2023
d2f59b2
Merge remote-tracking branch 'origin/analog-information-decoding' int…
lucasberent Dec 8, 2023
dcb759b
add missing dependencies
lucasberent Dec 18, 2023
157a2ef
⬆️ update to latest mqt-core
burgholzer Dec 18, 2023
2f2965f
⬆️ update pre-commit
burgholzer Dec 18, 2023
21333c9
⚗️ try to fix deprecation warning
burgholzer Dec 18, 2023
fcb5359
Merge remote-tracking branch 'origin/analog-information-decoding' int…
burgholzer Dec 18, 2023
d168939
Apply suggestions from code review
burgholzer Dec 18, 2023
9013684
🔧 update ruff config
burgholzer Dec 18, 2023
dd1ec9d
🔧 update noxfile and loosen scikit-build-core requirement
burgholzer Dec 18, 2023
555e61e
🔥 remove unnecessary files
burgholzer Dec 18, 2023
ff3ad6c
✏️ fix indentation
burgholzer Dec 18, 2023
9e50fd7
🔥 remove unnecessary `__init__.py` files
burgholzer Dec 18, 2023
d85a8e7
⬇️ downgrade to prettier 3.1.0
burgholzer Dec 18, 2023
fa3a42c
⬇️ downgrade to cpp-linter 2.7.2
burgholzer Dec 18, 2023
e12483a
🩹 re-add necessary `__init__.py`
burgholzer Dec 18, 2023
f985743
🏷️ use proper `numpy.typing` import
burgholzer Dec 18, 2023
33c3195
mypy ignores and codeql
lucasberent Dec 20, 2023
b7a0718
codeql
lucasberent Dec 20, 2023
1b4e21d
🎨 clean up code
burgholzer Dec 22, 2023
bbfc2c6
⬆️ update mqt-core
burgholzer Dec 22, 2023
83d8323
⬆️ update GitHub actions
burgholzer Dec 22, 2023
b2a1ac5
⬆️ update pre-commit
burgholzer Dec 22, 2023
b95e4b1
🚨 loosen ruff exclusions and fix a couple more warnings
burgholzer Dec 22, 2023
88c7c99
🚨 also lint code construction
burgholzer Dec 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions src/mqt/qecc/analog-information-decoding/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
*.mtx
*.json
ldpc2/*
generated_codes/*
results/*
21 changes: 21 additions & 0 deletions src/mqt/qecc/analog-information-decoding/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Lucas Berent, Timo Hillmann

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
52 changes: 52 additions & 0 deletions src/mqt/qecc/analog-information-decoding/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Analog Information Decoding

This submodule provides means to conduct decoding simulations for quantum CSS codes with
analog syndrome information as proposed in the corresponding paper [1].
Proper integration and setup is a work in progress.
The main functionality is provided in the `simulators` module, which contains the main classes
that can be used to conduct several types of simulations:

* `ATD_Simulator`: Analog Tanner graph decoding,
* `Single-Shot Simulator`: Analog Single-Shot decoding with meta checks.
* `QSS_Simulator`: Quasi-Single-Shot decoding, and

Moreover, `memory_experiment` contains methods for analog overlapping window decoding, in
particular the `decode_multiround` method.

## Results

The `results` directory contains the results used in the paper [1].

## Codes

The `codes` directory contains the parity-check matrices of the codes used in the paper [1].
Three dimensional toric codes can either be constructed with the hypergraph product construction
or with a library, e.g., panqec [3].
### Code construction

The `code_construction` directory contains the code used to construct higher-dimensional hypergraph
product codes and used the `compute_distances.sh` script to automatically compute bounds on the
distances of the constructed codes using the GAP library QDistRnd.

## Utils

### Plotting

The `plotting` directory contains the code used to plot the results in the paper [1].

### Data Utils

We have implemented several utility functions as part of this package that might be of independent
interest for decoding simulations and data analysis. These are provided in the `data_utils` module
in the `utils` package.

## Dependencides

The used BP+OSD implementation, as well as our implementation of the SSMSA decoder are provided
in the LDPC2 package a preliminary beta version of which is available on Github [2].

## References

- [1]: L. Berent, T. Hillmann et al.: https://arxiv.org/TODO
- [2]: J. Roffe et al. https://github.com/quantumgizmos/ldpc/tree/ldpc_v2
- [3]: E. Huang et al. https://github.com/panqec/panqec
11 changes: 11 additions & 0 deletions src/mqt/qecc/analog-information-decoding/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from simulators.analog_tannergraph_decoding import AnalogTannergraphDecoder, SoftInfoDecoder, ATD_Simulator
from simulators.quasi_single_shot_v2 import QSS_SimulatorV2
from simulators.simulation import Single_Shot_Simulator

__all__ = [
"AnalogTannergraphDecoder",
"SoftInfoDecoder",
"ATD_Simulator",
"QSS_SimulatorV2",
"Single_Shot_Simulator",
]
Empty file.
Loading
Loading