-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(notebooks): add ADAPT-VQE tutorial #22
Conversation
Pull Request Test Coverage Report for Build 8489904237Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
@haimeng-zhang let's try to have this reviewed by end of day tomorrow so that @MeltemTolunay can act on the feedback and we can merge by Friday. |
The notebook looks great! Here are a few suggestions:
Some more thoughts below (I think we can discuss and address them in a later version)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MeltemTolunay please apply @haimeng-zhang suggestions at your own discretion.
I made the following changes per @haimeng-zhang's review:
Later we can also discuss inserting more explanation for the chemistry background. Since a regular VQE tutorial will soon be made available on the Learning Platform where these information are already available, I think we can omit these in this tutorial for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for putting this together @MeltemTolunay ! The notebook is looking great. Just a couple of things and we will merge:
- You are using
pyscf
which is an external dependency.- There is approval to use it but generally we need to add those to the repo as a
notebook
dependency. - Nonetheless, I believe
pyscf
has some compatibility issues with different operating systems, can you confirm? - If the issues do exist, instead of adding it as a dependency could we just add a link and a written warning in the notebook saying that people need to install it independently?
- There is approval to use it but generally we need to add those to the repo as a
- We should use V2 primitives instead of V1.
- This means using
StatevectorEstimator
instead ofEstimator
as importedfrom qiskit.primitives
- I think this will uncover some code errors in
compute_gradients
regarding the unpacking of results, possibly somewhere else too
- This means using
- There might be some latex error in the first paragraph under "Expand the Ansatz"
- I see that you are doing the optimization process "manually", it would be valuable to indicate what kind of optimization you are performing —I see that it is one of the many gradient based methods.
Thank you for the comments @pedrorrivero! I made the requested changes.
|
Summary
Add ADAPT-VQE tutorial.
Details and comments
This tutorial uses Qiskit Pattern formalism and does not rely on any application packages such as Qiskit Nature. LiH ground state computation is chosen as an example in this tutorial. Functions to build the problem Hamiltonian, the initial Hartree-Fock state, the single and double excitation operators under the Jordan-Wigner transform and the gradient are all explicitly written.