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 bug in cancelCNOTs optimization #134

Merged
merged 1 commit into from
Jun 24, 2022
Merged

Conversation

burgholzer
Copy link
Member

This PR fixes a rare bug in the cancelCNOTs optimization that popped up in QMAP when a CNOT is followed by a SWAP and the SWAP's targets are not in sorted order. This resulted in an incorrect substitution of CNOTs.

fix a rare bug in the `cancelCNOTs` optimization that popped up in QMAP when a CNOT is followed by a SWAP and the SWAP's targets are not in sorted order.
@burgholzer burgholzer added the bug Something isn't working label Jun 24, 2022
@burgholzer burgholzer self-assigned this Jun 24, 2022
@burgholzer burgholzer enabled auto-merge (squash) June 24, 2022 23:46
@codecov
Copy link

codecov bot commented Jun 24, 2022

Codecov Report

Merging #134 (63466e9) into main (c5a87d8) will not change coverage.
The diff coverage is 100.0%.

@@          Coverage Diff          @@
##            main    #134   +/-   ##
=====================================
  Coverage   82.1%   82.1%           
=====================================
  Files         44      44           
  Lines       7300    7300           
=====================================
  Hits        5999    5999           
  Misses      1301    1301           
Impacted Files Coverage Δ
src/CircuitOptimizer.cpp 86.5% <100.0%> (ø)
test/unittests/test_qfr_functionality.cpp 100.0% <100.0%> (ø)

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 c5a87d8...63466e9. Read the comment docs.

@burgholzer burgholzer merged commit 2c0c3d6 into main Jun 24, 2022
@burgholzer burgholzer deleted the bugfix-cnot-cancellation branch June 25, 2022 00:00
burgholzer pushed a commit that referenced this pull request Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant