Add/Refactor AdaptVQE tutorial
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.
Check out this pull request on ![]()
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.
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! 🙌
See inner-source for a continuation of this PR.