Skip to content
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

Operator_Pools in adapt_vqe #412

Closed
ChrisW918 opened this issue Nov 3, 2021 · 6 comments
Closed

Operator_Pools in adapt_vqe #412

ChrisW918 opened this issue Nov 3, 2021 · 6 comments

Comments

@ChrisW918
Copy link

Hi,

Previously, I tested the ground state energy for several molecules using VQE, and the performance was pretty well compared to classical FCI energy.

And lately, I tried to implement adapt_vqe and see how it goes, yet there is one section I don't really understand. That is, the operator_pool which is written in module operatorBase. I read the related paper An adaptive variational algorithm for exact molecular simulations on a quantum computer and roughly know how this pool works. However, I am curious about how you exactly compose this pool?

It seems to me that the available composition for the pool is merely the single and double excitation terms (including excitation from rs to pq and the inverse case). What are the other recommended terms?

@mrossinek
Copy link
Member

Our implementation of the AdaptVQE algorithm relies on using a UCC ansatz (see here).
Depending on the variant of UCC, you can have any set of excitations, but the key which we are interested in, is that we have a pool of operators out of which to choose from, while builing up our ansatz adaptively.

What this means in simple words is that:

  1. you choose an ansatz: some variant of UCC, e.g. UCCSD
  2. it constructs a set of excitations: in this example all single- and double-excitations
  3. these excitations get converted to qubit operators: this is probably what you refer to be OperatorBase
  4. the entire set of qubit operators is then the pool of operators out of which you choose the next operator to include into your ansatz based on its energy gradient

I hope this answers your question.

@ChrisW918
Copy link
Author

Thanks for your answer @blakejohnson. Also, may I remain this issue longer that in case I would have some questions after test adapt-vqe.

@mrossinek
Copy link
Member

I'm not quite sure what you mean, but yes, we can leave this issue open.
In case we don't hear back from you within 2 weeks, that's usually when we would consider closing it.

@ChrisW918
Copy link
Author

Hi @mrossinek , I looked the code of adapt-vqe, and it seems your way of computing gradient for operators in pool is a little different from the means referred in An adaptive variational algorithm for exact molecular simulations on a quantum computer.

You choose to generate the gradient by measuring E(theta+delta) and E(theta-delta) using original vqe, and eventually gives dy/dx, which is quite classical and takes two measurements.

However, the paper suggests measuring the expectation value of the commutator of the Hamiltonian with ansatz generator by one individual operator, which consumes one measurement for each operator (ignoring the sub-term of Hamiltonian and treat it as a unity)

Regardless of there can exist theoretical differences between two methods, which can be covered by variational optimization and therefore be considered as trivial, the classical means apparently costs one more measurement than the one in paper. So I want to ask why you chose this way, are there advantages of it?

@mrossinek
Copy link
Member

It's been a while since I had a look at that paper. And in fact the implementation of our AdaptVQE algorithm originally resulted out of the Qiskit Camp Europe 2019. It is possible that we took a different approach to the computation of the gradients than suggested in the paper.

Right now there is actually an ongoing project which is refactoring the gradient computation to leverage Qiskit Terra's gradient framework. I do not currently have the time to check whether this is more inline with what you are describing above.
Here are the relevant resources of that project:

@mrossinek
Copy link
Member

I'm closing this in the assumption that the above discussion is resolved. We can reopen if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants