Imagine choosing among a set of projects. Each project has its own value, but combinations matter. Two projects might share a scarce resource and become expensive to undertake together. Two others might complement one another, making the pair more attractive than either alone. A useful model must capture both the individual choices and the way choices interact.
Quadratic unconstrained binary optimization, usually shortened to QUBO, does this in a compact mathematical form. Its variables take only the values 0 and 1. The objective contains terms for individual variables and pairs of variables. The task is to find the assignment with the lowest objective value.
There is no requirement to use quantum hardware. Classical algorithms can solve QUBO models, and quantum optimization researchers use QUBO as one representation among several.
The mathematics of a pair
Let x and y represent two projects. Each equals 1 when selected and 0 otherwise. Suppose we minimize
E(x, y) = −3x − 2y + 4xy. The negative linear terms reward selecting either project. The positive interaction term adds a cost of 4 only when both are selected. Under this convention, a lower energy is better.
Penalty choice is a modeling decision: if violating a constraint improves the other terms enough, a low-weight penalty might not prevent an invalid solution from winning.
| x | y | Energy | Interpretation |
|---|---|---|---|
| 0 | 0 | 0 | Neither project |
| 1 | 0 | −3 | First project only |
| 0 | 1 | −2 | Second project only |
| 1 | 1 | −1 | Both projects, with an interaction cost |
The minimum is −3, obtained by selecting only the first project. Selecting both looks attractive if we consider the project benefits independently, but less so once we count their interaction.
That is the important modeling move. A QUBO objective does not simply sort projects by a score. It encodes how the value of one decision can depend on another.
What makes it quadratic?
A general QUBO objective is often written as xᵀQx, where x is a vector of binary variables and Q records the coefficients. Terms such as 3x are linear; terms such as 4xy are quadratic. A term x² is effectively linear when x is binary because both 0²=0 and 1²=1.
The matrix convention matters. An off-diagonal interaction may be stored once in an upper-triangular matrix or split across symmetric entries. Either convention can represent the same objective when used consistently. A factor-of-two error in these coefficients can change which solution the model prefers.
Where did the constraints go?
The word unconstrained deserves attention. A real project selection may require “at most one of these projects” or “choose exactly two activities.” Such restrictions are not automatically present merely because variables are binary.
It can serve as a baseline for quadratic binary optimization research, as well as a tool for QUBO problems in their own right.
Some constraints can be represented with additional penalty terms in the objective, and sometimes extra binary variables are required. Penalty choice is a modeling decision: if violating a constraint improves the other terms enough, a low-weight penalty might not prevent an invalid solution from winning. Other formulations and algorithms can handle constraints directly rather than translating everything into QUBO.
A reliable workflow checks the solutions against the original rules. The model's minimum energy matters only to the extent that it corresponds to the intended decision.
Why the same model appears in several worlds
QUBO is closely related to the Ising model of interacting spins. A change of variables transforms binary decisions into variables taking values −1 and +1, up to an energy offset and a consistent sign convention. That mathematical correspondence makes it useful across classical optimization, physics-inspired methods and several quantum approaches.
But no single formulation defines quantum optimization. Annealing, variational circuits, quantum searches and other algorithms can use different representations, constraint structures and computational subroutines. QUBO is a useful shared language, not the whole field.
4colors Optimizer for QUBO is a classical optimization solver within our Quantum offering. It can serve as a baseline for quadratic binary optimization research, as well as a tool for QUBO problems in their own right. The best starting point is to understand the model and check what its answers mean, before asking which computer should solve it.