-
Notifications
You must be signed in to change notification settings - Fork 60
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
Bug fix for isolated nodes when running RQAOA #157
Conversation
…in map and checking if the diff between the old and new registers mactches the number of eliminations
Codecov Report
@@ Coverage Diff @@
## dev #157 +/- ##
==========================================
+ Coverage 80.69% 81.70% +1.00%
==========================================
Files 94 95 +1
Lines 11393 11794 +401
==========================================
+ Hits 9194 9636 +442
+ Misses 2199 2158 -41
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
The failed tests are assertion errors for the angles with precision 10^-16. Is this really necessary? |
Why all those tests? Did you issue a PR to |
Also, it is very interesting that the tests are all green for Linux but consistently fail for all mac/windows. It must be something to do with different ways of rounding numbers across different OS |
and @kidiki it looks like the errors are a bit larger:
|
…hemselves. should not break
…maybe there's a better way to test?
Description
Bug fix for isolated nodes when running RQAOA
For solving the MaxCut problem on unweighted graphs the isolated nodes were not captured and fixed arbitrarily for some particular instances. As a result, the elimination schedule was missing one of the eliminations and throwing an error "list out of range" when reconstructing the solution.
The current solution is to keep track of the number of eliminations which have to take place at each step reconstructing them from the spin map. Then, comparing the new register either to the quadratic one, a s before, or to the old one - number of eliminations.
Checklist
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Name the new unit-tests that you have added along with this change.