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 endianness in DCX and XX_minus_YY gate matrix definition #741

Merged
merged 4 commits into from
Oct 26, 2024

Conversation

burgholzer
Copy link
Member

Description

This has been brought up as in cda-tum/mqt-qcec/issues/489.
Turns out the endianness of the DCX gate matrix was wrong and this has not been detected because the tests where multiplying the gates of the definition for verification purposes in the wrong order.
After adjusting the tests, another incorrect endianness result popped up for the xx_minus_yy gate.

Both issues have now been fixed.

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 has not been caught before since the corresponding functional test applied the gates in the wrong order.

Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
@burgholzer burgholzer self-assigned this Oct 26, 2024
@burgholzer burgholzer added fix Fix for something that isn't working DD Anything related to the DD package c++ Anything related to C++ code labels Oct 26, 2024
@burgholzer burgholzer enabled auto-merge (squash) October 26, 2024 14:09
Copy link

codecov bot commented Oct 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.1%. Comparing base (dcda5c1) to head (4961a2c).
Report is 129 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #741     +/-   ##
=======================================
- Coverage   92.2%   92.1%   -0.2%     
=======================================
  Files        125     125             
  Lines      13739   13770     +31     
  Branches    2158    2157      -1     
=======================================
+ Hits       12678   12684      +6     
- Misses      1061    1086     +25     
Flag Coverage Δ
cpp 91.8% <100.0%> (-0.2%) ⬇️
python 99.7% <ø> (ø)
Files with missing lines Coverage Δ
include/mqt-core/dd/GateMatrixDefinitions.hpp 100.0% <100.0%> (ø)

... and 16 files with indirect coverage changes

@burgholzer burgholzer merged commit 9f885e4 into main Oct 26, 2024
28 checks passed
@burgholzer burgholzer deleted the fix-endianness branch October 26, 2024 14:21
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 DD Anything related to the DD package 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