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

Ftsp #234

Merged
merged 68 commits into from
Jul 18, 2024
Merged

Ftsp #234

merged 68 commits into from
Jul 18, 2024

Conversation

pehamTom
Copy link
Member

@pehamTom pehamTom commented Jun 25, 2024

Description

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

The main functionality introduced is:

  • Optimal and heuristic synthesis of non-ft state preparation circuits
  • Optimal and heuristic verification of a non-ft state preparation circuit
  • Simulation methods to numerically estimate the logical error rate of a state-preparation circuit

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:

  • The pull request only contains commits that are related to it.
  • I have added appropriate tests and documentation.
  • I have made sure that all CI jobs on GitHub pass.
  • The pull request introduces no new warnings and follows the project's style guidelines.

src/mqt/qecc/ft_stateprep/simulation.py Fixed Show fixed Hide fixed
src/mqt/qecc/ft_stateprep/state_prep.py Fixed Show fixed Hide fixed
src/mqt/qecc/ft_stateprep/state_prep.py Fixed Show fixed Hide fixed
test/python/ft_stateprep/test_stateprep.py Fixed Show fixed Hide fixed
src/mqt/qecc/ft_stateprep/state_prep.py Fixed Show fixed Hide fixed
test/python/ft_stateprep/test_stateprep.py Fixed Show fixed Hide fixed
test/python/ft_stateprep/test_stateprep.py Fixed Show fixed Hide fixed
test/python/ft_stateprep/test_stateprep.py Fixed Show fixed Hide fixed
src/mqt/qecc/code.py Fixed Show fixed Hide fixed
@burgholzer
Copy link
Member

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

Copy link

codecov bot commented Jul 3, 2024

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 122 commits behind head on main.

Files with missing lines Patch % Lines
src/mqt/qecc/ft_stateprep/state_prep.py 75.7% 187 Missing ⚠️
src/mqt/qecc/ft_stateprep/simulation.py 85.5% 35 Missing ⚠️
src/mqt/qecc/code.py 83.7% 22 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           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 Coverage Δ *Carryforward flag
cpp 80.2% <ø> (ø) Carriedforward from 2ed6ce7
python 83.7% <78.9%> (-5.2%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
src/mqt/qecc/__init__.py 100.0% <100.0%> (ø)
src/mqt/qecc/cc_decoder/color_code.py 91.4% <100.0%> (-1.3%) ⬇️
src/mqt/qecc/ft_stateprep/__init__.py 100.0% <100.0%> (ø)
src/mqt/qecc/code.py 83.7% <83.7%> (ø)
src/mqt/qecc/ft_stateprep/simulation.py 85.5% <85.5%> (ø)
src/mqt/qecc/ft_stateprep/state_prep.py 75.7% <75.7%> (ø)

pehamTom added 3 commits July 3, 2024 10:25
One function call was not passed the `zero_state` flag so sometimes the wrong state was prepared.
@burgholzer burgholzer mentioned this pull request Jul 3, 2024
4 tasks
@burgholzer burgholzer added python Pull requests that update Python code feature New feature or request minor Minor version update labels Jul 17, 2024
@pehamTom pehamTom merged commit bc00666 into main Jul 18, 2024
23 of 25 checks passed
@pehamTom pehamTom deleted the ftsp branch July 18, 2024 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request minor Minor version update python Pull requests that update Python code
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants