Representing a binary quadratic function using a phase adder
In Chapter 5, Using a Quantum Annealer – Developing a QUBO Function and Applying Constraints, we showed how D-Wave solves QUBO problems. If the problem is set up as a matrix, then we can use the diagonal terms as the linear values and the non-diagonal terms as the quadratic terms in a BQM, where the independent variables have only binary values, {0, 1}. The optimized solution is then found using D-Wave and other QUBO solvers, which produce a binary string with the lowest energy.
A binary quadratic model can be represented by the following equation:
As mentioned previously, xi and xj are binary variables, while ci,j is a floating-point coefficient. By saying i<j, we are stating that we are working with an upper-triangular matrix. Note that for simplicity, since x is binary, we can treat x2 as x. We will refer to c00 or c11 as just c0 and c1.
Let’s say we had the matrix...