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 TSP test #620

Merged
merged 6 commits into from
Jul 15, 2022
Merged

Fix TSP test #620

merged 6 commits into from
Jul 15, 2022

Conversation

stavros11
Copy link
Member

@shangtai this implements the TSP test by comparing the state vector, instead of doing the measurements, thus avoiding the issues with the seed. Please have a look and let me know if you agree.

I also added a copy in the loss function of the QAOA as it was causing the numba backend to fail, most likely due to in-place updates. Perhaps this was the reason we could not get it to work with the measurements either.

@stavros11 stavros11 requested a review from shangtai July 13, 2022 20:19
@codecov
Copy link

codecov bot commented Jul 13, 2022

Codecov Report

❗ No coverage uploaded for pull request base (abstrtsp@b5f351d). Click here to learn what that means.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             abstrtsp      #620   +/-   ##
============================================
  Coverage            ?   100.00%           
============================================
  Files               ?        79           
  Lines               ?     10416           
  Branches            ?         0           
============================================
  Hits                ?     10416           
  Misses              ?         0           
  Partials            ?         0           
Flag Coverage Δ
unittests 100.00% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


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 b5f351d...0aa0e6c. Read the comment docs.

@scarrazza
Copy link
Member

@shangtai could you please have a look and confirm if this solution works for you?

@shangtai
Copy link
Contributor

Hi @stavros11 I think the change is great since we can now avoid the issue with the random number seed.

@shangtai shangtai merged commit 4135561 into abstrtsp Jul 15, 2022
@stavros11 stavros11 deleted the fixtsptest branch July 19, 2022 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants