cda-tum / mqt-qecc

MQT QECC - Tools for Quantum Error Correcting Codes
MIT License
93 stars 11 forks source link

Ftsp #234

Closed pehamTom closed 1 week ago

pehamTom commented 1 month ago

Description

This PR adds methods for synthesizing and simulating fault-tolerant state preparation circuits for CSS codes.

The main functionality introduced is:

Furthermore, this PR introduces a CSSCode class for convenience and adapts existing code implementations to conform to this class. For example, the HexagonalColorCode class now inherits from CSSCode. Some sample CSS codes are provided that can be directly imported via the CSSCode class.

Checklist:

burgholzer commented 1 month ago

You can ignore the macos-wheels job failure for now as it is broken at the moment.

codecov[bot] commented 4 weeks ago

Codecov Report

Attention: Patch coverage is 78.91098% with 244 lines in your changes missing coverage. Please review.

Project coverage is 82.7%. Comparing base (2ed6ce7) to head (40d3427). Report is 2 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/cda-tum/mqt-qecc/pull/234/graphs/tree.svg?width=650&height=150&src=pr&token=OAw9kgumkt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum)](https://app.codecov.io/gh/cda-tum/mqt-qecc/pull/234?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) ```diff @@ Coverage Diff @@ ## main #234 +/- ## ======================================= - Coverage 85.0% 82.7% -2.3% ======================================= Files 25 29 +4 Lines 2024 3170 +1146 Branches 190 190 ======================================= + Hits 1721 2623 +902 - Misses 303 547 +244 ``` | [Flag](https://app.codecov.io/gh/cda-tum/mqt-qecc/pull/234/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | Coverage Δ | | *Carryforward flag | |---|---|---|---| | [cpp](https://app.codecov.io/gh/cda-tum/mqt-qecc/pull/234/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | `80.2% <ø> (ø)` | | Carriedforward from [2ed6ce7](https://app.codecov.io/gh/cda-tum/mqt-qecc/commit/2ed6ce7220e4d49abd30e173f4ed5ae7f7708f84?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | | [python](https://app.codecov.io/gh/cda-tum/mqt-qecc/pull/234/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | `83.7% <78.9%> (-5.2%)` | :arrow_down: | | *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) to find out more. | [Files](https://app.codecov.io/gh/cda-tum/mqt-qecc/pull/234?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | Coverage Δ | | |---|---|---| | [src/mqt/qecc/\_\_init\_\_.py](https://app.codecov.io/gh/cda-tum/mqt-qecc/pull/234?src=pr&el=tree&filepath=src%2Fmqt%2Fqecc%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xZWNjL19faW5pdF9fLnB5) | `100.0% <100.0%> (ø)` | | | [src/mqt/qecc/cc\_decoder/color\_code.py](https://app.codecov.io/gh/cda-tum/mqt-qecc/pull/234?src=pr&el=tree&filepath=src%2Fmqt%2Fqecc%2Fcc_decoder%2Fcolor_code.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xZWNjL2NjX2RlY29kZXIvY29sb3JfY29kZS5weQ==) | `91.4% <100.0%> (-1.3%)` | :arrow_down: | | [src/mqt/qecc/ft\_stateprep/\_\_init\_\_.py](https://app.codecov.io/gh/cda-tum/mqt-qecc/pull/234?src=pr&el=tree&filepath=src%2Fmqt%2Fqecc%2Fft_stateprep%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xZWNjL2Z0X3N0YXRlcHJlcC9fX2luaXRfXy5weQ==) | `100.0% <100.0%> (ø)` | | | [src/mqt/qecc/code.py](https://app.codecov.io/gh/cda-tum/mqt-qecc/pull/234?src=pr&el=tree&filepath=src%2Fmqt%2Fqecc%2Fcode.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xZWNjL2NvZGUucHk=) | `83.7% <83.7%> (ø)` | | | [src/mqt/qecc/ft\_stateprep/simulation.py](https://app.codecov.io/gh/cda-tum/mqt-qecc/pull/234?src=pr&el=tree&filepath=src%2Fmqt%2Fqecc%2Fft_stateprep%2Fsimulation.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xZWNjL2Z0X3N0YXRlcHJlcC9zaW11bGF0aW9uLnB5) | `85.5% <85.5%> (ø)` | | | [src/mqt/qecc/ft\_stateprep/state\_prep.py](https://app.codecov.io/gh/cda-tum/mqt-qecc/pull/234?src=pr&el=tree&filepath=src%2Fmqt%2Fqecc%2Fft_stateprep%2Fstate_prep.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xZWNjL2Z0X3N0YXRlcHJlcC9zdGF0ZV9wcmVwLnB5) | `75.7% <75.7%> (ø)` | |