documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Add/Refactor AdaptVQE tutorial

Open kaelynj opened this issue 1 year ago • 3 comments

Closes #1167 and #1193

Was initially planning on first adding the tutorial and then refactoring the content, but after discussion needs to be refactored first before it can be merged.

kaelynj avatar Apr 18 '24 14:04 kaelynj

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Tutorial is ready for review. I've done my best to outline the steps for converting the Hamiltonian to Paulis, but left the code untouched since it just uses what Mario wrote for the chemistry VQE tutorial.

The overall structure is to run through the full adapt-vqe loop once on a statevector simulator and then put everything together into a loop that runs within a single Session. (Note: the loop takes quite some time to run, just the gradient calculation takes about an hour of QPU time).

I also added in some functionality to save the results to a JSON file each time a job is finished in order to keep the intermediate results persistent in case the user's kernel dies. Let me know if this shouldn't be included.

kaelynj avatar Apr 29 '24 15:04 kaelynj

Thanks for contributing to Qiskit documentation!

Before your PR can be merged, it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. Thanks! 🙌

qiskit-bot avatar Apr 29 '24 15:04 qiskit-bot

See inner-source for a continuation of this PR.

frankharkins avatar Jul 16 '24 14:07 frankharkins