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
Finance is the study and discipline of money, currency and capital assets. It is related to, but not synonymous with economics, the study of production, distribution, and consumption of money, assets, goods and services (the discipline of fina ...
and
economics
Economics () is the social science that studies the Production (economics), production, distribution (economics), distribution, and Consumption (economics), consumption of goods and services.
Economics focuses on the behaviour and intera ...
to
machine learning
Machine learning (ML) is a field of inquiry devoted to understanding and building methods that 'learn', that is, methods that leverage data to improve performance on some set of tasks. It is seen as a part of artificial intelligence.
Machine ...
. QUBO is an
NP hard
In computational complexity theory, NP-hardness ( non-deterministic polynomial-time hardness) is the defining property of a class of problems that are informally "at least as hard as the hardest problems in NP". A simple example of an NP-hard pr ...
problem, and for many classical problems from
theoretical computer science
Theoretical computer science (TCS) is a subset of general computer science and mathematics that focuses on mathematical aspects of computer science such as the theory of computation, lambda calculus, and type theory.
It is difficult to circumsc ...
, like
maximum cut
For a graph, a maximum cut is a cut whose size is at least the size of any other cut. That is, it is a partition of the graph's vertices into two complementary sets and , such that the number of edges between and is as large as possible. Fin ...
,
graph coloring
In graph theory, graph coloring is a special case of graph labeling; it is an assignment of labels traditionally called "colors" to elements of a graph subject to certain constraints. In its simplest form, it is a way of coloring the vertices o ...
and the
partition problem In number theory and computer science, the partition problem, or number partitioning, is the task of deciding whether a given multiset ''S'' of positive integers can be partitioned into two subsets ''S''1 and ''S''2 such that the sum of the numbers ...
, embeddings into QUBO have been formulated.
Embeddings for machine learning models include
support-vector machines,
clustering and
probabilistic graphical models.
Moreover, due to its close connection to
Ising models, QUBO constitutes a central problem class for
adiabatic quantum computation
Adiabatic quantum computation (AQC) is a form of quantum computing which relies on the adiabatic theorem to do calculations and is closely related to quantum annealing.
Description
First, a (potentially complicated) Hamiltonian (quantum mechanic ...
, where it is solved through a physical process called
quantum annealing
Quantum annealing (QA) is an optimization process for finding the global minimum of a given objective function over a given set of candidate solutions (candidate states), by a process using quantum fluctuations. Quantum annealing is used mainl ...
.
Definition
The set of
binary
Binary may refer to:
Science and technology Mathematics
* Binary number, a representation of numbers using only two digits (0 and 1)
* Binary function, a function that takes two arguments
* Binary operation, a mathematical operation that t ...
vectors of a fixed length
is denoted by
, where
is the set of binary values (or ''bits'').
We are given a real-valued upper
triangular matrix , whose entries
define a weight for each pair of indices
within the binary vector.
We can define a function
that assigns a value to each binary vector through
:
Intuitively, the weight
is added if both
and
have value 1.
When
, the values
are added if
, as
for all
.
The QUBO problem consists of finding a binary vector
that is minimal with respect to
, namely
:
In general,
is not unique, meaning there may be a set of minimizing vectors with equal value w.r.t.
.
The complexity of QUBO arises from the number of candidate binary vectors to be evaluated, as
grows exponentially in
.
Sometimes, QUBO is defined as the problem of ''maximizing''
, which is equivalent to minimizing
.
Properties
* Multiplying the coefficients
with a positive factor
scales the output of
accordingly, leaving the optimum
unchanged:
:
* Flipping the sign of all coefficients flips the sign of
's output, making
the binary vector that ''maximizes''
:
:
* If all coefficients are positive, the optimum is trivially
. Similarly, if all coefficients are negative, the optimum is
.
* If
, i.e., the bits can be optimized independently, then the corresponding QUBO problem is solvable in
, the optimal variable assignments
simply being 1 if
and 0 otherwise.
Applications
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.
Cluster Analysis
As an illustrative example of how QUBO can be used to encode an optimization problem, we consider the problem of
cluster analysis
Cluster analysis or clustering is the task of grouping a set of objects in such a way that objects in the same group (called a cluster) are more similar (in some sense) to each other than to those in other groups (clusters). It is a main task of ...
.
Here, we are given a set of 20 points in 2D space, described by a matrix
, where each row contains two
cartesian coordinates
A Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of numerical coordinates, which are the signed distances to the point from two fixed perpendicular oriented lines, measured in t ...
.
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
to the point corresponding to the
-th row in
, indicating whether it belongs to the first (
) or second cluster (
).
Consequently, we have 20 binary variables, which form a binary vector
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
, the values
or
evaluate to 1 if points
and
are in the same cluster.
Similarly,
or
indicate that they are in different clusters.
Let
denote the
Euclidean distance
In mathematics, the Euclidean distance between two points in Euclidean space is the length of a line segment between the two points.
It can be calculated from the Cartesian coordinates of the points using the Pythagorean theorem, therefor ...
between points
and
.
In order to define a cost function to minimize, when points
and
are in the same cluster we add their positive distance
, 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
QUBO is very closely related and computationally equivalent to the
Ising model, whose
Hamiltonian function
Hamiltonian mechanics emerged in 1833 as a reformulation of Lagrangian mechanics. Introduced by Sir William Rowan Hamilton, Hamiltonian mechanics replaces (generalized) velocities \dot q^i used in Lagrangian mechanics with (generalized) ''momenta ...
is defined as
:
with real-valued parameters
for all
.
The ''spin variables''
are binary with values from
instead of
.
Moreover, in the Ising model the variables are typically arranged in a lattice where only neighboring pairs of variables
can have non-zero coefficients.
Applying the identity
yields an equivalent QUBO problem:
:
where
:
As the constant
does not change the position of the optimum
, it can be neglected during optimization and is only important for recovering the original Hamiltonian function value.
References
External links
QUBO Benchmark(Benchmark of software packages for the exact solution of QUBOs; part of the well-known Mittelmann benchmark collection)
*
*
Machine learning algorithms
{{compu-AI-stub