MaxCut with QAOA: graphs and approximation ratios
What MaxCut asks, how the approximation ratio is defined, and the exact numbers for seven small graphs.
8 min read · reviewed December 2026
The problem
Colour every node of a graph black or white. An edge is cut when its two ends have different colours. MaxCut asks for the colouring that cuts the most edges. Each colouring is a bit string, so n nodes need n qubits.
Approximation ratio
The ratio is the expected cut ⟨C⟩ divided by the true maximum. A coin-flip colouring cuts half the edges on average, so any ratio above half the edges divided by the maximum is better than guessing. The lab finds the true maximum by checking all 2ⁿ colourings, which is easy for six nodes.
ratio = ⟨C⟩ / maximum cut
Results for seven small graphs
| Graph | Edges | Max cut | p = 1 | p = 2 | p = 3 |
|---|---|---|---|---|---|
| Triangle (3 nodes) | 3 | 2 | 2.000 (1.000) | 2.000 (1.000) | 2.000 (1.000) |
| Square (4-cycle) | 4 | 4 | 3.000 (0.750) | 4.000 (1.000) | 4.000 (1.000) |
| Complete graph K4 | 6 | 4 | 3.698 (0.924) | 4.000 (1.000) | 4.000 (1.000) |
| Pentagon (5-cycle) | 5 | 4 | 3.750 (0.937) | 4.000 (1.000) | 4.000 (1.000) |
| House (5 nodes, 6 edges) | 6 | 5 | 4.110 (0.822) | 4.496 (0.899) | 4.709 (0.942) |
| Hexagon (6-cycle) | 6 | 6 | 4.500 (0.750) | 5.000 (0.833) | 6.000 (1.000) |
| Triangular prism (6 nodes) | 9 | 7 | 5.939 (0.848) | 6.603 (0.943) | 6.875 (0.982) |
What to notice
- Odd cycles cannot be cut completely: the triangle’s best is 2 of 3 edges, and the pentagon’s is 4 of 5.
- At p = 1 the square and the hexagon both reach a ratio of 0.750 to three decimal places in this lab’s calculation.
- The house and prism graphs need more layers than the others to get close.
The values come from a derivative-free optimiser started from random points. They are lower bounds on the best possible values for that p, not proofs of the optimum.
Try it
Questions
Is MaxCut hard?
In general it is an NP-hard problem, which is why it is a popular test problem. Tiny graphs like these are trivial for a classical computer.
Why do different graphs need different p?
The structure of the graph decides how much interference the circuit must build up before the best cuts dominate.
Can QAOA do better than classical MaxCut solvers?
That is an open research question. This lab makes no such claim.
Read next
Sources and further reading
- E. Farhi, J. Goldstone and S. Gutmann, “A Quantum Approximate Optimization Algorithm” (2014)
- A. Peruzzo et al., “A variational eigenvalue solver on a photonic quantum processor” (2014)
- A. Kandala et al., “Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets” (2017)
- J. McClean et al., “Barren plateaus in quantum neural network training landscapes” (2018)
- J. Preskill, “Quantum computing in the NISQ era and beyond” (2018)
- K. Mitarai et al. (2018) and M. Schuld et al. (2019) on analytic gradients of quantum circuits
Check the original sources for exact citations.