Quantum Approximate Optimization Algorithm to Factor Integers A Quantum Approximate Optimization Algorithm that is used to factor numbers. The usual case for quantum supremacy being Shor’s Algorithm is a guaranteed factor of an Integer, n. In our heuristic, the answer generated is the approximate answer close to n with all of the factors.