Implementing QAOA for optimization
So far, we’ve learned how to create a binary quadratic objective
function and then create a quantum circuit that will evolve by increasing the probability of the state that produces the minimum cost. We also showed how QAOA depends on parameters that must be evaluated classically. In this section, we will create a simple QAOA implementation where we can visually and efficiently determine the parameters and optimize the objective
function.
In the first section of this chapter, Representing a binary quadratic function using a phase adder, we started by defining an objective
function and showed that a quantum computer could sample all the values of that function while determining the minimum value with the same probability as every other value. This requires a considerable number of measurements, and the last example in that section took a while to execute. The results were shown in Figure 8.3. Now, we will use our implementation of QAOA to...