Quantum Approximate Optimization Algorithm (QAOA) for Quadratic Unconstrained Binary Optimization with PyTorch
In the attached Jupyter notebook, I have presented the Quantum Approximate Optimization Algorithm (QAOA) [1] for a Quadratic Unconstrained Binary Optimization (QUBO) problem. A QUBO belongs to the NP-hard class, and it is equivalent to find the minimum energy (ground) state of a spin (Ising) Hamiltonian [2]. Here, the implementation of QAOA is done using PyTorch.
Problem instance
Algorithm: QAOA
Solution
[1] E. Farhi, J. Goldstone, and S. Gutmann, A Quantum Approximate Optimization Algorithm
[2] Lucas A (2014) Ising formulations of many NP problems. Front. Physics 2:5.
[3] Marcello Benedetti et al 2019 Quantum Sci. Technol. 4 043001