entropicalabs / openqaoa

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

Dev optimizers notebook #188

Closed raulconchello closed 1 year ago

raulconchello commented 1 year ago

New Notebook example. It is about the optimizers.

It has no number yet, before merging we should give it a number and change its name.

codecov[bot] commented 1 year ago

Codecov Report

Merging #188 (3ca27a7) into dev (d22617e) will decrease coverage by 0.02%. The diff coverage is 82.30%.

:exclamation: Current head 3ca27a7 differs from pull request most recent head 67e7db5. Consider uploading reports for the commit 67e7db5 to get more accurate results

@@            Coverage Diff             @@
##              dev     #188      +/-   ##
==========================================
- Coverage   88.78%   88.76%   -0.02%     
==========================================
  Files          32       32              
  Lines        5769     5786      +17     
==========================================
+ Hits         5122     5136      +14     
- Misses        647      650       +3     
Impacted Files Coverage Δ
tests/test_aws_managed_jobs.py 67.92% <0.00%> (ø)
tests/test_workflows.py 99.49% <ø> (+<0.01%) :arrow_up:
tests/test_qpu_qiskit.py 11.86% <2.17%> (ø)
tests/test_qpu_braket.py 10.23% <3.33%> (ø)
tests/test_qpu_devices.py 37.50% <8.57%> (ø)
tests/test_backends.py 53.03% <41.17%> (+0.57%) :arrow_up:
tests/test_circuit_routing.py 71.98% <70.78%> (ø)
tests/test_optimizers.py 99.49% <98.43%> (ø)
tests/test_problems.py 99.16% <98.58%> (ø)
tests/test_results.py 99.57% <99.11%> (-0.43%) :arrow_down:
... and 19 more

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

Q-lds commented 1 year ago

This is a very nice notebook! :tada:

It will also make sense to have something similar on the website :)

vishal-ph commented 1 year ago

Very nice notebook, @raulconchello. Congratulations!

Just one comment, in the section for gradient-free optimizers, I can see newton-cg, and l-bfgs-b algorithms in the list as well. Be careful, since they require a jacobian for optimization, and therefore, are not gradient-free

Once you have fixed it, let me know, I this branch is good to be merged :)

raulconchello commented 1 year ago

@vishal-ph I have changed what you said.

However, before merging I think we should give a number to the notebook.

Q-lds commented 1 year ago

How about 13? :D

Also, is the notebook already featured in /tests/test_notebooks.py and in the docs?

raulconchello commented 1 year ago

@Q-lds We can give it the 13, but I feel that the notebooks increase in difficulty and this one is not that technical. What do you think, @vishal-ph ?

vishal-ph commented 1 year ago

fair point, @raulconchello. Even though it was never a conscious plan to rank the notebooks in increasing order of complexity, it is possible that's how it looks at the moment.

Q-lds commented 1 year ago

@vishal-ph and @raulconchello, I think the number of the file is not that relevant. What is important is to organize the notebooks in the docs.

As we already have a lot of them, it probably makes more sense to divide them thematically in the docs and keep a simple increasing counter in the folder

vishal-ph commented 1 year ago

sure, then 13 is fine for the moment