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

Added state preparation compiler feature #28

Merged
merged 10 commits into from
Jun 5, 2024
Merged

Added state preparation compiler feature #28

merged 10 commits into from
Jun 5, 2024

Conversation

KevinMTO
Copy link
Collaborator

@KevinMTO KevinMTO commented Jun 4, 2024

Overview:
This PR adds a new feature to the compiler, enabling it to create a sequence of (multi-controlled) operations that will prepare the circuit to a specific state input by the user.

Description:

  • Support Data Structure: Added a support data structure called "micro_dd", which resembles Decision Diagrams. This structure is used to keep track of specific elements within the state and to aid in synthesizing the operations.
  • Synthesis Routine: Implemented a routine for synthesizing state preparation circuits.
  • State Functions: Added functions to call famous states for preparation.
  • Testing: Included tests to verify the functionality of the new feature.

Checklist:

  • I have added tests that prove my feature works.
  • All new and existing tests passed.

KevinMTO and others added 6 commits April 29, 2024 09:20
# Conflicts:
#	test/python/compiler/onedit/test_log_local_adaptive_decomp.py
#	test/python/compiler/onedit/test_log_local_qr_decomp.py
#	test/python/compiler/onedit/test_propagate_virtrz.py
#	test/python/compiler/onedit/test_swap_routine.py
Copy link

codecov bot commented Jun 4, 2024

Codecov Report

Attention: Patch coverage is 84.67153% with 63 lines in your changes missing coverage. Please review.

Project coverage is 72.8%. Comparing base (de01837) to head (fa6e421).
Report is 22 commits behind head on main.

Files with missing lines Patch % Lines
src/mqt/qudits/core/micro_dd.py 79.2% 43 Missing ⚠️
...ts/compiler/state_compilation/state_preparation.py 92.8% 8 Missing ⚠️
src/mqt/qudits/quantum_circuit/circuit.py 14.2% 6 Missing ⚠️
...udits/compiler/state_compilation/retrieve_state.py 94.8% 4 Missing ⚠️
...tional_twodit_compilation/opt/distance_measures.py 66.6% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main     #28     +/-   ##
=======================================
+ Coverage   69.7%   72.8%   +3.1%     
=======================================
  Files        105     108      +3     
  Lines       4964    5375    +411     
  Branches     263     263             
=======================================
+ Hits        3462    3917    +455     
+ Misses      1502    1458     -44     
Flag Coverage Δ *Carryforward flag
cpp 73.7% <ø> (ø) Carriedforward from 695cd9e
python 72.5% <84.6%> (+4.4%) ⬆️

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

Files with missing lines Coverage Δ
src/mqt/qudits/quantum_circuit/gate.py 83.8% <100.0%> (+0.2%) ⬆️
...tional_twodit_compilation/opt/distance_measures.py 35.1% <66.6%> (+35.1%) ⬆️
...udits/compiler/state_compilation/retrieve_state.py 94.8% <94.8%> (ø)
src/mqt/qudits/quantum_circuit/circuit.py 92.9% <14.2%> (-2.7%) ⬇️
...ts/compiler/state_compilation/state_preparation.py 92.8% <92.8%> (ø)
src/mqt/qudits/core/micro_dd.py 79.2% <79.2%> (ø)

... and 11 files with indirect coverage changes

@KevinMTO KevinMTO merged commit 457f39c into main Jun 5, 2024
22 of 26 checks passed
@KevinMTO KevinMTO deleted the state_prep branch June 5, 2024 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant