A QAOA example using Amazon Braket Hybrid Jobs
In this example, we want to execute the QAOA code on the ionq-matrix.csv
input file. Remember that this file contains Binary Quadratic Model (BQM) data in an 11x11 matrix. We have already found the optimal value of this input as -2.5
. In this section, we will split the code used before, into the structure needed for Amazon Braket Hybrid Jobs. We will review Job Control Code first in its entirety and then review the Job Source Module code.
Note on Charges
Please carefully consider the potential charges of executing the following job. The code will execute multiple runs to an Amazon Braket device. If p
is the number of QAOA parameter trial values, then the code will execute p
2 tasks with the base number of shots, and then one extra task with 10 times the base number of shots. In addition, there is a charge for the time the Amazon Braket Hybrid Jobs instance is active. More information on pricing can be found at https://aws.amazon.com...