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

♻️ Refactor handling of Barrier operations #394

Merged
merged 1 commit into from
Aug 10, 2023
Merged

Conversation

burgholzer
Copy link
Member

Description

This commit refactors how the Barrier operations are handled across the operations, moving it from non-unitary operations to the standard operations. The changes include updates in the display of the barriers and how they are parsed in the QASMParser, along with modifications in the operation files and test files. This change improves code structure allowing a more consistent handling of operations. Barriers are essentially No-Ops, so there is no reason for them to be non-unitary.

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.

This commit refactors how the quantum barriers are handled across the operations, moving it from nonunitary operations to the standard operations. The changes include updates in the display of the barriers and how they are parsed in the QASMParser, along with modifications in the operation files and test files. This change improves code structure allowing a more consistent handling of operations.

Signed-off-by: Lukas Burgholzer <[email protected]>
@burgholzer burgholzer added refactor Anything related to code refactoring code quality Code quality improvements Core Anything related to the Core library and IR c++ Anything related to C++ code labels Aug 9, 2023
@burgholzer burgholzer added this to the MQT Core milestone Aug 9, 2023
@burgholzer burgholzer self-assigned this Aug 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

Cpp-Linter Report ✔️

No problems need attention.

Have any feedback or feature suggestions? Share it here.

@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Merging #394 (ea3842e) into main (5982ba7) will increase coverage by 0.0%.
The diff coverage is 92.7%.

@@          Coverage Diff          @@
##            main    #394   +/-   ##
=====================================
  Coverage   89.2%   89.3%           
=====================================
  Files         98      98           
  Lines      11661   11655    -6     
  Branches    2090    2087    -3     
=====================================
+ Hits       10411   10413    +2     
+ Misses      1250    1242    -8     
Files Changed Coverage Δ
include/operations/OpType.hpp 89.4% <ø> (ø)
src/operations/StandardOperation.cpp 93.2% <75.0%> (+0.4%) ⬆️
src/CircuitOptimizer.cpp 85.1% <92.3%> (+1.0%) ⬆️
include/QuantumComputation.hpp 93.8% <100.0%> (-0.1%) ⬇️
include/operations/NonUnitaryOperation.hpp 100.0% <100.0%> (ø)
include/operations/Operation.hpp 94.9% <100.0%> (+0.1%) ⬆️
src/QuantumComputation.cpp 76.8% <100.0%> (ø)
src/operations/NonUnitaryOperation.cpp 94.7% <100.0%> (-0.6%) ⬇️
src/operations/Operation.cpp 89.8% <100.0%> (+0.3%) ⬆️
src/parsers/QASMParser.cpp 97.8% <100.0%> (ø)

... and 1 file with indirect coverage changes

@burgholzer burgholzer merged commit f36e71c into main Aug 10, 2023
46 checks passed
@burgholzer burgholzer deleted the promote-barrier branch August 10, 2023 15: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 code quality Code quality improvements Core Anything related to the Core library and IR refactor Anything related to code refactoring
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant