Skip to content

🐛 properly handle repeated cancellation in single-qubit gate fusion #459

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

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

burgholzer
Copy link
Member

Description

This PR fixes a small bug in the single-qubit gate fusion optimisation method where repeated cancellations would lead to empty compound operations that were then directly accessed without checking whether there are actually elements to access.

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 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 Oct 25, 2023
@burgholzer burgholzer self-assigned this Oct 25, 2023
@github-actions
Copy link
Contributor

Cpp-Linter Report ✔️

No problems need attention.

Have any feedback or feature suggestions? Share it here.

@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #459 (08bb1a5) into main (b2db9e2) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #459   +/-   ##
=====================================
  Coverage   89.9%   89.9%           
=====================================
  Files        109     109           
  Lines      11666   11673    +7     
  Branches    2042    2044    +2     
=====================================
+ Hits       10494   10504   +10     
+ Misses      1172    1169    -3     
Flag Coverage Δ
cpp 89.7% <100.0%> (+<0.1%) ⬆️
python 100.0% <ø> (ø)
Files Coverage Δ
src/CircuitOptimizer.cpp 85.6% <100.0%> (+0.3%) ⬆️

... and 1 file with indirect coverage changes

@burgholzer burgholzer merged commit 2903079 into main Oct 25, 2023
@burgholzer burgholzer deleted the fix-for-single-qubit-gate-fusion branch October 25, 2023 17:36
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
None yet
Development

Successfully merging this pull request may close these issues.

1 participant