# Quadratic Unconstrained Binary Optimization (QUBO)

**Introduction**

The Quadratic Unconstrained Binary Optimization (QUBO) model can solve several optimization problems such as max-cut, max-clique, network flows, vertex cover, and other graph management problems. Since qubit network structures using Ising spins can encode QUBO problems, it is an interesting application area for the current generation of quantum computers. The following statement defines the QUBO problems:

where \(x_i\in0,1\) is a binary vector of decision variables and \(Q\) is a square matrix of constants. The \(Q\) matrix can be symmetric or upper triangular. In terms of cost functions, the QUBO problem can be stated as follows:

Given a graph \(G=V,E\) with \(V=1,2,3,..i..n\) vertices (or nodes) and \(E=i,j:i,j ∈N\) edges. Let the weight of the edges be \(Q_{ij}\). Then the QUBO problem is the following maximization, with both linear and quadratic terms:

In the symmetric form, the transformation is given by \(\forall i\neq j,\ Q_{ij}^\prime=\ \frac{\left(Q_{ij}+Q_{ji}\right)}{2}\).

In the upper triangle form, the transformation is given by:

Recall the following Pauli-\(Z\) operator and its action on the computational basis states:

The action of this operator on the computational basis states is as follows:

which means the eigenvalues of the \(\sigma_z\) operator is \(\pm1\). Therefore, we can use it to encode Ising spin states by mapping the variables \(x_i\ \in\ \left\{0,1\right\}^n\) into spin states \(x_i\ \in\ \left\{-1,1\right\}^n\), with \(x_i=\ \frac{\left(1+\sigma_i^z\right)}{2}\). Plugging these mappings, we get a summation of the weighted tensor products of \(\sigma_z\). Each term in the summation contains one or two terms of \(\sigma_z\), which can be interpreted using the classical Ising spin model.

The Hamiltonian of a 1-D Ising spin chain is a quadratic function of \(n\) spins, each with eigenvalues \(\pm1\), described by the following equation:

where \(\sigma_i^x\) and \(\sigma_i^z\) are the spins at the \(i^{th}\) location of the chain. \(g\) is a dimensionless coupling constant denoting the relative strength of the external field compared with the nearest neighbor interaction. \(J\) is a term that includes the inverse of temperature and energy scale. \(\sigma_i^z\sigma_{i+1}^z\) denotes the interaction between adjacent spins. The terms in the above equation commute. Hence \(H\) can be implemented as a phase operator \(U\left(\gamma\right)=\ e^{-i\gamma H}\).

Historically, simulated annealing algorithms employed the statistical physics of the Ising spin glasses. More relevant to the present discussions, we shall find that the Ising spin glasses represent the QUBO class of problems. If the binary quadratic optimization problem has constraints, the addition of quadratic penalties can compensate for the constraint violations in the objective function. The decision form of the Ising spin glass is NP-complete. Hence there exists a polynomial-time mapping to all other NP-complete problems using this model.