Transforming optimization problems into a QUBO form: A tutorial

Alexander M. Semenov,Sergey R. Usmanov,Aleksey K. Fedorov
2024-10-28
Abstract:Practically relevant problems of quadratic optimization often contain multidimensional arrays of variables interconnected by linear constraints, such as equalities and inequalities. The values of each variable depend on its specific meaning and can be binary, integer, discrete, and continuous. These circumstances make it technically difficult to reduce the original problem statement to the QUBO form. The paper identifies and considers three main transformations of the original problem statement, namely, the transition from a multidimensional to a one-dimensional array of variables, the transition in mixed problems to binary variables, and the inclusion of linear constraints in the objective function in the form of quadratic penalties. Convenient formulas for calculations are presented and proven, simplifying the implementation of these transformations. In particular, the formulas for the transition in the problem statement from a multidimensional to a one-dimensional array of variables are based on the use of the Kronecker product of matrices. The considered transformations are illustrated by numerous examples.
Optimization and Control,Quantum Physics
What problem does this paper attempt to address?
The problem that this paper attempts to solve is how to transform the multi - dimensional variable optimization problem with linear constraints into the quadratic unconstrained binary optimization (QUBO) form. Specifically, the paper focuses on the following types of transformations: 1. **Transformation from multi - dimensional arrays to one - dimensional arrays**: - Represent multi - dimensional variables as one - dimensional vectors through appropriate index arrangements and matrix operations (such as the Kronecker product). For example, for a two - dimensional array \( x_{ij} \), it can be transformed into a one - dimensional vector \( \bar{x} \) through Fortran - style index arrangements. 2. **Transformation from integer, discrete and continuous variables to binary variables (i.e., binarization)**: - For integer variables, use binary encoding for transformation. - For discrete variables, adopt one - hot encoding. - For continuous variables, discretize them into combinations of binary variables by setting precision requirements. 3. **Incorporating linear constraints into the objective function as quadratic penalty terms**: - Add linear equality and inequality constraints to the objective function by introducing penalty terms, thereby transforming the constrained optimization problem into an unconstrained optimization problem. For example, for the equality constraint \( Ax = b \), \( \frac{\rho}{2} \|Ax - b\|^2 \) can be added to the objective function as a penalty term. The specific formulas and methods of these transformations are all derived and proven in detail in the paper, aiming to simplify the implementation in practical applications and ensure that the transformed QUBO problem is equivalent to the original problem. ### Example Illustrate how to perform these transformations with a simple example: Suppose there is an optimization problem with integer variables, where the variable \( x_j \in [n_j, m_j] \). To transform it into the QUBO form, first determine the number of binary bits \( p_j \) required for each variable, such that \( m_j - n_j \leq 2^{p_j} - 1 \). Then, the following formula can be used for transformation: \[ x_j = n_j + \sum_{i = 1}^{p_j - 1} 2^{i - 1} y_{ij} + (m_j - n_j - 2^{p_j - 1} + 1) y_{p_j j} \] Here \( y_{ij} \) is a binary variable. In this way, the integer variables in the original problem are transformed into a linear combination of binary variables. ### Summary The main purpose of this paper is to provide a systematic method to transform complex optimization problems of multi - dimensional and multi - type variables into the standard QUBO form, so as to use specialized hardware or simulators to solve them. This not only simplifies the representation of the problem, but also makes it possible to solve it efficiently.