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:
$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.
Depending on the optimizer if it needs them to update the parameters.
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.
It is not written. As said in 3, you estimate it. The optimizer uses that information in its optimization process.
There are many tutorials on many platforms such as Cirq or Pennylane.
Correct answer by cnada on December 23, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP