0% found this document useful (0 votes)
10 views21 pages

47-779 Lecture 5 - Quadratic Unconstrained Binary Optimization (QUBO)

Uploaded by

RenatoSoviético
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views21 pages

47-779 Lecture 5 - Quadratic Unconstrained Binary Optimization (QUBO)

Uploaded by

RenatoSoviético
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Quantum Integer

Programming

47-779
Quadratic Unconstrained
Binary Optimization (QUBO)

William Larimer Mellon, Founder 1


Quiz 3
Follow Lecture X and create your Amazon Braket Account!
If you already have an AWS account please send it over the chat, if not send us an email
that you would like to use to register to it.

Besides, go and create a free account for D-Wave


https://cloud.dwavesys.com/leap/

And for IBM Quantum Experience


https://quantum-computing.ibm.com/login

2
William Larimer Mellon, Founder
Agenda

o QUBO Definition

o QUBO - Ising Model Mapping

o QUBO - Integer Programming model

– QUBO: Binarization

– QUBO: Unconstraining

– QUBO: Quadratization

o Integer Programming as QUBO

o Coloring Example

o Integer Factorization

3
William Larimer Mellon, Founder
QUBO model
Quadratic Unconstrained Binary Optimization

Quadratic coefficient matrix


o Can be either upper triangular or complete
o Elements on diagonal can be linearized
o Represents adjacency matrix of a problem
Offset
o Irrelevant for optimization

In terms of IP it would be a
(possible non-convex if )
Integer Nonlinear Program

4
William Larimer Mellon, Founder
QUBO - Ising Mapping
1-to-1 mapping between QUBO and Ising models using spin-binary
bijection

5
William Larimer Mellon, Founder
QUBO as Integer Programs

Although this is already solvable using INLP programming tools, we can reformulate it as
a ILP by adding a variable whose nonlinearity can be posed a linear
inequalities.
Experimental results show this is the most efficient ILP formulation of the Ising problem

[1] Billionnet, A., Elloumi, S.: Using a mixed integer quadratic programming solver
for the unconstrained quadratic 0-1 problem. Mathematical Programming 109(1)
(2007) 55–68
6
William Larimer Mellon, Founder
QUBO - Binarization
How to transform general Integer Programs into Binary programs?

In general with a width of the integer encoding

o Unary encoding
o Binary encoding
o Bounded encoding
We can find an encoding with an upper bound for the coefficients

[1] Karimi, Sahar, and Pooya Ronagh. "Practical integer-to-binary mapping for quantum
annealers." Quantum Information Processing 18.4 (2019): 94. 7
William Larimer Mellon, Founder
QUBO - Binarization
upper bound can be computed from the problem matrix
and the resolution of the quadratic and linear terms in the machine

[1] Karimi, Sahar, and Pooya Ronagh. "Practical integer-to-binary mapping for quantum
annealers." Quantum Information Processing 18.4 (2019): 94. 8
William Larimer Mellon, Founder
QUBO - Pseudo-Boolean
functions and Quadratization
Any pseudo-Boolean function defined as

Can be written uniquely as a sum of multilinear functions

We can transform any binary polynomial into a quadratic


polynomial by introducing new variables as we saw before
Naive example:
o Using linear inequalities 1 1 1 1 0

1 1 0 1 1

o Using a polynomial expression 1 0 1 0 1

1 0 0 0 0

o Graph: 0 1 1 0 1
3
0 1 0 0 0
Usually called -2 -2
ancillary variables 0 0 1 0 3

0 0 0 0 0
1
[1] Boros, Endre, and Peter L. Hammer. "Pseudo-boolean optimization." Discrete applied
mathematics 123.1-3 (2002): 155-225. 9
William Larimer Mellon, Founder
QUBO - Quadratization and
logical functions
We can follow the previous reduction to obtain a Quadratically
constrained program from any arbitrary problem.
There are many clever way of “Quadratizing” problems [1]

o Cubic

o Quartic

Logical gates
AND:
OR:
NOT:

[1] Dattani, N. (2019-01-14), Quadratization in discrete optimization and quantum mechanics,


arXiv:1901.04405 10
William Larimer Mellon, Founder
QUBO - Unconstraining
Lagrange Multipliers
For LP problems we had

Where determining the multipliers can be written as


and where the following holds:

For IP problems, strong duality does not hold, but we can still use the
multipliers to convert the problem into unconstrained

11
William Larimer Mellon, Founder
QUBO - Unconstraining
We can transform any arbitrary constraint in terms of binaries into
multilinear, and then quadratize them.
We can then transform inequalities into equalities by introducing slack
variables, which by scaling the constraints become integers
FInally we can binarize these slacks

Considering that we can only deal with discrete variable in QUBO, we


cannot change the value of the multipliers.
o Set the multipliers to be constant penalty factor!
o Example: Integer linear inequalities become penalties by “squaring”
them

12
William Larimer Mellon, Founder
QUBO - Unconstraining
Penalty factor
In general, we represent the constrained problem with a feasible region

We are mapping it into a QUBO problem

Where the variables include both the original variables and ancillas
The penalization factor for each constraint should read

Where is the gap between feasible and infeasible solutions.


Therefore we could in general find
but in practice this becomes an
MILP and its as tough to solve as
the original QUBO

[1] Bian, Zhengbing, et al. "Discrete optimization using quantum annealing on sparse Ising
models." Frontiers in Physics 2 (2014): 56. 13
William Larimer Mellon, Founder
QUBO - Examples
Binary Linear Programming

We can write the energy function in two terms


o Constraint satisfaction

o Objective function

How to determine the penalty? Guarantee that the minimal


change in infeasibility is larger than the maximal case in objective

It can be tightened by using properties of the constraints!


[1] Lucas, Andrew. "Ising formulations of many NP problems." Frontiers in Physics 2 (2014): 5.
14
William Larimer Mellon, Founder
Putting it all together

Transforming IP into QUBO


Let’s go to the code

https://colab.research.google.com/github/bern
alde/QuIP/blob/master/notebooks/Notebook%2
05%20-%20QUBO.ipynb

15
William Larimer Mellon, Founder
QUBO - Examples
Coloring with colors
Groebner basis polynomial

IP formulation (SAT)

QUBO Formulation

[1] Lucas, Andrew. "Ising formulations of many NP problems." Frontiers in Physics 2 (2014): 5.
16
William Larimer Mellon, Founder
QUBO for coloring initial graph

with 3 colors

https://colab.research.google.com/github/bern
alde/QuIP/blob/master/notebooks/Notebook%2
05%20-%20QUBO.ipynb

17
William Larimer Mellon, Founder
QUBO - Quadratization
Algebraic geometry

[1] Dridi, Raouf, and Hedayat Alghassi. "Prime factorization using quantum annealing and
computational algebraic geometry." Scientific reports 7 (2017): 43048. 18
William Larimer Mellon, Founder
QUBO - Quadratization
Algebraic geometry

[1] Dridi, Raouf, and Hedayat Alghassi. "Prime factorization using quantum annealing and
computational algebraic geometry." Scientific reports 7 (2017): 43048. 19
William Larimer Mellon, Founder
QUBO - Quadratization

[1] Dridi, Raouf, and Hedayat Alghassi. "Prime factorization using quantum annealing and
computational algebraic geometry." Scientific reports 7 (2017): 43048. 20
William Larimer Mellon, Founder
Integer Factorization by Raouf
and Hedayat
Initial code

https://colab.research.google.com/github/bern
alde/QuIP/blob/master/notebooks/Notebook%2
05%20-%20QUBO.ipynb

21
William Larimer Mellon, Founder

You might also like