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

♻️ optimize isDynamic check and move to QuantumComputation class #689

Merged
merged 4 commits into from
Sep 11, 2024

Conversation

burgholzer
Copy link
Member

Description

This PR optimizes the isDynamic(Circuit) check by simplifying the overall implementation and making the function const.
Furthermore, the function is moved from the CircuitOptimizer to the QuantumComputation class itself.

Last, but not least, this PR fixes an issue in the CMake configuration that would prevent the algorithm tests to run properly.

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.

@burgholzer burgholzer self-assigned this Sep 11, 2024
@burgholzer burgholzer added enhancement New feature or request refactor Anything related to code refactoring Core Anything related to the Core library and IR c++ Anything related to C++ code labels Sep 11, 2024
Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.1%. Comparing base (8ee8fdb) to head (0b11e9d).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #689     +/-   ##
=======================================
+ Coverage   87.1%   92.1%   +4.9%     
=======================================
  Files        125     125             
  Lines      13770   13780     +10     
  Branches    2156    2153      -3     
=======================================
+ Hits       11995   12692    +697     
+ Misses      1775    1088    -687     
Flag Coverage Δ
cpp 91.8% <100.0%> (+5.1%) ⬆️
python 99.7% <ø> (ø)
Files with missing lines Coverage Δ
include/mqt-core/ir/QuantumComputation.hpp 92.4% <100.0%> (+0.4%) ⬆️
src/circuit_optimizer/CircuitOptimizer.cpp 90.2% <100.0%> (+1.5%) ⬆️
src/ir/QuantumComputation.cpp 84.3% <100.0%> (+1.1%) ⬆️

... and 17 files with indirect coverage changes

@burgholzer burgholzer merged commit bcb8371 into main Sep 11, 2024
33 checks passed
@burgholzer burgholzer deleted the optimize-is-dynamic-implementation branch September 11, 2024 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Anything related to C++ code Core Anything related to the Core library and IR enhancement New feature or request refactor Anything related to code refactoring
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant