Utilizing Amazon Braket Hybrid Jobs
Amazon Braket Hybrid Jobs allows users to run a hybrid algorithm such as QAOA as a single job to a quantum processor. This way, when the Quantum Processing Unit (QPU) becomes available, it is dedicated to the job until all the quantum circuit requests are processed and then the QPU is released.
To accomplish this, we will need to split the code written in the last section on QAOA into the job control code, which will be the Jupyter Notebook, and the job source module, which is stored as a python
(QAOA.py)
file. This is executed by the Amazon Braket Hybrid Jobs instance after it is created.
Figure 10.1 – Amazon Braket Hybrid Jobs overall process
Figure 10.1 shows the overall process at a high level. The steps in the figure are explained here:
- The
AwsQuantumJob.create()
method initiates the Amazon Braket Hybrid Jobs instance, which will execute the Python script and execute tasks on the Amazon Braket devices...