entropicalabs / openqaoa

Multi-backend SDK for quantum optimisation
MIT License
116 stars 58 forks source link

Implementing dump method to RQAOA / QAOA Results #122

Closed raulconchello closed 1 year ago

raulconchello commented 1 year ago

Pull request to implement a method to the RQAOAResults class that returns the object as a json.

TO DO

codecov[bot] commented 1 year ago

Codecov Report

Merging #122 (dc3d06a) into dev (25d93e6) will increase coverage by 0.23%. The diff coverage is 90.55%.

:exclamation: Current head dc3d06a differs from pull request most recent head 29472f8. Consider uploading reports for the commit 29472f8 to get more accurate results

@@            Coverage Diff             @@
##              dev     #122      +/-   ##
==========================================
+ Coverage   87.39%   87.63%   +0.23%     
==========================================
  Files          67       67              
  Lines        9086     9059      -27     
==========================================
- Hits         7941     7939       -2     
+ Misses       1145     1120      -25     
Impacted Files Coverage Δ
openqaoa/backends/qpus/qaoa_braket_qpu.py 21.59% <0.00%> (-0.51%) :arrow_down:
openqaoa/optimizers/training_vqa.py 81.25% <ø> (ø)
openqaoa/qaoa_parameters/annealingparams.py 92.18% <ø> (ø)
openqaoa/qaoa_parameters/fourierparams.py 91.89% <ø> (ø)
openqaoa/qaoa_parameters/standardparams.py 90.85% <ø> (ø)
openqaoa/utilities.py 88.36% <ø> (+3.84%) :arrow_up:
setup.py 100.00% <ø> (ø)
tests/test_qpu_braket.py 10.38% <6.97%> (-0.44%) :arrow_down:
tests/test_qpu_devices.py 33.33% <15.78%> (+2.89%) :arrow_up:
openqaoa/devices.py 48.92% <16.66%> (+0.34%) :arrow_up:
... and 27 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Q-lds commented 1 year ago

@raulconchello does it only work for rqaoa? Or is it already working for qaoa too, as q.result.dum()?

raulconchello commented 1 year ago

@raulconchello does it only work for rqaoa? Or is it already working for qaoa too, as q.result.dum()?

That I haven't done. Should I do it too in this PR?

Q-lds commented 1 year ago

@raulconchello does it only work for rqaoa? Or is it already working for qaoa too, as q.result.dum()?

That I haven't done. Should I do it too in this PR?

Yes, I think it can be added here. You can update the name of the PR too (to reflect the qaoa part)