Quadratic unconstrained binary optimization – Wikipedia

Quadratic unconstrained binary optimization (QUBO), also known as unconstrained binary quadratic programming (UBQP), is a combinatorial optimization problem with a wide range of applications from finance and economics to machine learning.[1] QUBO is an NP hard problem, and for many classical problems from theoretical computer science, like maximum cut, graph coloring and the partition problem, embeddings into QUBO have been formulated.[2][3]
Embeddings for machine learning models include support-vector machines, clustering and probabilistic graphical models.[4]
Moreover, due to its close connection to Ising models, QUBO constitutes a central problem class for adiabatic quantum computation, where it is solved through a physical process called quantum annealing.[5]

Definition[edit]

The set of binary vectors of a fixed length

n>0{displaystyle n>0}

Bn{displaystyle mathbb {B} ^{n}}

, where

B={0,1}{displaystyle mathbb {B} =lbrace 0,1rbrace }

is the set of binary values (or bits).
We are given a real-valued upper triangular matrix

QRn×n{displaystyle Qin mathbb {R} ^{ntimes n}}

, whose entries

Qij{displaystyle Q_{ij}}

define a weight for each pair of indices

i,j{1,,n}{displaystyle i,jin lbrace 1,dots ,nrbrace }

within the binary vector.
We can define a function

fQ:BnR{displaystyle f_{Q}:mathbb {B} ^{n}rightarrow mathbb {R} }

that assigns a value to each binary vector through

Intuitively, the weight

Qij{displaystyle Q_{ij}}

is added if both

xi{displaystyle x_{i}}

and

xj{displaystyle x_{j}}

have value 1.
When

i=j{displaystyle i=j}

, the values

Qii{displaystyle Q_{ii}}

are added if

xi=1{displaystyle x_{i}=1}

, as

xixi=xi{displaystyle x_{i}x_{i}=x_{i}}

for all

xiB{displaystyle x_{i}in mathbb {B} }

.

The QUBO problem consists of finding a binary vector

x{displaystyle x^{*}}

that is minimal with respect to

fQ{displaystyle f_{Q}}

, namely

In general,

x{displaystyle x^{*}}

is not unique, meaning there may be a set of minimizing vectors with equal value w.r.t.

fQ{displaystyle f_{Q}}

.
The complexity of QUBO arises from the number of candidate binary vectors to be evaluated, as

|Bn|=2n{displaystyle |mathbb {B} ^{n}|=2^{n}}

grows exponentially in

n{displaystyle n}

.

Sometimes, QUBO is defined as the problem of maximizing

fQ{displaystyle f_{Q}}

, which is equivalent to minimizing

fQ=fQ{displaystyle f_{-Q}=-f_{Q}}

.

Properties[edit]

  • Multiplying the coefficients
  • Flipping the sign of all coefficients flips the sign of
  • If all coefficients are positive, the optimum is trivially
  • If

Applications[edit]

QUBO is a structurally simple, yet computationally hard optimization problem.
It can be used to encode a wide range of optimization problems from various scientific areas.[6]

Cluster Analysis[edit]

20 points with random cluster assignment

A bad cluster assignment.

20 points with sensible cluster assignment

A good cluster assignment.

Visual representation of a clustering problem with 20 points: Circles of the same color belong to the same cluster. Each circle can be understood as a binary variable in the corresponding QUBO problem.

As an illustrative example of how QUBO can be used to encode an optimization problem, we consider the problem of cluster analysis.
Here, we are given a set of 20 points in 2D space, described by a matrix

DR20×2{displaystyle Din mathbb {R} ^{20times 2}}

, where each row contains two cartesian coordinates.
We want to assign each point to one of two classes or clusters, such that points in the same cluster are similar to each other.
For two clusters, we can assign a binary variable

xiB{displaystyle x_{i}in mathbb {B} }

to the point corresponding to the

i{displaystyle i}

-th row in

D{displaystyle D}

