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 Qubit out of Bounds Error #496

Merged
merged 25 commits into from
Aug 1, 2024
Merged

Fix Qubit out of Bounds Error #496

merged 25 commits into from
Aug 1, 2024

Conversation

ystade
Copy link
Contributor

@ystade ystade commented Jul 31, 2024

Description

When executing slightly larger circuits it could happen that the size, particularly the width, of the entangling did not suffice which caused and uncaught error. This PR resolves this problem by disregarding all qubits that do not fit in the entangling zone and leaving them for a later iteration.

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 c++ Anything related to C++ code fix Anything related to bugfixes labels Jul 31, 2024
@ystade ystade requested a review from burgholzer July 31, 2024 20:10
@ystade
Copy link
Contributor Author

ystade commented Jul 31, 2024

@burgholzer You can already look over the changes. I will fix the Linter warnings tomorrow.

@ystade
Copy link
Contributor Author

ystade commented Aug 1, 2024

@burgholzer I was apparently to quick, i will first fix the failing tests... and ping you then.

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

Attention: Patch coverage is 96.77419% with 2 lines in your changes missing coverage. Please review.

Project coverage is 90.5%. Comparing base (7d6250d) to head (15f615e).
Report is 97 commits behind head on main.

Files with missing lines Patch % Lines
src/na/Architecture.cpp 87.5% 1 Missing ⚠️
src/na/NAGraphAlgorithms.cpp 97.9% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #496   +/-   ##
=====================================
  Coverage   90.4%   90.5%           
=====================================
  Files         86      86           
  Lines       9982   10028   +46     
  Branches    1696    1711   +15     
=====================================
+ Hits        9027    9078   +51     
+ Misses       955     950    -5     
Flag Coverage Δ
cpp 90.2% <96.7%> (+<0.1%) ⬆️
python 95.9% <ø> (ø)
Files with missing lines Coverage Δ
src/na/NAMapper.cpp 89.8% <100.0%> (+0.3%) ⬆️
src/na/Architecture.cpp 98.5% <87.5%> (-0.3%) ⬇️
src/na/NAGraphAlgorithms.cpp 95.2% <97.9%> (+2.2%) ⬆️

... and 1 file with indirect coverage changes

@ystade ystade marked this pull request as ready for review August 1, 2024 07:41
@ystade
Copy link
Contributor Author

ystade commented Aug 1, 2024

@burgholzer Now it should be done. If there pops up another clang tidy warning, I do not know how to fix it anymore.

Copy link
Member

@burgholzer burgholzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks really good.
I just have a few minor comments, which you will find inline.
I hope they are easy to address.

cmake/ExternalDependencies.cmake Outdated Show resolved Hide resolved
cmake/ExternalDependencies.cmake Outdated Show resolved Hide resolved
include/na/NAGraphAlgorithms.hpp Show resolved Hide resolved
src/na/Architecture.cpp Show resolved Hide resolved
src/na/Architecture.cpp Show resolved Hide resolved
src/na/NAGraphAlgorithms.cpp Show resolved Hide resolved
src/na/NAGraphAlgorithms.cpp Outdated Show resolved Hide resolved
Copy link
Member

@burgholzer burgholzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great 👍🏼

@ystade ystade enabled auto-merge August 1, 2024 12:01
@ystade ystade merged commit fdbd4d2 into main Aug 1, 2024
34 checks passed
@ystade ystade deleted the fix-na-out-of-zone branch August 1, 2024 12:10
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 fix Anything related to bugfixes
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants