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

🐛 Fix dynamic circuit detection #687

Merged
merged 2 commits into from
Sep 9, 2024
Merged

Conversation

burgholzer
Copy link
Member

Description

The previous implementation of the isDynamicCircuit check would falsely report a circuit to not be dynamic if the circuit contains multiple measurements on one qubit.
This PR fixes the underlying error and refactors the logic of the respective method to handle more cases.

This was discovered while working on cda-tum/mqt-qcec#439

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.

Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
@burgholzer burgholzer added fix Fix for something that isn't working Core Anything related to the Core library and IR c++ Anything related to C++ code labels Sep 9, 2024
@burgholzer burgholzer self-assigned this Sep 9, 2024
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 84.37500% with 5 lines in your changes missing coverage. Please review.

Project coverage is 87.1%. Comparing base (738d181) to head (1a30ac3).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/circuit_optimizer/CircuitOptimizer.cpp 84.3% 5 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #687   +/-   ##
=====================================
  Coverage   87.1%   87.1%           
=====================================
  Files        125     125           
  Lines      13781   13769   -12     
  Branches    2164    2156    -8     
=====================================
- Hits       12005   12003    -2     
+ Misses      1776    1766   -10     
Flag Coverage Δ
cpp 86.7% <84.3%> (+<0.1%) ⬆️
python 99.7% <ø> (ø)
Files with missing lines Coverage Δ
src/circuit_optimizer/CircuitOptimizer.cpp 88.6% <84.3%> (+0.7%) ⬆️

... and 1 file with indirect coverage changes

@burgholzer burgholzer enabled auto-merge (squash) September 9, 2024 15:24
@burgholzer burgholzer merged commit fd64943 into main Sep 9, 2024
32 of 33 checks passed
@burgholzer burgholzer deleted the fix-is-dynamic-circuit branch September 9, 2024 17:06
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 fix Fix for something that isn't working
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant