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

Algorithm and Circuit Improvements #22

Merged
merged 71 commits into from
Nov 30, 2021

Conversation

burgholzer
Copy link
Member

@burgholzer burgholzer commented Nov 15, 2021

This PR primarily brings many improvements for pre-defined algorithms and the handling of dynamic circuits. In particular it:

  • ⚡ switches the extraction of the probability amplitudes of a dynamic circuits to sparse vectors for increased performance and scalability
  • ⚡ significantly improves the QPE algorithms:
    • ♻️ unifies QPE and IQPE algorithms, eliminating lots of redundant code
    • ♻️ switches up gate order in QPE algorithm for better performance
    • 🐛 fixes some bugs that prevented the QPE algorithms from working for more than 32 qubits
    • ✅ adapts dynamic circuit tests for new improvements
  • ⚡ significantly improves the BV algorithm
    • 🐛 fixes algorithm implementation
    • ✨ adds dynamic circuit variant
    • ✨ adds routine that automatically generated an instance for a given number of qubits
    • ✅ adds tests for new functions
  • ⚡ Improves Grover's algorithm
    • ⚡ DD-tailoring for diffusion operation
    • ⚡ improves algorithm description so that it works for an arbitrary number of qubits
  • ⚡ Improves QFT algorithm
    • ⚡ DD-tailoring for order of operations
    • ✨ adds dynamic circuit variant
    • ✅ adds tests for new functions
  • ⚡ DD-tailoring for GHZ state preparation
  • 🐛 fixes an endianness and a reference counting bug in the simulate routine with measurements
  • 🐛 reduces the parameter tolerance to the level of the default decision diagram package tolerance in order to introduce less approximations when reading in circuits
  • ✨ introduces a new optimization pass that allows to reorder the operations in a QuantumComputation to achieve a canonical ordering
  • ⬆️ updates all external dependencies to their latest version.

Depends on cda-tum/dd_package#26.

@burgholzer burgholzer added bug Something isn't working enhancement New feature or request labels Nov 15, 2021
@burgholzer burgholzer requested a review from hillmich November 15, 2021 23:35
@burgholzer burgholzer self-assigned this Nov 15, 2021
@codecov
Copy link

codecov bot commented Nov 15, 2021

Codecov Report

Merging #22 (ca3ff98) into master (d60362d) will increase coverage by 0.2%.
The diff coverage is 83.9%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master     #22     +/-   ##
========================================
+ Coverage    80.3%   80.5%   +0.2%     
========================================
  Files          41      41             
  Lines        6603    6947    +344     
========================================
+ Hits         5305    5597    +292     
- Misses       1298    1350     +52     
Impacted Files Coverage Δ
include/Definitions.hpp 77.7% <ø> (ø)
include/operations/OpType.hpp 0.0% <0.0%> (ø)
include/operations/Operation.hpp 93.6% <ø> (ø)
include/QuantumComputation.hpp 89.5% <50.0%> (-0.1%) ⬇️
src/CircuitOptimizer.cpp 82.4% <71.0%> (-1.8%) ⬇️
src/QuantumComputation.cpp 74.3% <77.2%> (+0.2%) ⬆️
test/algorithms/eval_dynamic_circuits.cpp 86.7% <86.2%> (-1.5%) ⬇️
src/algorithms/QPE.cpp 86.9% <97.6%> (+1.5%) ⬆️
src/algorithms/BernsteinVazirani.cpp 100.0% <100.0%> (ø)
src/algorithms/Entanglement.cpp 100.0% <100.0%> (ø)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d60362d...ca3ff98. Read the comment docs.

🐛 fixed BV algorithm which was not implemented properly
✨ added dynamic circuit variant of BV algorithm
✨ added routine that automatically generated an instance for a given number of qubits
✅ added tests for new functions
⚡ DD-tailoring for diffusion operation
⚡ improve algorithm description so that it works for an arbitrary number of qubits

Signed-off-by: burgholzer <[email protected]>
@burgholzer burgholzer changed the title Improvements for dynamic circuits Algorithm and Circuit Improvements Nov 16, 2021
burgholzer and others added 4 commits November 16, 2021 16:26
burgholzer and others added 18 commits November 19, 2021 10:26
Signed-off-by: Lukas Burgholzer <[email protected]>
Signed-off-by: Lukas Burgholzer <[email protected]>
Signed-off-by: Lukas Burgholzer <[email protected]>
Signed-off-by: Lukas Burgholzer <[email protected]>
Copy link
Collaborator

@hillmich hillmich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@burgholzer burgholzer merged commit 8f13b50 into cda-tum:master Nov 30, 2021
@burgholzer burgholzer deleted the improved-dynamic-circuits branch November 30, 2021 16:54
burgholzer added a commit that referenced this pull request Jun 2, 2023
* ♻️ split measurement routine into probability determination and actual measurement
:sparkles: added new routine for computing the fidelity of measurement outcomes between a decision diagram and a state array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants