Fig. 2. The average $\kappa$ (or $\bar{\kappa}$) as a function of $n$ for Erdös–Rényi random graphs $G(n,1/2)$ with three different algorithms. (a) The results of our quantum algorithm. We set $T=n^2$, $\omega_\varphi=1$, $\omega_\theta=\pi/T$ and run over 1000 Erdös–Rényi random graphs $G(n,1/2)$. The variance of $\kappa$ is around $10^{-6}$. The calculation is carried out with $A$. (b) The results of the Greedy algorithm and the Metropolis algorithm in comparison with our quantum results. For the Greedy algorithm, the calculation runs 1000 times over one graph to get $\bar{N}$, and then runs over 1000 random graphs to get $\bar{\kappa}$. The variance of $\bar{\kappa}$ is around $10^{-4}$. For the Metropolis algorithm, we set the iteration time $T=n^2$. The calculation runs 1000 times over one graph to get $\bar{N}$, and then runs over 1000 random graphs to get $\bar{\kappa}$. The variance of $\bar{\kappa}$ is around $10^{-4}$. The lines in the figure are guide for the eyes.