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

A few clarifications needed on QAOA/QAA tutorial #702

Closed
Yoric opened this issue Jul 1, 2024 · 2 comments · Fixed by #731
Closed

A few clarifications needed on QAOA/QAA tutorial #702

Yoric opened this issue Jul 1, 2024 · 2 comments · Fixed by #731
Milestone

Comments

@Yoric
Copy link
Collaborator

Yoric commented Jul 1, 2024

If I read the tutorial correctly:

  1. The tutorial ignores the diagonal terms.
  2. The tutorial ignores the case in which a non-diagonal term is <0.
  3. The tutorial can produce layouts with atoms that are too close to each other or too far from the center.

I believe that for each of these items, we should either complete the tutorial or clarify that the tutorial doesn't cover this aspect of the problem for the sake of simplicity.

(apologies for the initial formulation, my original phrasing sounded aggressive, that was not my intent)

@Yoric Yoric changed the title As far as I understand, the QUBO/QAA tutorial is partially false A few clarifications needed on QAOA/QAA tutorial Jul 1, 2024
@HGSilveri
Copy link
Collaborator

Thanks for your comments @Yoric. I completely agree that this tutorial needs work. However, I have some clarifications to add to each of the points you raised:

  1. The tutorial ignores the diagonal terms.

If by "ignores" you mean that they are not included in the optimization, I have to disagree. While it is true that only the off-diagonal terms are considered when trying to optimize the positions of the atoms, this is because the diagonal terms don't depend on the interaction between atoms but rather on the state of the atoms themselves. Put another way, the placement of the atoms has no influence on the diagonal terms.
Instead, they depend on the detuning term of the Hamiltonian, which you'll find is intentionally positive to energetically favor atoms to be in the $|1\rangle$ state (remember that the detuning appears as $-\delta$ in the Hamiltonian).
I agree that this is not being explained so we will improve this, but the diagonal terms are still there.

2. The tutorial ignores the case in which a non-diagonal term is <0.

Indeed, no reference is made to the case when the non-diagonal terms are negative. In our defense, we are not claiming to have a universal QUBO solver, just showing how to solve a specific instance of one. That being said, I do see value in explicitly stating the limitations of the adopted approach, so we shall add this too.

3. The tutorial can produce layouts with atoms that are too close to each other or too far from the center.

I would say these are device-dependent considerations that we are not going into for the sake of simplicity. The very simple approach for register embedding is quite limited but again, we are not claiming it is general. In fact, finding the optimal register embedding for a generic QUBO is a very hard problem that is decidedly outside the scope of this tutorial. Nonetheless, we can still highlight these limitations to not give the wrong impression, so let's do that too.

@Yoric
Copy link
Collaborator Author

Yoric commented Jul 1, 2024

To clarify, I don't mean that the algorithm ignores these terms, I mean that the explanation ignores them (I realize that the term "ignore" is probably ambiguous, my bad). Having read this tutorial carefully, I have not reached an understanding of how I, as a user, can deal with 1. or 2. Dealing with 3. doesn't feel too difficult (at least in simple cases), I was just surprised when I encountered an error message further down the line after having just changed a few numerical values.

In our defense, we are not claiming to have a universal QUBO solver, just showing how to solve a specific instance of one.

Indeed, but as a reader of this tutorial, I (mistakenly) assumed that the tutorial was demonstrating a universal technique, so I feel that clarifying this point would be useful for future readers.

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

Successfully merging a pull request may close this issue.

2 participants