Getting started with the derivation
Here, we will detail the QUBO formulation of the 0/1 knapsack formulation with integer weight constraint taken from Chapter 11:
Splitting the preceding equation into the three equations gives us the following:
We know that xi and yn are binary.
Before we continue, let’s review the expansion of the square of a sum:
Here, ai is a constant:
Since xi is binary,
Thus,
The first sum on the right side of the equation represents the linear terms or the terms on the diagonal of the matrix, while the second sum on the right side is the upper-right quadratic terms.
Now, expanding equation A. 1:
Using equation A. 7, we can expand the first term:
Next, we can expand...