Interactive lab › Write a hard choice as an energy
Interactive lab · 39/101 · Optimisation · QUBO
Write a hard choice as an energy
Quadratic unconstrained binary optimisation is the common language between hard problems and quantum hardware: every yes-or-no choice is a bit, and the cost is a sum of single and pairwise terms. Annealers, QAOA and Rydberg-atom arrays all take problems in this form. Rules such as ‘exactly four assets’ become penalties, and choosing their weight is an art you can try here.
What you are seeing
- Left: the problem and the string the annealer holds now. Right: the Q matrix, orange for positive (discouraging) terms and blue for negative (rewarding) ones.
- Independent set is the problem Rydberg atoms solve natively: an excited atom blocks its neighbours within the blockade radius, so the excited atoms form an independent set.
- Penalty too small and the lowest energy breaks the rule; too large and the landscape becomes rugged and annealing struggles. The right-hand plot shows both.
- All 2^n answers are enumerated to find the true minimum, possible only for small n: that is the reason quantum and heuristic solvers exist.
The numbers in the model
| Energy | E(x) = Σ Q_ii x_i + Σ_{i |
|---|---|
| Ising form | s_i = 2x_i − 1 |
| Simulated annealing | single-bit Metropolis, geometric cooling |
| Sizes | 8–11 bits, 256–2048 strings |