TransWikia.com

How does the classical optimization of the angles $gamma$ and $beta$ in QAOA work?

Quantum Computing Asked by Hannah on December 23, 2020

I have been trying to implement QAOA with classical optimization of the angles $gamma$ and $beta$, but I I’m failing at the classical part.

In paper Quantum Approximate Optimization Algorithm: Performance, Mechanism, and Implementation on Near-Term Devices QAOA works with variational parameters $gamma$ and $beta$ which are first chosen randomely and afer thar is in a loop of 3 steps.

Step1. Simulating $langle psi_p(gamma,beta)|H|psi_p(gamma,beta)rangle$ with the Quantum Computer.

Step2. Measure in the Z basis. And getting $langle psi_p(gamma,beta)|H|psi_p(gamma,beta)rangle$.

Step3. Use a classical optimizesers to calculate new angles $gamma$ and $beta$.
In the paper it says that $F_p(vec{gamma},vec{beta}) = langle psi_p(gamma,beta)|H|psi_p(gamma,beta)rangle$ is maximized.
My Questions are:

  1. How does the measured expectiaon Value from step 2 is involved in the classical optimization?
  2. Are the old $gamma$ and $beta$ involved in the classical optimization?
  3. Are step 1 and step 2 only done once? Becuase then the measurement in step 2 will be very unreliable.
  4. How is the function $F_p(vec{gamma},vec{beta}) = langle psi_p(gamma,beta)|H|psi_p(gamma,beta)rangle$ written classicaly so that a classical optimizer can work with is?
  5. Is there a paper where this is explained or programmed?

One Answer

  1. $langle psi_p(gamma,beta)|H|psi_p(gamma,beta)rangle$ is basically the function evaluation step during the optimization. If you use a gradient-free optimizer, then it uses this information to drive its search.

  2. Depending on the optimizer if it needs them to update the parameters.

  3. You seem confused between the simulation and measurement part. $langle psi_p(gamma,beta)|H|psi_p(gamma,beta)rangle$ is the expression you want to optimize. But with a real quantum computer, you can only estimate it by doing many measurements (you get bitstrings which serve as candidates) and averaging the corresponding energies. So you need many measurements if you want a higher precision for that estimate.

  4. It is not written. As said in 3, you estimate it. The optimizer uses that information in its optimization process.

  5. There are many tutorials on many platforms such as Cirq or Pennylane.

Correct answer by cnada on December 23, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP