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:
- How does the measured expectiaon Value from step 2 is involved in the classical optimization?
- Are the old $\gamma$ and $\beta$ involved in the classical optimization?
- Are step 1 and step 2 only done once? Becuase then the measurement in step 2 will be very unreliable.
- 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?
- Is there a paper where this is explained or programmed?