, indicating whether it belongs to the first (

xi=0{displaystyle x_{i}=0}

) or second cluster (

xi=1{displaystyle x_{i}=1}

).
Consequently, we have 20 binary variables, which form a binary vector

xB20{displaystyle xin mathbb {B} ^{20}}

that corresponds to a cluster assignment of all points (see figure).

One way to derive a clustering is to consider the pairwise distances between points.
Given a cluster assignment

x{displaystyle x}

, the values

xixj{displaystyle x_{i}x_{j}}

or

(1xi)(1xj){displaystyle (1-x_{i})(1-x_{j})}

evaluate to 1 if points

i{displaystyle i}

and

j{displaystyle j}

are in the same cluster.
Similarly,

xi(1xj){displaystyle x_{i}(1-x_{j})}

or

(1xi)xj{displaystyle (1-x_{i})x_{j}}

indicate that they are in different clusters.
Let

dij0{displaystyle d_{ij}geq 0}

denote the Euclidean distance between points

i{displaystyle i}

and

j{displaystyle j}

.
In order to define a cost function to minimize, when points

i{displaystyle i}

and

j{displaystyle j}

are in the same cluster we add their positive distance

dij{displaystyle d_{ij}}

, and subtract it when they are in different clusters.
This way, an optimal solution tends to place points which are far apart into different clusters, and points that are close into the same cluster.
The cost function thus comes down to

From the second line, the QUBO parameters can be easily found by re-arranging to be:

Using these parameters, the optimal QUBO solution will correspond to an optimal cluster w.r.t. above cost function.

Connection to Ising models[edit]

QUBO is very closely related and computationally equivalent to the Ising model, whose Hamiltonian function is defined as

with real-valued parameters

hj,Jij,μ{displaystyle h_{j},J_{ij},mu }

for all

i,j{displaystyle i,j}

.
The spin variables

σj{displaystyle sigma _{j}}

are binary with values from

{1,+1}{displaystyle lbrace -1,+1rbrace }

instead of

B{displaystyle mathbb {B} }

.
Moreover, in the Ising model the variables are typically arranged in a lattice where only neighboring pairs of variables

i j{displaystyle langle i~jrangle }

can have non-zero coefficients.
Applying the identity

σ2x1{displaystyle sigma mapsto 2x-1}

yields an equivalent QUBO problem:[2]

where

As the constant

C{displaystyle C}

does not change the position of the optimum

x{displaystyle x^{*}}

, it can be neglected during optimization and is only important for recovering the original Hamiltonian function value.

References[edit]

  1. ^ Kochenberger, Gary; Hao, Jin-Kao (2014). “The unconstrained binary quadratic programming problem: a survey” (PDF). Journal of Combinatorial Optimization. 28: 58–81. doi:10.1007/s10878-014-9734-0. S2CID 16808394.
  2. ^ a b Glover, Fred; Kochenberger, Gary (2019). “A Tutorial on Formulating and Using QUBO Models”. arXiv:1811.11538 [cs.DS].
  3. ^ Lucas, Andrew (2014). “Ising formulations of many NP problems”. Frontiers in Physics. 2: 5. arXiv:1302.5843. Bibcode:2014FrP…..2….5L. doi:10.3389/fphy.2014.00005.
  4. ^ Mücke, Sascha; Piatkowski, Nico; Morik, Katharina (2019). “Learning Bit by Bit: Extracting the Essence of Machine Learning” (PDF). LWDA. S2CID 202760166. Archived from the original (PDF) on 2020-02-27.
  5. ^ Tom Simonite (8 May 2013). “D-Wave’s Quantum Computer Goes to the Races, Wins”. MIT Technology Review. Retrieved 12 May 2013.
  6. ^ Ratke, Daniel (2021-06-10). “List of QUBO formulations”. Retrieved 2022-12-16.

External links[edit]

  • QUBO Benchmark (Benchmark of software packages for the exact solution of QUBOs; part of the well-known Mittelmann benchmark collection)