4
$\begingroup$

Suppose I am given a QUBO problem consisting in the minimization of a quadratic function $\vec{x}^T Q \vec{x}$ over a binary-valued vector $\vec{x} \in \{0, 1\}^n$, with $Q$ a symmetric indefinite real matrix. Is it possible to compute analytically (see EDIT) the optimal solution $\vec{x}_{min}$ and the corresponding minimum energy $E_{min} = \vec{x}_{min}^T Q \vec{x}_{min}$ (even if the method is computationally inefficient)?

My idea would be to solve the eigen-problem $Q \vec{v}_i = \lambda_i \vec{v}_i$ and then pick the minimum eigenvalue $\lambda_{min}$ as the minimum energy and the corresponding eigenvector $\vec{v}_{min}$ as the optimal solution of the QUBO. However, this approach cannot properly work because the minimum energy solution $\vec{x}_{min}$ is constrained to be binary while all the eigenvectors $\vec{v}_i$ are real. In general, this discrete nature of the problem fundamentally differs from the continuous domain over which the eigenvalues are typically defined. So here is my question: is there any smart workaround to this issue?

I read something suggesting to transform the original QUBO problem into a relaxed version based on continuous but bounded variables, solving the corresponding eigen-problem, and then rounding the result to obtain the final binary vector.

EDIT: analytically $\rightarrow$ exactly

$\endgroup$
2
  • 1
    $\begingroup$ You seem to accept that the solution could be inefficient. So why not just try every possible value of $\vec x$? $\endgroup$
    – DaftWullie
    Commented Jul 18 at 9:34
  • 1
    $\begingroup$ Yes, you're right and by the way I guess that trying every possible $\vec{x}$ is the only way to go if I want to get the exact solution. What I was looking for is a bit smarter algorithm to find the exact QUBO problem solution, still NP-hard of course, but maybe providing a little advantage in terms of the actual runtime in practice $\endgroup$ Commented Jul 18 at 9:53

1 Answer 1

6
$\begingroup$

The short answer: QUBO problems are known to be NP-hard. So, there should be no analytical solution.

The long answer: You seem confused about solving quadratic problems, eigenvalues and the meaning of analytical solutions.

In mathematics, when we say to solve something analytically, we mean to write an explicit expression without doing any numerics.

Generally, it is not possible to compute eigenvalues analytically for matrices larger than 4 by 4. This well-known result stems from the Galois theory. Finding eigenvalues is equivalent to finding the roots of a matrix's characteristic polynomial, and we know that there is no algebraic (or analytical) solution for polynomials larger than the 4th degree.

This means that if we want to find the eigenvalues of a large matrix, we need to resort to iterative approaches (numerical methods like Rayleigh), which are not considered analytical.

Now, with this out of the way, let's look at the eigenvalues of $Q$ and their relation to $\min_x x^TQx$.

Eigenvalues of $Q$ are not related to solutions of the quadratic problem $\min_x x^TQx$. For example, consider a $2 \times 2$ diagonal $Q$ with entries $1$ and $-1$. The eigenvalues are $1$ and $-1$, but the minimum of $x^TQx$ is unbounded for $x$ unbounded. Another example, diagonal $Q$ with entries $1$ and $2$. The smallest eigenvalue is $1$, but the minimum is $0$ as $x_{\min}=(0,0)$.

Since you want $x \in \{0,1\}^n$, I don't think looking into eigenvalues of $Q$ is a good approach. It is best if you look at integer programming methods: stuff like Simplex algorithm with branch and bound method, cutting planes etc. By the way, Simplex combined with the branch and bound method can be done by hand for small problems. Alternatively, Simplex combined with cutting planes can also be done by hand for very small problems. The latter has the advantage that it can be graphed on paper. Maybe this is what you were asking for. See these notes for an introductory material.

Only in quantum computing do we take quadratic problems and cast them into a problem of finding the lowest eigenvalue (energy) of a diagonal Hamiltonian. In this case, the smallest eigenvalue of the Hamiltonian $H$ corresponds to the smallest objective function value of the optimization problem $x^TQx$. But $Q$ is not a Hamiltonian, and its eigenvalues are unrelated to solutions; see quadratic programming. What we actually have is: $$\lambda_{\min}(H) = x_{\min}^T Q x_{\min}.$$

To expand on the above, for $n \times n$ matrix $Q$, the diagonal Hamiltonian $H$ that we formulate for quantum optimization is of dimension $2^n \times 2^n$. The diagonal entries are all possible values of $x^TQx$ for $x \in \{0,1\}^n$. That is, \begin{align} H = \begin{pmatrix} x_1^TQx_1 && 0 && \cdots && 0\\ 0 && x_2^T Q x_2 && \cdots && 0 \\ \vdots && \ddots && && \vdots \\ 0 && \cdots && 0 && x_{2^n}^TQx_{2^n} \end{pmatrix}. \end{align} Clearly, we never formulate $H$ explicitly as a matrix as it requires evaluation of $x^TQx$ for all $x$.

A few more remarks: If $Q$ has positive/negative eigenvalues, then $x^TQx$ is a convex/concave function for $x \in \mathbb{R}^n$. The solution to $\min$ ($\max$) is trivial. Otherwise, the optimization problem is non-convex. So, there is no hope for any analytical solutions.

Now, if $x$ is a binary string, the problem $x^TQx$ is not convex even if all eigenvalues are positive. This is because the domain of $x^TQx$ is the vertices of a hypercube, i.e., $x \in \{0,1\}^n$, which means that the domain is not convex. Again, there is no hope for an analytical solution.

Edit: You seem interested in a provably optimal solution to an optimization problem (not "analytical" or "exact"). In that case, Simplex and its more advanced variants/implementations (Gurobi solver, CPLEX, Gecko optimization library, Google OR-Tools) should be used. Those algorithms can yield a provably optimal solution to the problem subject to some additional runtime execution constraints. There is no need to brute force all solutions.

$\endgroup$
6
  • $\begingroup$ Very well written! +1 $\endgroup$ Commented Jul 18 at 6:06
  • $\begingroup$ @MartinVesely, TY. It took me awhile. $\endgroup$
    – MonteNero
    Commented Jul 18 at 6:12
  • $\begingroup$ @MonteNero, thank you very much for the clear answer! I apologize for the confusion about the concept of analytical solution in math, by that I was actually meaning exact solution. So, what I'm interested in is not an heuristic classical solver but instead an approach to find the exact QUBO solution in a reasonable amount of time in practice (for small-size problems) $\endgroup$ Commented Jul 18 at 10:15
  • $\begingroup$ That's why I thought simply taking the smallest eigenvalue of the diagonal Hamiltonian $H$ (and not the QUBO matrix $Q$, sorry again) could be a good idea. However, it's now clear that the diagonal of $H$ is just enumerating all the possible $\vec{x}_i^T Q \vec{x}_i$ so I guess there is no smarter approach than simply try all the $2^n$ configurations $\endgroup$ Commented Jul 18 at 10:27
  • $\begingroup$ @SimoneGasperini Simplex and its more advanced variants for quadratic problems combined with branch and bound (BB) or other methods for discretizing variables are considered to be "exact" if the BB method is exhaustive. In other words, you can be sure that the solution you got is proveably optimal. There are many advanced methods and solid theory for quad problems, just start looking into Integer programming, quadratic programming etc. $\endgroup$
    – MonteNero
    Commented Jul 18 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.