entropicalabs / openqaoa

Multi-backend SDK for quantum optimisation
MIT License
119 stars 59 forks source link

Eliminate white spaces in dict keys in Results #154

Closed raulconchello closed 1 year ago

raulconchello commented 1 year ago

White spaces

Refactoring of the QAOA Results class. For all the result dictionaries keys with white spaces were used. Those are changed to "_".

This PR can brake old code

Evaluation number for optimized results

Also, a value in the qaoa results has been added:

q.results.optimized['eval_number']

this is an integer that tells which evaluation corresponds to the optimized values.

TO DO

codecov[bot] commented 1 year ago

Codecov Report

Merging #154 (9eec322) into dev (435f400) will increase coverage by 0.29%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev     #154      +/-   ##
==========================================
+ Coverage   80.69%   80.98%   +0.29%     
==========================================
  Files          94       94              
  Lines       11393    11399       +6     
==========================================
+ Hits         9194     9232      +38     
+ Misses       2199     2167      -32     
Impacted Files Coverage Δ
openqaoa/optimizers/result.py 91.75% <100.00%> (ø)
openqaoa/optimizers/training_vqa.py 81.63% <100.00%> (+1.71%) :arrow_up:
openqaoa/rqaoa/rqaoa_results.py 100.00% <100.00%> (ø)
openqaoa/workflows/optimizer.py 90.53% <100.00%> (ø)
tests/test_optimizers.py 100.00% <100.00%> (ø)
tests/test_optimizers_pennylane.py 99.15% <100.00%> (ø)
tests/test_results.py 100.00% <100.00%> (ø)
tests/test_utilities.py 100.00% <100.00%> (ø)
openqaoa/optimizers/optimization_methods.py 86.80% <0.00%> (+19.44%) :arrow_up:

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