Abstract
Recent advancements in quantum annealing hardware and numerous studies in this area suggest that quantum annealers have the potential to be effective in solving unconstrained binary quadratic programming problems. Naturally, one may desire to expand the application domain of these machines to problems with general discrete variables. In this paper, we explore the possibility of employing quantum annealers to solve unconstrained quadratic programming problems over a bounded integer domain. We present an approach for encoding integer variables into binary ones, thereby representing unconstrained integer quadratic programming problems as unconstrained binary quadratic programming problems. To respect some of the limitations of the currently developed quantum annealers, we propose an integer encoding, named bounded-coefficient encoding, in which we limit the size of the coefficients that appear in the encoding. Furthermore, we propose an algorithm for finding the upper bound on the coefficients of the encoding using the precision of the machine and the coefficients of the original integer problem. We experimentally show that this approach is far more resilient to the noise of the quantum annealers compared to traditional approaches for the encoding of integers in base two. In addition, we perform time-to-solution analysis of various integer encoding strategies with respect to the size of integer programming problems and observe favorable performance from the bounded-coefficient encoding relative to that of the unary and binary encodings.
Similar content being viewed by others
References
Albash, T., Lidar, D.A.: Adiabatic quantum computing (2016). arXiv:quant-ph/1611.04471
Albash, T., Vinci, W., Mishra, A., Warburton, P.A., Lidar, D.A.: Consistency tests of classical and quantum models for a quantum annealer. Phys. Rev. A 91, 042314 (2015). https://doi.org/10.1103/PhysRevA.91.042314
Amin, M., Dickson, N., Smith, P.: Adiabatic quantum optimization with qudits. Quantum Inf. Process. 12(4), 1819–1829 (2013). https://doi.org/10.1007/s11128-012-0480-x
Aramon, M., Rosenberg, G., Valiante, E., Miyazawa, T., Tamura, H., Katzgraber, H.G.: Physics-inspired optimization for quadratic unconstrained problems using a digital annealer (2018). arXiv:1806.08815
Bunyk, P.I., Hoskinson, E.M., Johnson, M.W., Tolkacheva, E., Altomare, F., Berkley, A.J., Harris, R., Hilton, J.P., Lanting, T., Przybysz, A.J., Whittaker, J.: Architectural considerations in the design of a superconducting quantum annealing processor. IEEE Trans. Appl. Supercond. 24(4), 1–10 (2014). https://doi.org/10.1109/TASC.2014.2318294
Cai, J., Macready, W.G., Roy, A.: A practical heuristic for finding graph minors (2014). arXiv:1406.2741
Farhi, E., Goldstone, J., Gutmann, S., Lapan, J., Lundgren, A., Preda, D.: A quantum adiabatic evolution algorithm applied to random instances of an NP-complete problem. Science 292(5516), 472–476 (2001). https://doi.org/10.1126/science.1057726
Gurobi Optimization, Inc.: Gurobi Optimizer Reference Manual (2015). http://www.gurobi.com/documentation/7.0/refman.pdf
Ishikawa, H.: Transformation of general binary MRF minimization to the first-order case. IEEE Trans. Pattern Anal. Mach. Intell. 33(6), 1234–1249 (2011). https://doi.org/10.1109/TPAMI.2010.91
Johnson, M.W., Amin, M.H.S., Gildert, S., Lanting, T., Hamze, F., Dickson, N., Harris, R., Berkley, A.J., Johansson, J., Bunyk, P., Chapple, E.M., Enderud, C., Hilton, J.P., Karimi, K., Ladizinsky, E., Ladizinsky, N., Oh, T., Perminov, I., Rich, C., Thom, M.C., Tolkacheva, E., Truncik, C.J.S., Uchaikin, S., Wang, J., Wilson, B., Rose, G.: Quantum annealing with manufactured spins. Nature 473(7346), 194–198 (2011). https://doi.org/10.1038/nature10012
Heim, B., Rønnow, T.F., Isakov, S.V., Troyer, M.: Quantum versus classical annealing of Ising spin glasses. Science 348, 215–217 (2015)
Karimi, S., Ronagh, P.: A subgradient approach for constrained binary programming via quantum adiabatic evolution (2017). arXiv:1605.09462
Katzgraber, H.G., Hamze, F., Zhu, Z., Ochoa, A.J., Munoz-Bauza, H.: Seeking quantum speedup through spin glasses: the good, the bad, and the ugly. Phys. Rev. X 5, 031026 (2015). https://doi.org/10.1103/PhysRevX.5.031026
Lee, L.W., Katzgraber, H.G., Young, A.P.: Critical behavior of the three- and ten-state short-range Potts glass: a Monte Carlo study. Phys. Rev. B 74, 104416 (2006). https://doi.org/10.1103/PhysRevB.74.104416
Mandrà, S., Zhu, Z., Katzgraber, H.G.: Exponentially biased ground-state sampling of quantum annealing machines with transverse-field driving Hamiltonians. Phys. Rev. Lett. 118, 070502 (2017). https://doi.org/10.1103/PhysRevLett.118.070502
Mansini, R., Ogryczak, W., Speranza, M.G.: Linear Models for Portfolio Optimization, pp. 19–45. Springer, Berlin (2015). https://doi.org/10.1007/978-3-319-18482-1_2
Matsuda, Y., Nishimori, H., Katzgraber, H.G.: Ground-state statistics from annealing algorithms: quantum versus classical approaches. New J. Phys. 11(7), 073021 (2009). https://doi.org/10.1088/1367-2630/11/7/073021
McGeoch, C.C., Wang, C.: Experimental evaluation of an adiabiatic quantum system for combinatorial optimization. In: Proceedings of the ACM International Conference on Computing Frontiers, CF ’13, New York, NY, USA, pp. 23:1–23:11 (2013). ACM. https://doi.org/10.1145/2482767.2482797
Rieffel, E.G., Venturelli, D., O’Gorman, B., Do, M.B., Prystay, E.M., Smelyanskiy, V.N.: A case study in programming a quantum annealer for hard operational planning problems. Quantum Inf. Process. 14, 1–36 (2015). https://doi.org/10.1007/s11128-014-0892-x
Rosenberg, G., Haghnegahdar, P., Goddard, P., Carr, P., Wu, K., de Prado, M.L.: Solving the optimal trading trajectory problem using a quantum annealer. IEEE J. Sel. Top. Signal Process. 10(6), 1053–1060 (2016). https://doi.org/10.1109/JSTSP.2016.2574703
Santoro, G.E., Tosatti, E.: Optimization using quantum mechanics: quantum annealing through adiabatic evolution. J. Phys. A Math. Gen. 39(36), R393 (2006). https://doi.org/10.1088/0305-4470/39/36/R01
Sawik, T.: Scheduling in Supply Chains Using Mixed Integer Programming. Wiley, Hoboken (2011). https://doi.org/10.1002/9781118029114
Venturelli, D., Marchand, D.J.J., Rojo, G.: Quantum annealing implementation of job-shop scheduling (2015). arXiv:1506.08479
Zhu, Z., Ochoa, A.J., Schnabel, S., Hamze, F., Katzgraber, H.G.: Best-case performance of quantum annealers on native spin-glass benchmarks: how chaos can affect success probabilities. Phys. Rev. A 93, 012317 (2016). https://doi.org/10.1103/PhysRevA.93.012317
Zick, K.M., Shehab, O., French, M.: Experimental quantum annealing: case study involving the graph isomorphism problem. Sci. Rep. 5, 11168 (2015). https://doi.org/10.1038/srep11168
Acknowledgements
We are thankful to Helmut G. Katzgraber, Gili Rosenberg, and the referees of Quantum Information Processing for insightful discussions and helpful feedback. We would also like to thank Marko Bucyk for editing this manuscript.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
A (Integer-to-binary encoding)
A (Integer-to-binary encoding)
In this section, we aim to find the upper bounds on the coefficients of the integer encoding when we reduce an unconstrained integer quadratic programming (UIQP) problem to an unconstrained binary quadratic programming (UBQP) problem in the \(\{ 0,1\}\) domain. Similar to what we discussed earlier, we assume that our UIQP problem has the form
with Q being symmetric.
We aim to represent the above problem as f(y) by substituting \(x= Cy\), where C is the encoding matrix we had earlier, i.e.,
and
After the substitution for x, we get the following equivalent binary formulation:
Unlike the spin variables for which the diagonal of \(C^t Q C\) became constant, the diagonal of \(C^t Q C\) is added to the linear term in this scenario since \(y_i^2 = y_i\) for \(y_i \in \{0,1\}\). Alternatively, we can represent f(y) as
where
The diagonal entries of \(Q_B\) are the linear terms, i.e., coefficients of the variables \(y_j^{x_i}\). We use linear and quadratic terms for binary model f(y) instead of local fields and couplers, respectively. We also refer to inequalities (10) and (11) as the ratio inequalities for linear and quadratic terms, respectively. Notice that in these ratios, minimum and maximum coefficients are measured in magnitude, so in our discussion that follows, we consider merely the magnitude of the coefficients.
Considering the fact that \(y_k^{x_i}y_l^{x_i}=y_l^{x_i}y_k^{x_i}\) and \(y_k^{x_i}y_l^{x_j} = y_l^{x_j}y_k^{x_i}\), the coefficients of linear and quadratic terms are listed below:
The difference between this case and what was presented in Sect. 3 is that the coefficients of \(y_j^{x_i}\) are no longer linear in \(c_j^{x_i}\) (compare with (17)); therefore, the smallest coefficient may no longer occur at \(c_j^{x_i}=1\). Notice that \(Q_{ii} \left( c_j^{x_i}\right) ^2 + q_i c_j^{x_i}\) intersects 0 at \(c_j^{x_i}= 0\) and \(c_j^{x_i} = \frac{-q_i}{Q_{ii}}\); therefore, if \(\frac{-q_i}{Q_{ii}} < 1\), then \(Q_{ii} \left( c_j^{x_i}\right) ^2 + q_i c_j^{x_i}\) takes its minimum at \(c_j^{x_i} =1\) and is increasing afterward. When this is the case for all \(i = 1, \ldots , n\), slight modification of Algorithm 2 is sufficient to find the \(\mu ^{x_i}\)’s. In the algorithm, the modification is at the initialization step of \(\mu ^{x_i}\)’s. Letting
the condition that needs to be satisfied for the linear coefficients is
Combined with the condition
we need to initialize \(\mu ^{x_i}\) as
where
It is worth mentioning the special cases where \(\text {sgn}(Q_{ii}) = \text {sgn}(q_i)\) (resulting in \(\frac{-q_i}{Q_{ii}} < 0\)), and \(Q_{ii}=0\) or \(q_i= 0\) belong to the above category, where \(Q_{ii} \left( c_j^{x_i}\right) ^2 + q_i c_j^{x_i}\) attains its minimum at 1.
In the general cases where there exists an i such that \(\frac{-q_i}{Q_{ii}}\ge 1\), satisfying the ratio condition on the linear terms is more complicated than what we discussed above. Not only might the minimum coefficient no longer occur at 1, but also the maximum could occur at either \(\mu ^{x_i}\) or \(\frac{-q_i}{2Q_{ii}}\), where the derivative of the function \(h(c_j^{x_i}) = Q_{ii} \left( c_j^{x_i}\right) ^2 + q_i c_j^{x_i}\) is zero. Our approach for these general cases is to first derive \(\mu ^{x_i}\)’s that satisfy the ratio condition for the quadratic terms and then adjust them accordingly to meet the ratio constraint on the linear terms.
Similar to the previous case, the minimum coefficient on the quadratic terms is
and the ratio condition on quadratic terms enforces
or, equivalently,
We may now initialize \(\mu ^{x^i}\) as \(\left\lfloor \sqrt{\frac{m_c}{|Q_{ii}| \epsilon _c}} \right\rfloor \) and use the loop of Algorithm 2 to satisfy (49), i.e., Algorithm 3.
After \(\mu ^{x_i}\)’s are calculated to satisfy the conditions (48) and (49), we need to check the ratio condition for the linear terms. Although some of the integer values \(\{ 1, 2, \ldots , \mu ^{x_i} \}\) may not appear in our encoding, knowing which integers will appear prior to finding \(\mu ^{x_i}\)’s is not trivial. The algorithm presented below guarantees that the ratio condition on the linear terms holds if any of these integer values appear in the encoding. Let us categorize the indices based on where the minimum and maximum linear coefficients occur; we introduce the following sets of indices for this purpose:
and
Note that \(\mu ^{x_i}\)’s returned by Algorithm 3 are integers. The sets with m and M superscripts are formed to facilitate computing minimum and maximum linear coefficients, respectively. For indices \(i \in \mathcal I^m_0\), the minimum linear term happens at 2; for indices in \( \mathcal I^m_1\), it happens at 1, and for indices in \( \mathcal I^m_2\), it happens at one of the two integers closest to \(\frac{-q_i}{Q_{ii}}\). Similarly, for the indices in \( \mathcal I^M_1\), the maximum linear coefficient happens at \(\mu ^{x_i}\), whereas for indices in \( \mathcal I^M_2\), it happens at either \(\mu ^{x_i}\) or at the closest integer to \(\frac{-q_i}{2Q_{ii}}\), i.e., \(\text {round}\left( \frac{- q_i}{2Q_{ii}}\right) \).
After categorizing the indices in the above sets, we may form the arrays \(v^m\) and \(v^M\), which represent the minimum and maximum coefficients of the linear terms for each variable, respectively:
We then sort entries of \(v^m\) (on the first entry) in increasing order; assume it results in vector \(\bar{v}^m\), so \(\bar{v}_1^m \le \bar{v}_2^m \le \cdots \le \bar{v}_n^m\) and sort \(v^M\) in decreasing order; that is, \(\bar{v}^M\) such that \(\bar{v}_1^M \ge \bar{v}_2^M \ge \cdots \ge \bar{v}_n^M\). We check whether \(\frac{\bar{v}_1^m}{\bar{v}_1^M} \ge \epsilon _l\). If this inequality holds, then we have obtained our set of \(\mu ^{x_i}\)’s; otherwise, we have the following options for improvement:
-
\(\bar{v}^m_1\) happens at an \(i \in \mathcal I_2^m\), where we can either change \(\mu ^{x_i}\) to increase the minimum coefficient, or change \(\mu ^{x_i}\) to decrease the maximum coefficient;
-
\(\bar{v}^m_1\) happens at \(i \in \mathcal I_1^m \cup \mathcal I_0^m\), in which case we can only change \(\mu ^{x_i}\) such that the maximum coefficient decreases.
In the first scenario where we have the option to both increase the minimum or decrease the maximum coefficient, we use a greedy approach to make the decision. In other words, if the minimum coefficient is improved, it will be \(v^m_{2,1}\) in the next iterate; similarly, the maximum coefficient will \(\bar{v}^M_{2,1}\), if updated. In our approach, having the interval \([\bar{v}^m_{1,1} , \bar{v}^M_{1,1}]\) for the coefficients, we wish to update it to either \([\bar{v}^m_{2,1} , \bar{v}^M_{1,1}]\) or \([\bar{v}^m_{1,1} , \bar{v}^M_{2,1}]\). These two intervals will be \(\left[ \frac{\bar{v}^m_{2,1}}{\bar{v}^M_{1,1}} , 1\right] \) or \(\left[ \frac{\bar{v}^m_{1,1}}{ \bar{v}^M_{2,1}}, 1\right] ]\), respectively, after the rescaling. We choose the option that gives us better lower bound, i.e., if
we attempt to improve the lower bound, thus decreasing \(\mu ^{x_i}\) for \(i = \bar{v}^m_{1,3}\). A formal presentation of what we have discussed is summarized in Algorithm 4.
Rights and permissions
About this article
Cite this article
Karimi, S., Ronagh, P. Practical integer-to-binary mapping for quantum annealers. Quantum Inf Process 18, 94 (2019). https://doi.org/10.1007/s11128-019-2213-x
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11128-019-2213-x