I try to understand the 'Quantum Approximate Optimization Algorithm' (QAOA) by Farhi et al. - arXiv:1411.4028.

I understand that the solution is hidden in the unitaries, but I do not understand how to choose the angles and how to optimize them. If I start with a circuit depth of $m=1$, I only have two angles. How do I choose them?

After choosing them I create the state by using the Quantum Computer - so using the unitaries and subsequently measuring the expectation value of the first qubit. Doing the same, measuring the second qubit... and so on. Afterwards I sum everything together and I have a got a result for the energy of the whole system, right? The paper says "Repeat with the same angles" - why?

Now, the algorithm says, one should optimize the angles - but how? Everything we have at this point, is a state and a corresponding energy.


1 Answer 1


The angles, as in many variational quantum circuits, are optimized via a classical computer. Indeed, the quantum algorithm at the end of the execution gives a value, that you can interpret as an evaluation of a cost function for a given initial state. This value is plugged in a classical optimizer. Experimentally, algorithm based on the Nelder Mead method seems to work fine (gradient descent methods are usually stuck in local minima).

The idea is that the more layer(i.e. angles) and the more execution you can perform, you can get a better approximation of the angles.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.