  By introducing the "comparison and replacement" (CNR) operation, we propose a
general-purpose pure quantum approximate optimization algorithm and derive its
core optimization mechanism quantitatively. The algorithm is constructed to a
$p$-level divide-and-conquer structure based on the CNR operations. The quality
of approximate optimization improves with the increase of $p$. For sufficiently
general optimization problems, the algorithm can work and produce the
near-optimal solutions as expected with considerably high probability.
Moreover, we demonstrate that the algorithm is scalable to be applied to large
size problems. Our algorithm is applied to two optimization problems with
significantly different degeneracy, the Gaussian weighted 2-edge graph and
MAX-2-XOR, and then we show the algorithm performance in detail when the
required qubits number of the two optimization problems is 10.
