RCQT Research Center for Quantum Technology · Chiang Mai University

Interactive lab › Cut a graph with a quantum circuit

Interactive lab · 40/101 · Quantum algorithms · QAOA

Cut a graph with a quantum circuit

The quantum approximate optimisation algorithm is a short circuit with a few angles: e^{−iγC} rewards good answers with phase, e^{−iβΣX} mixes them, and a classical computer adjusts γ and β to raise the average quality. It is a hybrid quantum–classical method, the kind CEQT designs algorithms for and RCQT builds hardware to run. Here Max-Cut on graphs of up to nine nodes is simulated exactly.

What you are seeing

  • The graph is coloured by the most likely answer; thick orange edges are cut. Under each node is the chance it ends on the white side.
  • The landscape for one layer: brighter means a higher expected cut. The optimiser climbs it; more layers reach higher.
  • The approximation ratio r = ⟨C⟩/C_max measures quality; the bars show which bit strings you would actually measure, orange for an optimal cut.
  • A real device would add noise to every gate; as layers grow, that noise and the cost of optimising are what limit QAOA.

The numbers in the model

CostC(z) = Σ_(i,j) (1 − z_i z_j)/2
Layers|γ, β⟩ = Π_k e^{−iβ_k ΣX} e^{−iγ_k C} |+⟩^n
OptimiserAdam on finite-difference gradients, linear-ramp start
Simulationexact state vector, up to 9 qubits

Go further

More labs on this theme