This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Constructing Driver Hamiltonians for Optimization Problems with Linear Constraints

Hannes Leipold1,2, Federico M. Spedalieri1,3 1Information Sciences Institute, University of Southern California, Marina del Rey, CA 90292, USA
2Department of Computer Science, University of Southern California, Los Angeles, CA 90089, USA
3Department of Electrical and Computer Engineering, University of Southern California, Los Angeles, CA 90089, USA
Abstract

Recent advances in the field of adiabatic quantum computing and the closely related field of quantum annealing have centered around using more advanced and novel Hamiltonian representations to solve optimization problems. One of these advances has centered around the development of driver Hamiltonians that commute with the constraints of an optimization problem - allowing for another avenue to satisfying those constraints instead of imposing penalty terms for each of them. In particular, the approach is able to use sparser connectivity to embed several practical problems on quantum devices in comparison to the standard approach of using penalty terms. However, designing the driver Hamiltonians that successfully commute with several constraints has largely been based on strong intuition for specific problems and with no simple general algorithm for generating them for arbitrary constraints. In this work, we develop a simple and intuitive algebraic framework for reasoning about the commutation of Hamiltonians with linear constraints - one that allows us to classify the complexity of finding a driver Hamiltonian for an arbitrary set of linear constraints as NP-Complete. Because unitary operators are exponentials of Hermitian operators, these results can also be applied to the construction of mixers in the Quantum Alternating Operator Ansatz (QAOA) framework.

I Introduction

Quantum annealing has been proposed as a heuristic method to exploit quantum mechanical effects in order to solve discrete optimization problems. Typically, these problems require optimizing a quadratic cost function subject to a set of linear constraints. The usual approach to treating these constraints consists of adding them to the cost function as penalty terms, thereby transforming the constrained optimization into an unconstrained one. This approach has some drawbacks, including an increase in the required resources (i.e., higher connectivity and increased dynamical range for the parameters that define the instance). In Ref.hen2016quantum , the authors introduced the idea of constrained quantum annealing (CQA), that uses specially tailored driver Hamiltonians for a specific set of constraints. These tailored Hamiltonians have several advantages, such as reducing the size of the search space of the problem and reducing the number of needed interactions to implement the annealing protocol. At the heart of the approach is the idea that a Hamiltonian which commutes with the operator embedding of the constraints and starts within the feasible space of configurations will remain in it throughout the evolution.

While Ref.hen2016quantum looked primarily at commuting with a single global constraint, the work in Ref.hen2016driver focused on finding driver Hamiltonians for several constraints. Under special conditions, the authors were able to construct appropriate driver Hamiltonians for several optimization problems of practical interest. In this paper, we ask and answer the general question of, given a set of arbitrary linear constraints, can we construct a driver Hamiltonian which will commute with the operator embedding of the constraints? Our main result is that this problem is NP-Complete – answering a question posited originally in Ref.hen2016driver . Along the way, we will derive a simple formula for describing the commutation relation and exploit it to understand many facets of CQA. These results can be naturally applied to the Quantum Alternating Operator Ansatz (QAOA) framework hadfield2017quantum, where one of the central tasks is to find mixer operators that connect feasible solutions of a constrained optimization problem. Since unitary operators are exponentials of Hermitian operators (for every unitary matrix UU, there exists a Hermitian matrix HH such that U=eiHU=e^{iH}) and therefore the existence of a unitary matrix with this commutative property necessitates the existence of the Hermitian matrix with the same commutative property (since [eiH,C^]=k=0[(iH)k,C^]/k![e^{iH},\hat{C}]=\sum_{k=0}^{\infty}[\left(iH\right)^{k},\hat{C}]/k!), our results directly translate into this setting as well.

The paper is organized as follows. In Section II we review the basic ideas behind constrained quantum annealing. In Section III, we derive a simple algebraic condition for the commutation relation of the driver Hamiltonian and the constraint operators. For many practical applications, Hamiltonians with bounded weight interaction (local) terms are often desired; in Section IV we show how brute forcing the simple algebraic condition from Section III to find driver Hamiltonians of bounded weight. In Section V, we introduce several variations of the problem ILP-QCOMMUTE, the problem of finding a Hermitian matrix that will commute with the constraint operators. We also reduce the EQUAL SUBSET SUM problem to the problem ILP-QCOMMUTE (and in Appendix A we show it for the special case of binary valued linear constraints). The EQUAL SUBSET SUM problem is known to be NP-Complete, thus proving our main result. We define a related complexity class, ILP-QCOMMUTE-k-LOCAL, about finding a Hermitian matrix that commutes with the constraints and has interaction terms up to kk weight. ILP-QCOMMUTE-k-LOCAL is in P by the approach detailed in Section IV. Other questions of interest, such as finding a driver Hamiltonian that has full reachability over a constrained space for a CQA protocol, will be addressed through our formulation in Section VI. We conclude with a discussion of the significance of our result and open problems related to what we have shown in this work.

II Background

In the quantum annealing (QA) framework, gradually decreasing quantum fluctuations are used to traverse the barriers of an energy landscape in the search of global minima to complicated cost functions kadowaki1998quantum ; farhi2000quantum . For an overview of these approaches, we refer the reader to Ref.albash2018adiabatic . Quantum annealing has gained traction for combinatorial optimization farhi2001quantum ; santoro2006optimization ; bian2016mapping ; hauke2020perspectives as a way to solve hard optimization problems faster and, more recently, for machine learning adachi2015application ; mott2017solving ; amin2018quantum ; biamonte2017quantum ; li2018quantum ; kumar2018quantum as a way to naturally sample desired probability distributions quickly. In the case of solving an optimization problem, the problem is encoded in the Hamiltonian HpH_{p} such that the ground state is the optimum solution. Usually this is readily done by expressing the problem as an Ising model, a model for spin glassesbrush1967history ; sherrington1975solvable ; castellani2005spin ; troyer2005computational .

Once the problem Hamiltonian is described, the QA framework prescribes an evolution to the final Hamiltonian from some readily preparable Hamiltonian HdH_{d} - usually through a linear interpolation of HdH_{d} and HpH_{p}:

H(s)=sHp+(1s)Hd,\displaystyle H(s)=s\,H_{p}+(1-s)\,H_{d}, (1)

where there is a continuous smooth function s(t)s(t) for t[0,T]t\in[0,T] such that s(0)=0s(0)=0 and s(T)=1s(T)=1. If the process is varied slowly enough, the adiabatic theorem ensures that the wave function of the system will be close to the instantaneous ground state of the system for any ss and therefore any tt. By the adiabatic theorem, if the total time TT that the system is evolved for is large compared to the inverse of the minimum gap squared, then the wavefunction of the system will be close to the ground state of HpH_{p}. For the purpose of our presentation here, we restrict our focus to the case of binary linear optimization problems, a heavily studied optimization class. Specifically, we can consider a set of linear constraints 𝒞={C1,,Cm}\mathcal{C}=\{C_{1},\ldots,C_{m}\}. Suppose that the solutions to the optimization problem are subject to constraints CiC_{i} such that a solution state x{0,1}nx\in\{0,1\}^{n} satisfies Ci(x)=jcijxi=biC_{i}(x)=\sum_{j}c_{ij}x_{i}=b_{i} for some bib_{i}. Because CiC_{i} is a simple linear function, we can associate a vector ci\vec{c}_{i} with it such that Ci(x)=cixC_{i}(x)=\vec{c}_{i}\cdot\vec{x} where cin\vec{c}_{i}\in\mathbb{Z}^{n}. When referring to constraints throughout this paper, we are referring specifically to linear constraints, for which our main results are pertinent to.

II.1 Constraint Quantum Annealing for Integer Linear Programming

We use the ordinary embedding of binary variables xi{0,1}x_{i}\in\{0,1\} in the computational basis for quantum annealing, such that x{0,1}n\vec{x}\in\{0,1\}^{n} is represented by |x=|x1|xn2n\left\lvert\,\vec{x}\,\right\rangle=\left\lvert\,x_{1}\,\right\rangle\ldots\left\lvert\,x_{n}\,\right\rangle\in\mathbb{C}^{2^{n}} (i.e. σiz|x=(12xi)|x\sigma_{i}^{z}\left\lvert\,\vec{x}\,\right\rangle=\left(1-2\,x_{i}\right)\left\lvert\,\vec{x}\,\right\rangle) and the final Hamiltonian is diagonal in the computational basis so that we can read off a solution by measuring in that basis. Following the framework of CQA, given a constraint C(x)=cxC(x)=\vec{c}\cdot\vec{x}, we associate CC with an embedded constraint operator C^=i=1nciσiz\hat{C}=\sum_{i=1}^{n}c_{i}\sigma_{i}^{z}. Let us consider the case of a single constraint - C=(1,,1)C=(1,\ldots,1) - over nn variables. This is also the first case presented in Ref.hen2016quantum . It is simple to check that Hd=i=1n1(σixσi+1x+σiyσi+1y)H_{d}=\sum_{i=1}^{n-1}(\sigma_{i}^{x}\sigma_{i+1}^{x}+\sigma_{i}^{y}\sigma_{i+1}^{y}) commutes with the constraint embedded operator C^=i=1nσiz\hat{C}=\sum_{i=1}^{n}\sigma_{i}^{z}. For example, this type of constraint may arise in graph partitioning, since the partitions must split the graph into equal size. For the Graph Partition problem, one is given a graph GG and is asked to partition the vertices VV into equal subsets such that the number of edges between the two is minimized. In terms of the Ising model, we can consider a collection of nn qubits, such that | 0\left\lvert\,0\,\right\rangle (| 1\left\lvert\,1\,\right\rangle) for qubit ii represents placing vertex viv_{i} in partition 1 (2). As such, we design a penalty Hamiltonian HpH_{p} and a driver Hamiltonian HdH_{d} such that the final state will be a solution to the graph partitioning problem. Assuming the transverse field driver Hamiltonian - Hd=i=1nσixH_{d}=\sum_{i=1}^{n}\sigma_{i}^{x} - a simple penalty Hamiltonian can be:

Hp=(i,j)E(𝟙σizσjz)+α(i=1nσiz)2,\displaystyle H_{p}=\sum_{(i,j)\in E}\left(\mathbbm{1}-\sigma_{i}^{z}\sigma_{j}^{z}\right)+\alpha\,\left(\sum_{i=1}^{n}\sigma_{i}^{z}\right)^{2}, (2)

where the first term assigns a positive potentiality to each edge that connects vertices across the partitions and the second term is the constraint operator squared.

In general the penalty factor α\alpha must be greater than min(2dm,n)/8\text{min}(2\,d_{m},n)/8 where dmd_{m} is the maximal degree of GG lucas2014ising . Note that the term (i=1nσiz)2\left(\sum_{i=1}^{n}\sigma_{i}^{z}\right)^{2} is C^2\hat{C}^{2} and requires n2n^{2} two body interaction terms to implement. However, if we choose our HdH_{d} such that [Hd,C^]=0[H_{d},\hat{C}]=0, then we can use the simpler penalty Hamiltonian:

Hp=(i,j)E(𝟙σizσjz).\displaystyle H_{p}=\sum_{(i,j)\in E}\left(\mathbbm{1}-\sigma_{i}^{z}\sigma_{j}^{z}\right). (3)

Note that since HpH_{p} is diagonal in the spin-z basis, it trivially commutes with the constraints.

One benefit to this construction is that the driver Hd=i=1n1(σixσi+1x+σiyσi+1y)H_{d}=\sum_{i=1}^{n-1}(\sigma_{i}^{x}\sigma_{i+1}^{x}+\sigma_{i}^{y}\sigma_{i+1}^{y}), for example, commutes with C^\hat{C} and only requires n1n-1 two body interaction terms to implement. As such, the total number of two body terms required to solve the problem can be greatly reduced by using driver Hamiltonians beyond the transverse field if they commute with a set of constraints. As long as the initial wavefunction has an expected value of n/2n/2 for C^\hat{C} (n/2+1n/2+1 or n/21n/2-1 if nn is odd), the wavefunction will remain in the subspace with this expected value for the entirety of the anneal. As an example of Graph Partition that we will return to later, consider a graph with 4 vertices V={v1,v2,v3,v4}V=\{v_{1},v_{2},v_{3},v_{4}\}, connected into a single path by edges E={e1,e2,e3}E=\{e_{1},e_{2},e_{3}\} with e1=(v1,v2),e2=(v2,v3),e3=(v3,v4)e_{1}=(v_{1},v_{2}),e_{2}=(v_{2},v_{3}),e_{3}=(v_{3},v_{4}). Then in this case, Hd=(σ1xσ2x+σ1yσ2y)+(σ2xσ3x+σ2yσ3y)+(σ3xσ4x+σ3yσ4y)H_{d}=(\sigma_{1}^{x}\sigma_{2}^{x}+\sigma_{1}^{y}\sigma_{2}^{y})+(\sigma_{2}^{x}\sigma_{3}^{x}+\sigma_{2}^{y}\sigma_{3}^{y})+(\sigma_{3}^{x}\sigma_{4}^{x}+\sigma_{3}^{y}\sigma_{4}^{y}). Since we are interested in an even partition, the starting state should have an equal number of 1s and 0s. For example, | 0011\left\lvert\,0011\,\right\rangle is in the correct subspace. It is important to note that driver Hamiltonians are constructed irrespective of the value that the constraint is set to, since the eigenvalue of the constraint operator with respect to the initial wavefunction will determine what value is preserved during the anneal. For a wavefunction that is not an eigenvector of a constraint operator, the commuting property of the driver Hamiltonian with the constraint operator will mean that the projection of the wavefunction onto each specific eigenspace will evolve independently of the rest of the wavefunction.

For the purpose of adiabatic quantum computing, the initial wavefunction of the system has to be in the ground state of the initial Hamiltonian, while a general driver Hamiltonian from this construction can be highly nontrivial if there are many constraints. Therefore, specifying an alternative initial Hamiltonian for CQA is also a major area of research, since we want the initial Hamiltonian to have a ground state that is easy to prepare. One approach to overcome this is to use an initial Hamiltonian diagonal in the computational basis and linear on the σz\sigma_{z} operators, that has as its ground state a specific solution in the feasible space in the spin-z basis, and then evolve from this initial Hamiltonian to the driver Hamiltonian (whose ground state will have support on all or a subset of the feasible space). There are many hard problems for which finding a feasible solution is simple. For example, it is straightforward to find a single partition for Graph Partition, but it is hard to find the best partition. As such, a useful avenue for exploiting CQA is in the case where linear constraints specify a nontrivial feasibility space, but one where finding a nonoptimum element in the feasibility space is still tractable.

The work in Ref.hen2016driver extended the framework for cases where a driver should commute with multiple constraint operators. In particular, given a set 𝒞\mathcal{C}, they consider finding a Hamiltonian HdH_{d} such that:

[Hd,C^j]=0,Cj𝒞\displaystyle[H_{d},\hat{C}_{j}]=0,\;C_{j}\in\mathcal{C} (4)

As they note, in general, tailoring driver Hamiltonians for a set 𝒞\mathcal{C} can be difficult. In this paper, we answer specifically the computational complexity of such a task by reducing an NP-Complete problem to ILP-QCOMMUTE. We also discuss the related task of finding HdH_{d} such that it can reach every state in the solution space, but reaches no state outside the solution space in Section VI. This result in some ways may appear intuitive, since describing the feasible space of 𝒞\mathcal{C} is hard and knowing a Hamiltonian that would keep a wavefunction within this space - and only this space - should require some characterization of it. Simply knowing that a nontrivial HdH_{d} exists at all for a NP-Complete feasibility problem allows one to recognize that the problem should have at least two solutions for some set of values that each constraint is set to, even if one does not have a token to prove it.

III An Algebraic Condition for Commuting with Linear Constraints

Consider the problem to find Hamiltonian drivers that have, as their eigenvectors, support over the possible values that satisfy the given linear constraints. In the most general sense, we consider constraints of the form:

C^=i=1nciσiz,cn,\displaystyle\hat{C}=\sum_{i=1}^{n}c_{i}\,\sigma_{i}^{z},\;\vec{c}\in\mathbb{Z}^{n}, (5)

with a constraint value bb that corresponds to one of the energy levels of C^\hat{C}. Often problems of practical interest can be captured in the restricted case where c{0,1}n\vec{c}\in\{0,1\}^{n} or c{1,0,1}n\vec{c}\in\{-1,0,1\}^{n}.

Consider the linear transformation [M,σz][M,\sigma^{z}] that maps any two by two matrix MM to a new two by two matrix MM^{\prime}, by commuting the matrix with σz\sigma^{z}. This transformation has two obvious eigenmatrices - 𝟙\mathbbm{1} and σz\sigma^{z} - that span the kernel of the transformation. One can easily verify that σ+\sigma^{+} (| 0 1|\left\lvert\,0\,\right\rangle\left\langle\,1\,\right\rvert) and σ\sigma^{-} (| 1 0|\left\lvert\,1\,\right\rangle\left\langle\,0\,\right\rvert) are also eigenmatrices of this transformation, with eigenvalue 22 and 2-2 respectively. Together these four eigenmatrices and their eigenvalues describe the spectrum decomposition of the transformation. We exploit this fact to find a simple algebraic formula for expressing the commutation of a general Hamiltonian with a linear constraint. It is easy to verify that for HH over nn qubits, if Tr1,i1,i+1,n[H]=σ±\text{Tr}_{1,\ldots i-1,i+1,\ldots n}[H]=\sigma^{\pm}, then [H,σiz]=±2H[H,\sigma_{i}^{z}]=\pm 2\,H.

Given any complete basis for a single qubit system, we can extend that basis to define a basis over nn qubits. Doing this with the found eigenmatrices defines a basis {𝟙,σz,σ+,σ}n\{\mathbbm{1},\sigma^{z},\sigma^{+},\sigma^{-}\}^{\otimes n}. Note as well that (αjσi±)=αjσi\left(\alpha_{j}\sigma_{i}^{\pm}\right)^{\dagger}=\alpha_{j}^{\dagger}\sigma_{i}^{\mp} for αj\alpha_{j}\in\mathbb{C}. This suggests a simple representation in which a Hermitian matrix is defined by its nonzero terms over this basis. Then any Hermitian matrix can be written in the form:

H\displaystyle H =(yj,vj,wj)Δ(𝒴,𝒱,𝒲)αji=1n(σz)yji(σ+)vji(σ)wji\displaystyle=\sum_{(\vec{y_{j}},\vec{v_{j}},\vec{w_{j}})\in\Delta(\mathscr{Y},\;\mathscr{V},\;\mathscr{W})}\alpha_{j}\bigotimes_{i=1}^{n}\left(\sigma^{z}\right)^{y_{ji}}\left(\sigma^{+}\right)^{v_{ji}}\left(\sigma^{-}\right)^{w_{ji}}
+(yj,vj,wj)Δ(𝒴,𝒱,𝒲)αji=1n(σz)yji(σ+)wji(σ)vji,\displaystyle\phantom{=}+\sum_{(\vec{y_{j}},\vec{v_{j}},\vec{w_{j}})\in\Delta(\mathscr{Y},\;\mathscr{V},\;\mathscr{W})}\alpha_{j}^{\dagger}\bigotimes_{i=1}^{n}\left(\sigma^{z}\right)^{y_{ji}}\left(\sigma^{+}\right)^{w_{ji}}\left(\sigma^{-}\right)^{v_{ji}}, (6)

where 𝒴={y1,,yr}\mathscr{Y}=\{\vec{y_{1}},\ldots,\vec{y_{r}}\} with yi{0,1}n\vec{y}_{i}\in\{0,1\}^{n}, 𝒱={v1,,vr}\mathscr{V}=\{\vec{v_{1}},\ldots,\vec{v_{r}}\} with vi{0,1}n\vec{v}_{i}\in\{0,1\}^{n}, and 𝒲={w1,,wr}\mathscr{W}=\{\vec{w_{1}},\ldots,\vec{w_{r}}\} with wi{0,1}n\vec{w}_{i}\in\{0,1\}^{n} are such that the corresponding αi0\alpha_{i}\neq 0. Here Δ(𝒴,𝒱,𝒲)={(yi,vi,wi)|yi𝒴,vi𝒱,wi𝒲}\Delta(\mathscr{Y},\mathscr{V},\mathscr{W})=\{(\vec{y}_{i},\vec{v}_{i},\vec{w}_{i})|y_{i}\in\mathscr{Y},v_{i}\in\mathscr{V},w_{i}\in\mathscr{W}\}, where Δ\Delta simply takes any indexed element sets and creates the set of the index-wise confederated tuples. A tuple (yi,vi,wi)(\vec{y}_{i},\vec{v}_{i},\vec{w}_{i}) specifies the indices in which we chose σz\sigma^{z}, σ+\sigma^{+}, or σ\sigma^{-} for each nonzero term. Once that choice is made, hermiticity demands the corresponding second term seen in Eq. 6 to be part of the Hamiltonian as well. However, there are restrictions on what vectors can be chosen. Specifically, yiwi=0\vec{y}_{i}\cdot\vec{w}_{i}=0 and yivi=0\vec{y}_{i}\cdot\vec{v}_{i}=0, since choosing σz\sigma^{z} and a σ±\sigma^{\pm} would actually mean selecting σ±\sigma^{\pm} with a new coefficient αj-\alpha_{j} instead. Likewise, it should also be the case that viwi=0\vec{v}_{i}\cdot\vec{w}_{i}=0 – otherwise the term would be equivalent to two terms with the same coefficient halved and one taking the term σz\sigma^{z}, the other taking the identity term. As such, this added constraints on Δ(𝒴,𝒱,𝒲)\Delta(\mathscr{Y},\mathscr{V},\mathscr{W}) so that the representations are unique, which must be enforced before applying the theorem below because the uniqueness of the basis will be actively used. As an example, consider the driver Hamiltonian discussed in the previous section: Hd=i=1n1(σixσi+1x+σiyσi+1y)=2i=1n1(σi+σi+1+σiσi+1+)H_{d}=\sum_{i=1}^{n-1}(\sigma_{i}^{x}\sigma_{i+1}^{x}+\sigma_{i}^{y}\sigma_{i+1}^{y})=2\,\sum_{i=1}^{n-1}(\sigma_{i}^{+}\sigma_{i+1}^{-}+\sigma_{i}^{-}\sigma_{i+1}^{+}). For this Hamiltonian, 𝒴={0,,0},𝒱={e1,,en1},𝒲={e2,,en}\mathscr{Y}=\{\vec{0},\ldots,\vec{0}\},\mathscr{V}=\{\vec{e}_{1},\ldots,\vec{e}_{n-1}\},\mathscr{W}=\{\vec{e}_{2},\ldots,\vec{e}_{n}\} – where ei\vec{e}_{i} refers to the standard basis vectors. While the notation is somewhat awkward, it becomes useful for expressing our first major result:

Theorem III.1 (Algebraic Condition for Commutativity).

A Hermitian Matrix HH commutes with a linear constraint CC if and only if c(vjwj)=0\vec{c}\cdot(\vec{v}_{j}-\vec{w}_{j})=0 for all vj,wjΔ(𝒱,𝒲)\vec{v}_{j},\vec{w}_{j}\in\Delta(\mathscr{V},\mathscr{W}).

Proof.

Using the form for HH we introduced earlier, we can see that:

[H,C^]\displaystyle\left[H,\hat{C}\right] =(yj,vj,wj)Δ(𝒴,𝒱,𝒲)[αji=1n(σz)yji(σ+)vji(σ)wji,k=1nckσkz]\displaystyle=\sum_{(\vec{y_{j}},\vec{v_{j}},\vec{w_{j}})\in\Delta(\mathscr{Y},\;\mathscr{V},\;\mathscr{W})}\left[\alpha_{j}\bigotimes_{i=1}^{n}\left(\sigma^{z}\right)^{y_{ji}}\left(\sigma^{+}\right)^{v_{ji}}\left(\sigma^{-}\right)^{w_{ji}},\sum_{k=1}^{n}c_{k}\,\sigma_{k}^{z}\right]
+(yj,vj,wj)Δ(𝒴,𝒱,𝒲)[αji=1n(σz)yji(σ+)wji(σ)vji,k=1nckσkz]\displaystyle\phantom{=}+\sum_{(\vec{y_{j}},\vec{v_{j}},\vec{w_{j}})\in\Delta(\mathscr{Y},\;\mathscr{V},\;\mathscr{W})}\left[\alpha_{j}^{\dagger}\bigotimes_{i=1}^{n}\left(\sigma^{z}\right)^{y_{ji}}\left(\sigma^{+}\right)^{w_{ji}}\left(\sigma^{-}\right)^{v_{ji}},\sum_{k=1}^{n}c_{k}\,\sigma_{k}^{z}\right]
=(yj,vj,wj)Δ(𝒴,𝒱,𝒲)2αj(k=1nck(vjkwjk))i=1n(σz)yji(σ+)vji(σ)wji\displaystyle=\sum_{(\vec{y_{j}},\vec{v_{j}},\vec{w_{j}})\in\Delta(\mathscr{Y},\;\mathscr{V},\;\mathscr{W})}2\,\alpha_{j}\left(\sum_{k=1}^{n}c_{k}(v_{jk}-w_{jk})\right)\bigotimes_{i=1}^{n}\left(\sigma^{z}\right)^{y_{ji}}\left(\sigma^{+}\right)^{v_{ji}}\left(\sigma^{-}\right)^{w_{ji}}
+(yj,vj,wj)Δ(𝒴,𝒱,𝒲)2αj(k=1nck(wjkvjk))i=1n(σz)yji(σ+)wji(σ)vji\displaystyle\phantom{=}+\sum_{(\vec{y_{j}},\vec{v_{j}},\vec{w_{j}})\in\Delta(\mathscr{Y},\;\mathscr{V},\;\mathscr{W})}2\,\alpha_{j}^{\dagger}\left(\sum_{k=1}^{n}c_{k}(w_{jk}-v_{jk})\right)\bigotimes_{i=1}^{n}\left(\sigma^{z}\right)^{y_{ji}}\left(\sigma^{+}\right)^{w_{ji}}\left(\sigma^{-}\right)^{v_{ji}}
=(yj,vj,wj)Δ(𝒴,𝒱,𝒲)2αjc(vjwj)i=1n(σz)yji(σ+)vji(σ)wji\displaystyle=\sum_{(\vec{y_{j}},\vec{v_{j}},\vec{w_{j}})\in\Delta(\mathscr{Y},\;\mathscr{V},\;\mathscr{W})}2\,\alpha_{j}\,\vec{c}\cdot\left(\vec{v}_{j}-\vec{w}_{j}\right)\bigotimes_{i=1}^{n}\left(\sigma^{z}\right)^{y_{ji}}\left(\sigma^{+}\right)^{v_{ji}}\left(\sigma^{-}\right)^{w_{ji}}
(yj,vj,wj)Δ(𝒴,𝒱,𝒲)2αjc(vjwj)i=1n(σz)yji(σ+)wji(σ)vji\displaystyle\phantom{=}-\sum_{(\vec{y_{j}},\vec{v_{j}},\vec{w_{j}})\in\Delta(\mathscr{Y},\;\mathscr{V},\;\mathscr{W})}2\,\alpha_{j}^{\dagger}\,\vec{c}\cdot\left(\vec{v}_{j}-\vec{w}_{j}\right)\bigotimes_{i=1}^{n}\left(\sigma^{z}\right)^{y_{ji}}\left(\sigma^{+}\right)^{w_{ji}}\left(\sigma^{-}\right)^{v_{ji}} (7)

Since the set defined by the tuples {(yj,vj,wj)}\{(\vec{y}_{j},\vec{v}_{j},\vec{w}_{j})\} is a linearly independent set Eq. 7 =0=0 iff c(vjwj)=0\vec{c}\cdot(\vec{v_{j}}-\vec{w_{j}})=0 for all jj.

Consider the example discussed in Section II in the context of Theorem III.1. It is easy to see that v1=(1,0,0,0),w1=(0,1,0,0),v2=(0,1,0,0),w2=(0,0,1,0),v3=(0,0,1,0),w3=(0,0,0,1)v_{1}=(1,0,0,0),w_{1}=(0,1,0,0),v_{2}=(0,1,0,0),w_{2}=(0,0,1,0),v_{3}=(0,0,1,0),w_{3}=(0,0,0,1) would satisfy Eq. 7, defining Hd=i=13σi+σi+1+σiσi+1+H_{d}=\sum_{i=1}^{3}\sigma_{i}^{+}\sigma_{i+1}^{-}+\sigma_{i}^{-}\sigma_{i+1}^{+}. Note that more vector pairs will also satisfy the condition, for example v4=(0,0,0,1)v_{4}=(0,0,0,1) and w4=(1,0,0,0)w_{4}=(1,0,0,0).

IV Bounded weight drivers

The algebraic condition of Theorem III.1 can be used as a starting point to understand several features of CQA. One of them is motivated by the fact that actual implementations of quantum annealing will likely impose a bound on the weight of the driver operators available. Hence, given a set of linear constraints, we could restrict our search for commuting drivers to those with bounded weight.

Consider a set 𝒞={C1,,Cm}\mathcal{C}=\{C_{1},\ldots,C_{m}\} of linear constraints on nn variables, and let CMC^{M} be the m×nm\times n matrix with coefficients cijc_{ij} (recall Ci(x)=jcijxjC_{i}(x)=\sum_{j}c_{ij}x_{j}). Then, Theorem III.1 tells us that there is a non-diagonal driver commuting with all the constraints, if and only if, the linear system CMu=0C^{M}\,\vec{u}=\vec{0}, where u=vw{1,0,1}n\vec{u}=\vec{v}-\vec{w}\in\{-1,0,1\}^{n}. Furthermore, we can see that the number of components of u\vec{u} that are non-zero is a lower bound for the weight of such a driver (the weight could be higher if we allow σz\sigma^{z} operators acting on the variables associated with the vanishing components of u\vec{u}). This leads to a simpler analysis of the case of bounded weight drivers.

Assume that we are only allowed weight kk drivers, and we further impose the condition that they are constructed from kk 1-qubit operators that act non trivially in the computational basis (in our case, it means these are chosen from {σ+,σ}\{\sigma^{+},\sigma^{-}\}). Then, the number of such operators is 2k1(nk)2^{k-1}\binom{n}{k}. For fixed kk, this is polynomial in nn, and so it is tractable to check all the possible vectors u\vec{u} to find which ones satisfy the condition CMu=0C^{M}\,\vec{u}=0. From those that do, we can construct the corresponding weight kk driver that will commute with all the constraints, by assigning σ+\sigma^{+} to qubit ii if ui=1u_{i}=1, and σ\sigma^{-} if ui=1u_{i}=-1. This is a simple but very useful result in practice: brute force searching for solutions to the condition from Theorem III.1 finds all possible driver Hamiltonians that commute with the embedded constraint operators up to a certain weight in time polynomial on the system size.

The simplest and most relevant case for practical applications is that of 2-local operators, since 2-body interactions are more easily engineered than higher order ones. In this case the condition of Theorem III.1 implies an even simpler characterization of when a set of constraints allow for commuting drivers.

Corollary IV.0.1.

Let 𝒞={C1,,Cm}\mathcal{C}=\{C_{1},\ldots,C_{m}\} be a set of linear constraints and CMC^{M} the associated matrix of coefficients. Then a 2-local driver that commutes with all the constraints exists, if and only if, the matrix CMC^{M} has a pair of columns that are either equal, or opposite.

2-local means that u\vec{u} in the condition CMu=0C^{M}\,\vec{u}=0 has only 2 non zero components, and we can take these to be (1,1)(1,1) or (1,1)(1,-1), since the other two possibilities would produce the corresponding Hermitian conjugates. Since multiplying a matrix by a column vector results in a linear combination of the columns of the matrix, with the coefficients given by the vector components, the condition CMu=0C^{M}\,\vec{u}=0 will state that CMC^{M} has two columns that are the same (if the non zero components of u\vec{u} are (1,1)(1,-1)), or are opposites (if they are (1,1)(1,1)). To any distinct pair of columns that satisfy one of these conditions we can associate a distinct weight-2 driver that commutes with the constraints, so the maximum number of such possible weight-2 drivers is (n2)\binom{n}{2}.

V The Problem ILP-QCOMMUTE

Having found a simple algebraic condition for expressing the commutation relationship of any Hermitian matrix with a linear constraint, we wish to exploit that fact here to find what the general complexity of knowing the existence of such a Hermitian matrix is. We consider the following problem:

Definition (ILP-QCOMMUTE):

Given a set 𝒞={C1,,Cm}\mathcal{C}=\{C_{1},\ldots,C_{m}\} of linear constraints such that Ci^=j=1ncijσjz\hat{C_{i}}=\sum_{j=1}^{n}c_{ij}\sigma_{j}^{z}, over a space 2n\mathbb{C}^{2^{n}} with cijc_{ij}\in\mathbb{Z}, is there a Hermitian Matrix HH, with 𝒪(poly(n))\mathscr{O}\left(\text{poly}(n)\right) nonzero coefficients over a basis {χ1,χ2,χ3,χ4}n\{\chi_{1},\chi_{2},\chi_{3},\chi_{4}\}^{\bigotimes n}, such that [H,Ci^]=0\left[H,\hat{C_{i}}\right]=0 for all Ci^\hat{C_{i}} and HH has at least one off-diagonal term in the spin-z basis?

Solving this problem would be useful for constructing Hamiltonian drivers for quantum annealing. We can also define 0-1-LP-QCOMMUTE as the binary version, where cij{0,1}c_{ij}\in\{0,1\}, and also {-1,0,1}-LP-QCOMMUTE, where cij{1,0,1}c_{ij}\in\{-1,0,1\}, the type of coefficients used when representing problems like 1-in-3 3-SAT as an ILP. One of the central results of this paper is that these problems are NP-Completecook1971complexity karp1975computational , which can be shown by reducing them to the EQUAL SUBSET SUM problemkarp1972reducibility . This reduction is simple and straightforward for ILP-QCOMMUTE, and we discuss it in this section to give a sense of the connection between the two problems. However, this proof is not enough to imply that 0-1-LP-QCOMMUTE and {-1,0,1}-LP-QCOMMUTE are also NP-Complete, since they could both very well be easier subclasses of ILP-QCOMMUTE. That is not the case, but the proof for 0-1-LP-QCOMMUTE is more involved (and rather tedious) and thus is presented in the Appendix A.

Definition (EQUAL SUBSET SUM):

Given a set S={s1,s2,,sn}S=\{s_{1},s_{2},\ldots,s_{n}\}, with si+s_{i}\in\mathbb{Z}^{+}, are there two non-empty disjoint subsets, A,BA,B such that aiAai=biBbi\sum_{a_{i}\in A}a_{i}=\sum_{b_{i}\in B}b_{i}?

The EQUAL SUBSET SUM problem is known to be NP-Completewoeginger1992equal . We map an instance of the EQUAL SUBSET SUM problem to the ILP-QCOMMUTE problem; the former defined over a set S={s1,s2,,sn}S=\{s_{1},s_{2},\ldots,s_{n}\}, with si+s_{i}\in\mathbb{Z}^{+}. Consider the constraint operator defined by C^=i=1nsiσiz\hat{C}=\sum_{i=1}^{n}s_{i}\sigma_{i}^{z}, and the vector s=(s1,,sn)\vec{s}=(s_{1},\ldots,s_{n}). Suppose we can find vectors v,w\vec{v},\vec{w} with binary components, such that s(vw)=0\vec{s}\cdot\left(\vec{v}-\vec{w}\right)=0 (the algebraic condition derived in Theorem III.1). Then the indices corresponding to the nonzero components of v\vec{v} and w\vec{w} can be used to identify the sets AA and BB (respectively) in the EQUAL SUBSET SUM problem.

Suppose there is a solution HH to ILP-QCOMMUTE. From Theorem III.1, it follows that ci(vw)=0\vec{c}_{i}\cdot\left(\vec{v}-\vec{w}\right)=0 for the vector c\vec{c} associated with constraint CC and any nonzero term in the basis {𝟙,σz,σ+,σ}n\{\mathbbm{1},\sigma^{z},\sigma^{+},\sigma^{-}\}^{\otimes n} with a term σ±\sigma^{\pm} on at least one qubit will be enough to define a new HH^{\prime} that will be associated with a solution to EQUAL SUBSET SUM. At least one such element exists for HH because HH has at least one off-diagonal term in the spin-z basis. We can associate any off-diagonal term of H with y,v,w\vec{y},\vec{v},\vec{w} such that H=αi=1n(σz)yi(σ+)vi(σ)wi+αi=1n(σz)yi(σ+)wi(σ)viH^{\prime}=\alpha\bigotimes_{i=1}^{n}\left(\sigma^{z}\right)^{y_{i}}\left(\sigma^{+}\right)^{v_{i}}\left(\sigma^{-}\right)^{w_{i}}+\alpha^{\dagger}\bigotimes_{i=1}^{n}\left(\sigma^{z}\right)^{y_{i}}\left(\sigma^{+}\right)^{w_{i}}\left(\sigma^{-}\right)^{v_{i}} is a matrix with only that off-diagonal term and its complex conjugate for some α\alpha and v0,w0\vec{v}\neq\vec{0},\vec{w}\neq\vec{0}. Then for a specific off-diagonal term, every non-zero entry in v\vec{v} between 11 and nn, call it ii, picks an integer siSs_{i}\in S for the set AA, and w\vec{w} does likewise for the set BB, providing a solution to the corresponding instance of EQUAL SUBSET SUM since s(vw)=(siAsi)(siBsi)=0\vec{s}\cdot(\vec{v}-\vec{w})=\left(\sum_{s_{i}\in A}s_{i}\right)-\left(\sum_{s_{i}\in B}s_{i}\right)=0. Suppose there is a solution A,BA,B to EQUAL SUBSET SUM, then define v\vec{v} such that vi=1v_{i}=1 (wi=1w_{i}=1) if and only if sis_{i} is in AA (BB). Then H=i=1n(σ+)vi(σ)wi+i=1n(σ+)wi(σ)viH=\bigotimes_{i=1}^{n}\left(\sigma^{+}\right)^{v_{i}}\left(\sigma^{-}\right)^{w_{i}}+\bigotimes_{i=1}^{n}\left(\sigma^{+}\right)^{w_{i}}\left(\sigma^{-}\right)^{v_{i}} is a solution to ILP-QCOMMUTE since (siAsi)+(siBsi)=s(vw)=0\left(\sum_{s_{i}\in A}s_{i}\right)+\left(\sum_{s_{i}\in B}s_{i}\right)=\vec{s}\cdot\left(\vec{v}-\vec{w}\right)=0. Hence, we have the following result.

Theorem V.1.

ILP-QCOMMUTE is NP-Hard.

Given this result, we can show NP-Completeness by noting that we can check for an off-diagonal term in the spin-z basis in polynomial time. Let HH be a proposed solution to the ILP-QCOMMUTE such that there exists nonequivalent indices i,ji,j such that entry hij0h_{ij}\neq 0. Checking that HH commutes with the constraints is polynomial time. For k{1,,n}k\in\{1,\ldots,n\}, check if Trk(Hσk+)0\text{Tr}_{k}\left(H\sigma_{k}^{+}\right)\neq 0 or Trk(Hσk)0\text{Tr}_{k}\left(H\sigma_{k}^{-}\right)\neq 0. HH has at least one element hijh_{ij} that is off-diagonal in the spin-z basis if and only if there exists kk such that at least one of these terms is nonzero. Since the partial trace of tensor products is the trace over a specific tensor component, this can be done quickly.

Corollary V.1.1.

ILP-QCOMMUTE is NP-Complete.

While we have shown that this problem is NP-Hard, we note that for any specific instance of the problem, the practical runtime can still be tractable and therefore a useful avenue for even the hardest instances of optimization problems.Also take note that since every unitary operator is the exponential of a corresponding Hermitian operator, knowing the existence of a unitary operator that commutes with the constraint operators is paramount to knowing a Hermitian matrix exists with the same property. As such, our result immediately translates to the QAOA setting where one wishes to construct unitary operators that will commute with the embedded linear constraint operators.

V.1 Bounded Weight ILP-QCOMMUTE

Despite the NP-hardness of ILP-QCOMMUTE, Section IV discusses a simple polynomial time algorithm to find driver terms up to some weight kk. Consider this modified version of ILP-QCOMMUTE, which asks about the existence of a Hermitian matrix that commutes with the constraints, but consists of interaction terms up to weight kk.

Definition (ILP-QCOMMUTE-k-LOCAL):

Given a set 𝒞={C1,,Cm}\mathcal{C}=\{C_{1},\ldots,C_{m}\} of linear constraints such that Ci^=j=1ncijσjz\hat{C_{i}}=\sum_{j=1}^{n}c_{ij}\sigma_{j}^{z}, over a space 2n\mathbb{C}^{2^{n}} with cijc_{ij}\in\mathbb{Z}, is there a Hermitian Matrix HH, with 𝒪(poly(n))\mathscr{O}\left(\text{poly}(n)\right) nonzero coefficients over a basis {χ1,χ2,χ3,χ4}n\{\chi_{1},\chi_{2},\chi_{3},\chi_{4}\}^{\bigotimes n} and no term with weight higher than kk, such that [H,Ci^]=0\left[H,\hat{C_{i}}\right]=0 for all Ci^\hat{C_{i}} and HH has at least one off-diagonal term in the spin-z basis?

Theorem V.2.

ILP-QCOMMUTE-k-LOCAL is in P for k in 𝒪(1)\mathcal{O}(1).

Proof.

Apply the brute force approach described in Section IV. Since k𝒪(1)k\in\mathcal{O}(1), the algorithm runs in time n𝒪(1)n^{\mathcal{O}(1)}. ∎

This shows that for a practical application where the Hamiltonian driver should be all local, we can tractably find such a Hamiltonian driver. Moreover, any HH that is all local and commutes with the constraints can be constructed by placing the right coefficients on the found terms by brute forcing the expression in Theorem III.1 (they form a basis for all Hamiltonians that commute with the constraints up to weight kk).

VI Reachability within the Feasible Space

In the previous section, we proved that finding a Hermitian matrix which commutes with a collection of linear spin-z constraints is NP-Complete. The related question becomes finding a Hermitian matrix which commutes with the constraints, but also connects the feasibility space. Note that two states |p,|q\left\lvert\,p\,\right\rangle,\left\lvert\,q\,\right\rangle are connected if they are in the same commutation subspace of HH, that is p|Hr|q0\left\langle\,p\,\right\rvert H^{r}\left\lvert\,q\,\right\rangle\neq 0 for some r+r\in\mathbb{Z}^{+}. As such, for any pair of solutions i,ji,j in the feasibility space, their associated vectors in the computational basis |i,|j\left\lvert\,i\,\right\rangle,\left\lvert\,j\,\right\rangle should be in the same commutation subspace. In general, when finding a driver Hamiltonian for an anneal that should solve an optimization task, we wish to find a driver that satisfies this condition so that we can ensure that it will be able to reach the entire feasibility space, since commuting with the constraints alone is not enough to ensure this will happen. Consider the graph partitioning example discussed in Section II and Section V, clearly σ1+σ2+σ1σ2+\sigma_{1}^{+}\sigma_{2}^{-}+\sigma_{1}^{-}\sigma_{2}^{+} commutes with the constraint, but fails to connect the entire feasible space. For example, the state | 0011\left\lvert\,0011\,\right\rangle is disconnected from | 1100\left\lvert\,1100\,\right\rangle under this driver Hamiltonian. While it succeeds not to mix solution states to nonsolution states, it does not mix all solution states with each other. We introduce the problem ILP-QCOMMUTE-NONTRIVIAL which asks to find a driver term that not only commutes with the constraints, but acts nontrivially on the feasible space, so that the action of the driver is such that there exists one solution state which the driver maps to another solution state in the feasible space. If we think about the solution states as vertices in a graph, then transitions induced by driver terms are the edges (and a driver term can induce more than one such edge). Then the problem ILP-QCOMMUTE-NONTRIVIAL asks that the driver term found induces at least one edge in the graph of feasible solutions. For the graph partitioning example discussed above, the term we discussed is clearly a solution to the problem ILP-QCOMMUTE-NONTRIVIAL since it connects | 1010\left\lvert\,1010\,\right\rangle to | 0110\left\lvert\,0110\,\right\rangle, both of which are in the feasible space for this example. Let PibiP_{i}^{b_{i}} be the projection operator corresponding to the energy eigenvalue bib_{i} for the constraint operator C^i\hat{C}_{i}. Then this formally defines the problem ILP-QCOMMUTE-NONTRIVIAL:

Definition (ILP-QCOMMUTE-NONTRIVIAL):

Given a set 𝒞={C1,,Cm}\mathcal{C}=\{C_{1},\ldots,C_{m}\} of linear constraints and constraint values b={b1,,bm}b=\{b_{1},\ldots,b_{m}\} such that C^i=j=1ncijσjz\hat{C}_{i}=\sum_{j=1}^{n}c_{ij}\sigma_{j}^{z} over a space 2n\mathbbm{C}^{2^{n}} with cijc_{ij}\in\mathbb{Z}, is there a Hermitian Matrix H, with 𝒪(poly(n))\mathcal{O}(poly(n)) nonzero coefficients over a basis {χ1,χ2,χ3,χ4}n\{\chi_{1},\chi_{2},\chi_{3},\chi_{4}\}^{\bigotimes n}, such that [H,C^i]=0\left[H,\hat{C}_{i}\right]=0 for all C^i\hat{C}_{i} and P1b1PmbmHPmbmP1b1P_{1}^{b_{1}}\,\cdots\,P_{m}^{b_{m}}HP_{m}^{b_{m}}\,\cdots\,P_{1}^{b_{1}} has at least one off-diagonal term in the spin-z basis?

The main difference is that while ILP-QCOMMUTE required nontrivial off-diagonal terms in the spin-z basis, ILP-QCOMMUTE-NONTRIVIAL specifically requires these to be nontrivial in the constraint space of interest, which in general is a non-polynomial problem to verify (i.e. knowing a Hamiltonian has or fails to have an eigenvector for a specific energy level would allow one to know if a Hamiltonian has a solution to hard problems). We show that this problem is at least NP-Hard by reducing a problem closely related to EQUAL SUBSET SUM to ILP-QCOMMUTE-NONTRIVIAL. We begin with the famous NP-Complete SUBSET SUM problem:

Definition (SUBSET SUM):

Given a set S={s1,,sn}S=\{s_{1},\ldots,s_{n}\} of integers and an integer target value TT, is there a subset S1S_{1} such that sS1s=T\sum_{s\in S_{1}}s=T?

While SUBSET SUM asks about the existence of a single solution, we are interested in at least two solutions, defining the problem:

Definition (2-OR-MORE SUBSET SUM):

Given a set S={s1,,sn}S=\{s_{1},\ldots,s_{n}\} and a target value TT, are there two subsets S1,S2S_{1},S_{2} such that sS1s=sS2s=T\sum_{s\in S_{1}}s=\sum_{s\in S_{2}}s=T?

We show that like SUBSET SUM (over positive integerscormen2009introduction ), 2-OR-MORE SUBSET SUM is also NP-Hard:

Lemma VI.1.

2-OR-MORE SUBSET SUM is NP-Hard.

Proof.

Consider an instance of the SUBSET SUM problem with a set S={s1,,sn}S=\{s_{1},\ldots,s_{n}\} and a target value TT such that si>0s_{i}>0 for all sis_{i}. We construct a new instance of the 2-OR-MORE SUBSET SUM problem with set S={s1,,sn,T}S^{\prime}=\{s_{1},\ldots,s_{n},T\} and the same target value TT.

First we show how to relate a solution to the original SUBSET SUM instance from a solution to the constructed 2-OR-MORE SUBSET SUM problem. Let S1,S2S_{1},S_{2} be solutions to the new 2-OR-MORE SUBSET SUM instance, either one or none of the solutions uses the element TT. If neither does, either one is a solution to the instance of the original SUBSET SUM problem. Without loss of generality, suppose S1S_{1} uses the value TT, then S1S_{1} cannot use any other value since every other value is greater than zero, hence S1={T}S_{1}=\{T\}. Since S2S_{2} cannot use any value other than TT if TS2T\in S_{2} and S1S2S_{1}\neq S_{2}, it follows that TS2T\notin S_{2}. Then S2SS_{2}\subseteq S and sS2s=T\sum_{s\in S_{2}}s=T.

We now show how to relate a solution to the constructed 2-OR-MORE SUBSET SUM instance given a solution to the SUBSET SUM instance. Let S1S_{1} be a solution to the SUBSET SUM problem. Then S1,{T}S_{1},\{T\} is a solution to the 2-OR-MORE SUBSET SUM instance.

Since SUBSET SUM is NP-Hard over positive integers, 2-OR-MORE SUBSET SUM is NP-Hard as well.

2-OR-MORE SUBSET SUM is closely related to EQUAL SUBSET SUM because both ask about the existence of two subsets with equal sums, but 2-OR-MORE SUBSET SUM adds the further constraint that these two subsets should have a specific sum. We show that ILP-QCOMMUTE-NONTRIVIAL is NP-Hard through a reduction to 2-OR-MORE SUBSET SUM. Note again that ILP-QCOMMUTE-NONTRIVIAL is not verifiable in polynomial time kitaev2002classical kempe20033 kempe2006complexity and so this reduction is only for the decision version of the problem 2-OR-MORE SUBSET SUM.

Theorem VI.2.

ILP-QCOMMUTE-NONTRIVIAL is NP-Hard.

Proof.

Consider an instance of the 2-OR-MORE SUBSET SUM problem with a set S={s1,,sn}S=\{s_{1},\ldots,s_{n}\} and a target value TT. Define the constraint operator S^=j=1nsjσjz\hat{S}=\sum_{j=1}^{n}s_{j}\sigma_{j}^{z} and a target energy value (j=1nsj)2T\left(\sum_{j=1}^{n}s_{j}\right)-2\,T.

Suppose this instance of ILP-QCOMMUTE-NONTRIVIAL has a solution. Then there are at least two eigenvectors |v,|w\left\lvert\,\vec{v}\,\right\rangle,\left\lvert\,\vec{w}\,\right\rangle of S^\hat{S} with eigenvalue (j=1nsj)2T\left(\sum_{j=1}^{n}s_{j}\right)-2\,T such that the two eigenvalues can be written in the spin-z basis with v,w{0,1}n\vec{v},\vec{w}\in\{0,1\}^{n}. Like with ILP-QCOMMUTE and EQUAL SUBSET SUM, the nonzero elements of v\vec{v} and w\vec{w} describe two sets S1,S2S_{1},S_{2} such that siS1s_{i}\in S_{1} (siS2s_{i}\in S_{2}) if and only if vi=1v_{i}=1 (wi=1w_{i}=1). Since S^|v=(j=1nsj(12vj))|v=((j=1nsj)2(j=1nsjvj))|v\hat{S}\left\lvert\,\vec{v}\,\right\rangle=\left(\sum_{j=1}^{n}s_{j}(1-2\,v_{j})\right)\left\lvert\,\vec{v}\,\right\rangle=\left(\left(\sum_{j=1}^{n}s_{j}\right)-2\,\left(\sum_{j=1}^{n}\,s_{j}v_{j}\right)\right)\left\lvert\,\vec{v}\,\right\rangle, it follows that j=1nsjvj=T\sum_{j=1}^{n}s_{j}v_{j}=T. The same logic works for w\vec{w} and so sS1s=sS2s=T\sum_{s\in S_{1}}s=\sum_{s\in S_{2}}s=T. Then 2-OR-MORE SUBSET SUM must have a solution as well, specifically S1,S2S_{1},S_{2}.

Suppose 2-OR-MORE SUBSET SUM has a solution. Then there are two nonequal subsets S1,S2S_{1},S_{2} of SS such that siS1si=siS2s2=T\sum_{s_{i}\in S_{1}}s_{i}=\sum_{s_{i}\in S_{2}}s_{2}=T. Then let v=(v1,,vn)\vec{v}=(v_{1},\ldots,v_{n}) (w=(w1,,wn)\vec{w}=(w_{1},\ldots,w_{n})) with vi=1v_{i}=1 (wi=1w_{i}=1) if siS1s_{i}\in S_{1} (siS2s_{i}\in S_{2}).

Then S^|v=(j=1nsj(12vj))|v=((j=1nsj)2j=1nsjvj)|v=((j=1nsj)2T)|v\hat{S}\left\lvert\,\vec{v}\,\right\rangle=\left(\sum_{j=1}^{n}s_{j}(1-2\,v_{j})\right)\left\lvert\,\vec{v}\,\right\rangle=\left(\left(\sum_{j=1}^{n}s_{j}\right)-2\,\sum_{j=1}^{n}s_{j}v_{j}\right)\left\lvert\,\vec{v}\,\right\rangle=\left(\left(\sum_{j=1}^{n}s_{j}\right)-2\,T\right)\left\lvert\,\vec{v}\,\right\rangle. The same logic works for |w\left\lvert\,\vec{w}\,\right\rangle and so |v,|w\left\lvert\,\vec{v}\,\right\rangle,\left\lvert\,\vec{w}\,\right\rangle are both eigenvectors of S^\hat{S} with eigenvalue (j=1nsj)2T\left(\sum_{j=1}^{n}s_{j}\right)-2\,T. Then |vw|+|wv|\left\lvert\,\vec{v}\,\right\rangle\left\langle\,\vec{w}\,\right\rvert+\left\lvert\,\vec{w}\,\right\rangle\left\langle\,\vec{v}\,\right\rvert is a driver term that nontrivially maps solution states of this constraint problem to one another.

In practical applications, we are often able to quickly find some driver terms that commute with the constraints, but then need to know whether they are sufficient to connect the entire feasible space. This raises the following question: given kk driver terms (individual basis terms) that commute with the constraints, does some linear combination of them with nonzero coefficients connect the entire feasibility space? In other words, given that we have found kk driver terms that commute with the constraints, can we guarantee that some linear combination of them will have the whole feasible subspace as its smallest invariant subspace? Note that not every driver term that does commute with a subspace is necessary to solve this problem. For example, in the case of the constraint C^=inσiz\hat{C}=\sum_{i}^{n}\sigma_{i}^{z}, it suffices to use the driver terms σi+σi+1+σiσi+1+\sigma_{i}^{+}\sigma_{i+1}^{-}+\sigma_{i}^{-}\sigma_{i+1}^{+} for i[n1]i\in[n-1]. Any linear combination with nonzero coefficients, Hd=in1λi(σi+σi+1+σiσi+1+)H_{d}=\sum_{i}^{n-1}\lambda_{i}\left(\sigma_{i}^{+}\sigma_{i+1}^{-}+\sigma_{i}^{-}\sigma_{i+1}^{+}\right), then is a valid Hamiltonian driver to connect the feasible space. Then an extra term, like σ1+σ3+σ1σ3+\sigma_{1}^{+}\sigma_{3}^{-}+\sigma_{1}^{-}\sigma_{3}^{+} is unnecessary, because if |ϕ\left\lvert\,\phi\,\right\rangle is in the constrained subspace, it follows that (σ1+σ2+σ1σ2+)|ϕ(\sigma_{1}^{+}\sigma_{2}^{-}+\sigma_{1}^{-}\sigma_{2}^{+})\left\lvert\,\phi\,\right\rangle, (σ2+σ3+σ2σ3+)|ϕ(\sigma_{2}^{+}\sigma_{3}^{-}+\sigma_{2}^{-}\sigma_{3}^{+})\left\lvert\,\phi\,\right\rangle, (σ1+σ2+σ1σ2+)(σ2+σ3+σ2σ3+)|ϕ(\sigma_{1}^{+}\sigma_{2}^{-}+\sigma_{1}^{-}\sigma_{2}^{+})(\sigma_{2}^{+}\sigma_{3}^{-}+\sigma_{2}^{-}\sigma_{3}^{+})\left\lvert\,\phi\,\right\rangle, and (σ2+σ3+σ2σ3+)(σ1+σ2+σ1σ2+)|ϕ(\sigma_{2}^{+}\sigma_{3}^{-}+\sigma_{2}^{-}\sigma_{3}^{+})(\sigma_{1}^{+}\sigma_{2}^{-}+\sigma_{1}^{-}\sigma_{2}^{+})\left\lvert\,\phi\,\right\rangle are as well. Note that (σ1+σ3+σ1σ3+)=(σ1+σ2+σ1σ2+)(σ2+σ3+σ2σ3+)+(σ2+σ3+σ2σ3+)(σ1+σ2+σ1σ2+)(\sigma_{1}^{+}\sigma_{3}^{-}+\sigma_{1}^{-}\sigma_{3}^{+})=(\sigma_{1}^{+}\sigma_{2}^{-}+\sigma_{1}^{-}\sigma_{2}^{+})(\sigma_{2}^{+}\sigma_{3}^{-}+\sigma_{2}^{-}\sigma_{3}^{+})+(\sigma_{2}^{+}\sigma_{3}^{-}+\sigma_{2}^{-}\sigma_{3}^{+})(\sigma_{1}^{+}\sigma_{2}^{-}+\sigma_{1}^{-}\sigma_{2}^{+}). If a Hermitian matrix MM can be decomposed into a linear combination of products of operators chosen from the set of driver terms {G^k}\{\hat{G}_{k}\}, and |ϕ\left\lvert\,\phi\,\right\rangle is a state in the constrained space, then for any state |ψ\left\lvert\,\psi\,\right\rangle such that ψ|M|ϕ0\left\langle\,\psi\,\right\rvert M\left\lvert\,\phi\,\right\rangle\neq 0 (i.e., any state reachable from |ϕ\left\lvert\,\phi\,\right\rangle through the action of MM), is also reachable through the action of the driver terms in {G^k}\{\hat{G}_{k}\} for the state |ψ\left\lvert\,\psi\,\right\rangle.

The set of Hamiltonians that commute with a given set of constraints form an algebra (known as the commutant of the set of constraints). Each one of the driver terms we are considering can be seen as a generator of this commutant algebra. This leads us to define the problem ILP-QIRREDUCIBLECOMMUTE-GIVEN-k formally:

Definition (ILP-QIRREDUCIBLECOMMUTE-GIVEN-k):

Given a set 𝒞={C1,,Cm}\mathcal{C}=\{C_{1},\ldots,C_{m}\} of linear constraints and constraint values b={b1,,bm}b=\{b_{1},\ldots,b_{m}\} such that C^i=j=1ncijσjz\hat{C}_{i}=\sum_{j=1}^{n}c_{ij}\sigma_{j}^{z} over a space 2n\mathbbm{C}^{2^{n}} with cijc_{ij}\in\mathbb{Z}, and a set of basis terms 𝒢={G^1,,G^k}\mathcal{G}=\{\hat{G}_{1},\ldots,\hat{G}_{k}\} such that G^i{χ1,χ2,χ3,χ4}n\hat{G}_{i}\in\{\chi_{1},\chi_{2},\chi_{3},\chi_{4}\}^{\bigotimes n}, does 𝒢\mathcal{G} connect the entire nonzero eigenspace of the operator P1b1PmbmP_{1}^{b_{1}}\cdots P_{m}^{b_{m}}?

As such, ILP-QIRREDUCIBLECOMMUTE-GIVEN-k asks if a given set of driver terms is able to connect the entire feasible space of a set of constraints with the given constraint values. We show that this problem is also NP-Hard by reducing ILP-QCOMMUTE-NONTRIVIAL to ILP-QIRREDUCIBLECOMMUTE-GIVEN-k. We do so by finding a mapping for any instance of ILP-QCOMMUTE-NONTRIVIAL to an instance of ILP-QIRREDUCIBLECOMMUTE-GIVEN-k. Consider such an instance with constraints {C1,,Cm}\{C_{1},\ldots,C_{m}\} and constraint values {b1,,bm}\{b_{1},\ldots,b_{m}\}. Find an integer a1a_{1} such that ci1<a1\|\vec{c_{i}}\|_{1}<a_{1} for i[m]i\in[m]. Then expand the space {x1,,xn}\{x_{1},\ldots,x_{n}\} by appending xn+1,xn+2x_{n+1},x_{n+2}. Make the constraints Fi(x)=Ci(x1,,xn)+a1(xn+1+xn+2)F_{i}(x)=C_{i}(x_{1},\ldots,x_{n})+a_{1}(x_{n+1}+x_{n+2}) with constraint values bi+a1b_{i}+a_{1}. Then we can easily find a driver term G^1=σn+1+σn+2+σn+1σn+2+\hat{G}_{1}=\sigma_{n+1}^{+}\sigma_{n+2}^{-}+\sigma_{n+1}^{-}\sigma_{n+2}^{+} (over the basis {𝟙,σ+,σ,σz}\{\mathbbm{1},\sigma^{+},\sigma^{-},\sigma^{z}\}) such that [G^1,Fi^]=0[\hat{G}_{1},\hat{F_{i}}]=0 for i[m]i\in[m]. Since the constraint values are bi+a1b_{i}+a_{1}, then the only way to satisfy the constraints is if (xn+1,xn+2){(1,0),(0,1)}(x_{n+1},x_{n+2})\in\{(1,0),(0,1)\}, since i=1ncixici1<a1\sum_{i=1}^{n}c_{i}x_{i}\leq\|c_{i}\|_{1}<a_{1} by design.

We have thus altered the constraints such that the feasibility space of the original problem is now doubled in size by the addition of the two variables xn+1x_{n+1} and xn+2x_{n+2}, if the original feasibility space was non-empty. The important structure we note here is that the feasibility subspace of the new constraints is the tensor product of the feasibility subspace of the original constraints, with the subspace generated by the states | 10\left\lvert\,10\,\right\rangle and | 01\left\lvert\,01\,\right\rangle over qubits xn+1,xn+2x_{n+1},x_{n+2}. It should also be easy to recognize then that the only nontrivial action induced by the driver terms we choose over xn+1,xn+2x_{n+1},x_{n+2} is precisely the action of G^1\hat{G}_{1}.

We can apply the same procedure recursively, adding ancillas {xn+1,,xn+2k}\{x_{n+1},\ldots,x_{n+2k}\} and generating kk driver terms, such that ai>ci1+j=1i1aja_{i}>\|\vec{c}_{i}\|_{1}+\sum_{j=1}^{i-1}a_{j} and G^i=(σn+2i1+σn+2i+σn+2i1σn+2i+)\hat{G}_{i}=(\sigma_{n+2\,i-1}^{+}\sigma_{n+2\,i}^{-}+\sigma_{n+2\,i-1}^{-}\sigma_{n+2\,i}^{+}), 1ik1\leq i\leq k. By this construction, when restricted to the ancilla variables, the feasible subspace is spanned by the vectors {i=1k|i1i2,i1+i2=1}\{\bigotimes_{i=1}^{k}|i_{1}i_{2}\rangle,i_{1}+i_{2}=1\}. Given any element in this subspace, the action of the G^i\hat{G}_{i} driver terms is sufficient to guarantee that any other element of this subspace can also be generated. To proceed with the reduction, we then give the constraints {F1,,Fm}\{F_{1},\ldots,F_{m}\} with constraint values {b1+i=1kai,,bm+i=1kai}\{b_{1}+\sum_{i=1}^{k}a_{i},\ldots,b_{m}+\sum_{i=1}^{k}a_{i}\} respectively and the drivers {G^1,,G^k}\{\hat{G}_{1},\ldots,\hat{G}_{k}\} to our ILP-QIRREDUCIBLECOMMUTE-GIVEN-k solver oracle. Since our kk driver terms are all over the added qubits xn+1x_{n+1} to xn+2kx_{n+2\,k}, it should be clear that these driver terms say nothing about the feasibility space of the original problem over qubits x1x_{1} to xnx_{n}. Suppose we are told that our kk drivers are sufficient, i.e., they can generate the whole feasible subspace by acting on any one element of that subspace. Then clearly there are no driver terms for the original ILP-QCOMMUTE-NONTRIVIAL decision problem, since none of the kk driver terms operate over qubits associated with variables x1x_{1} to xnx_{n}. Likewise if we are told our kk drivers are not sufficient, then clearly there must be at least one nontrivial driver for the original problem, since the drivers are enough to generate all elements of the feasible subspace when restricted to the ancillas. Note that this solves ILP-QCOMMUTE-NONTRIVIAL without giving us a token to verify it. Because this is the most general unstructured version of the problem, is it possible that a different complexity result can be found for a more structured questioning of the same problem. We note that the problem can also have a stronger complexity result, such as a relationship to a higher class in the polynomial hierarchymeyer1972equivalence ; stockmeyer1976polynomial ; garey1979computers , like #Pvaliant1979complexity , to which it has some natural analogues.

Given this result and the result of Section IV, we can often find drivers that satisfy the condition stated in Theorem III.1, but may not connect the entire feasible space. Still, there remain many avenues for exploiting such terms; for example, alongside the ordinary transverse field such that universality is maintained, but with biasing towards a subspace of the solution space. This gives us a way to adjust the knob of using higher order terms when the ordinary transverse field struggles to find a solution. Such driver terms can also be beneficial for exploring new solutions using reverse annealingventurelli2019reverse ; king2018observation , especially for solutions that are higher hamming distance away since the transverse field generally struggles to find such solutions.

Another way to leverage our result is to brute force the problem for a set of constraints over a small enough subspace that it becomes polynomially tractable. Over the other variables, we apply the usual transverse field and enforce the other constraints as penalty terms in the final Hamiltonian. These approaches can also be adopted to the constraints that are geometrically local (like in a two dimensional grid).

VII Conclusion

In this work, we addressed the computational complexity of finding driver Hamiltonians for quantum annealing processes which aim at solving optimization or feasibility problems with several linear constraints. We develop a simple and intuitive algebraic framework for understanding whether a Hamiltonian commutes with a set of constraints or not. While this result is interesting mathematically in its own right, we mainly focus on the problem posed in Ref.hen2016driver about algorithmically finding driver Hamiltonians for optimization problems with several linear constraints. Most significantly, the condition is useful for finding a reduction of the NP-Hard problem EQUAL SUBSET SUMS to finding such a driver Hamiltonian, thereby allowing us to categorize the complexity of this problem.

We also showed that ILP-QCOMMUTE-NONTRIVIAL and ILP-QIRREDUCIBLECOMMUTE-GIVEN-k are at least NP-Hard. But these problems could well be in a higher complexity class in the polynomial hierarchy - like #P, to which ILP-QIRREDUCIBLECOMMUTE-GIVEN-k has some similarity. However, for most common implementations the Hamiltonians are of bounded weight, and the relevant complexity class ILP-QCOMMUTE-k-LOCAL for a small integer kk is in P. Hence, there is a simple brute force algorithm, as detailed in Section IV, to find a basis for all possible driver Hamiltonians of this bounded locality. However, the results from ILP-QIRREDUCIBLECOMMUTE-GIVEN-k say that given a set of driver terms, it is intractable to know whether the found basis can sustain a Hamiltonian that connects the entire feasibility space for the linear constraints. As such, we present a polynomial time algorithm that is guaranteed to find a basis for all possible Hamiltonians that commute with a set of embedded constraint operators up to a certain weight, but with no guarantees that the found Hamiltonian is able to connect the entire feasibility space that the constraints specified. However, for some important problems it is actually possible to exploit the constraint structure to guarantee that driver terms with low weight will be sufficient to reach all feasible states. This is the case, for example, for the graph coloring problem discussed in Section II and Ref.hen2016driver .

Our result also applies to finding mixing operators for Quantum Alternating Operator Ansatz (QAOA)farhi2014quantum ; hadfield2019quantum . To implement highly nontrivial driver Hamiltonians for an anneal, it also becomes necessary to find a new initial Hamiltonian that is then evolved slowly with a simple linear interpolation to the driver Hamiltonian since thermal equilibration to the driver Hamiltonian may be difficult. It then becomes relevant how can we construct such a Hamiltonian for a given driver Hamiltonian, such that we can guarantee that we reach the right constrained space. This is a fundamental question for future research. While we have shown these problems to be NP-Hard, we have not shown what the average hardness of this class is or what the typical hardness is for instances of interest for specific applications. Especially pertinent become sets of instances in which the practical runtime for finding driver Hamiltonians remains tractable or the hardness of the problem comes from having to search a large feasible space for an optimum solution rather than pinpointing a very small feasible space. It is also interesting to note that our algebraic formulation is agnostic to the stoquasticity of the terms found. In the presented basis of Section III, the stoquasticity of the individual basis terms, as written in Eq. 6, is determined by the amplitudes α\alpha and its conjugate pair α\alpha^{\dagger}. Commutation is invariant under altering α\alpha (α\alpha^{\dagger} will adjust as we alter α\alpha to keep the term pair commutative). Once we have found driver terms that are suitable for a problem, it then raises the question of what effect, if any, choosing coefficients that will make them stoquastic or non-stoquastic will have on the annealbravyi2006complexity ; bravyi2010complexity ; marvian2019computational ; crosson2020signing .This is another direction that requires further study.

VIII Acknowledgments

The research is based upon work (partially) supported by the Office of the Director of National Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA) and the Defense Advanced Research Projects Agency (DARPA), via the U.S. Army Research Office contract W911NF-17-C-0050. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the ODNI, IARPA, or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright annotation thereon.

References

  • (1) I. Hen and F. M. Spedalieri, “Quantum annealing for constrained optimization,” Physical Review Applied, vol. 5, no. 3, p. 034007, 2016.
  • (2) I. Hen and M. S. Sarandy, “Driver hamiltonians for constrained optimization in quantum annealing,” Physical Review A, vol. 93, no. 6, p. 062312, 2016.
  • (3) T. Kadowaki and H. Nishimori, “Quantum annealing in the transverse ising model,” Physical Review E, vol. 58, no. 5, p. 5355, 1998.
  • (4) E. Farhi, J. Goldstone, S. Gutmann, and M. Sipser, “Quantum computation by adiabatic evolution,” arXiv preprint quant-ph/0001106, 2000.
  • (5) T. Albash and D. A. Lidar, “Adiabatic quantum computation,” Rev. Mod. Phys., vol. 90, p. 015002, Jan 2018. [Online]. Available: https://link.aps.org/doi/10.1103/RevModPhys.90.015002
  • (6) E. Farhi, J. Goldstone, S. Gutmann, J. Lapan, A. Lundgren, and D. Preda, “A quantum adiabatic evolution algorithm applied to random instances of an np-complete problem,” Science, vol. 292, no. 5516, pp. 472–475, 2001.
  • (7) G. E. Santoro and E. Tosatti, “Optimization using quantum mechanics: quantum annealing through adiabatic evolution,” Journal of Physics A: Mathematical and General, vol. 39, no. 36, p. R393, 2006.
  • (8) Z. Bian, F. Chudak, R. B. Israel, B. Lackey, W. G. Macready, and A. Roy, “Mapping constrained optimization problems to quantum annealing with application to fault diagnosis,” Frontiers in ICT, vol. 3, p. 14, 2016.
  • (9) P. Hauke, H. G. Katzgraber, W. Lechner, H. Nishimori, and W. D. Oliver, “Perspectives of quantum annealing: Methods and implementations,” Reports on Progress in Physics, vol. 83, no. 5, p. 054401, 2020.
  • (10) S. H. Adachi and M. P. Henderson, “Application of quantum annealing to training of deep neural networks,” arXiv preprint arXiv:1510.06356, 2015.
  • (11) A. Mott, J. Job, J.-R. Vlimant, D. Lidar, and M. Spiropulu, “Solving a higgs optimization problem with quantum annealing for machine learning,” Nature, vol. 550, no. 7676, pp. 375–379, 2017.
  • (12) M. H. Amin, E. Andriyash, J. Rolfe, B. Kulchytskyy, and R. Melko, “Quantum boltzmann machine,” Physical Review X, vol. 8, no. 2, p. 021050, 2018.
  • (13) J. Biamonte, P. Wittek, N. Pancotti, P. Rebentrost, N. Wiebe, and S. Lloyd, “Quantum machine learning,” Nature, vol. 549, no. 7671, pp. 195–202, 2017.
  • (14) R. Y. Li, R. Di Felice, R. Rohs, and D. A. Lidar, “Quantum annealing versus classical machine learning applied to a simplified computational biology problem,” NPJ quantum information, vol. 4, no. 1, pp. 1–10, 2018.
  • (15) V. Kumar, G. Bass, C. Tomlin, and J. Dulny, “Quantum annealing for combinatorial clustering,” Quantum Information Processing, vol. 17, no. 2, pp. 1–14, 2018.
  • (16) S. G. Brush, “History of the lenz-ising model,” Reviews of modern physics, vol. 39, no. 4, p. 883, 1967.
  • (17) D. Sherrington and S. Kirkpatrick, “Solvable model of a spin-glass,” Physical review letters, vol. 35, no. 26, p. 1792, 1975.
  • (18) T. Castellani and A. Cavagna, “Spin-glass theory for pedestrians,” Journal of Statistical Mechanics: Theory and Experiment, vol. 2005, no. 05, p. P05012, 2005.
  • (19) M. Troyer and U.-J. Wiese, “Computational complexity and fundamental limitations to fermionic quantum monte carlo simulations,” Physical review letters, vol. 94, no. 17, p. 170201, 2005.
  • (20) A. Lucas, “Ising formulations of many np problems,” Frontiers in Physics, vol. 2, p. 5, 2014.
  • (21) S. A. Cook, “The complexity of theorem-proving procedures,” in Proceedings of the third annual ACM symposium on Theory of computing, 1971, pp. 151–158.
  • (22) R. M. Karp, “On the computational complexity of combinatorial problems,” Networks, vol. 5, no. 1, pp. 45–68, 1975.
  • (23) ——, “Reducibility among combinatorial problems,” in Complexity of computer computations.   Springer, 1972, pp. 85–103.
  • (24) G. J. Woeginger and Z. Yu, “On the equal-subset-sum problem,” Information Processing Letters, vol. 42, no. 6, pp. 299–302, 1992.
  • (25) T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Introduction to algorithms.   MIT press, 2009.
  • (26) A. Y. Kitaev, A. Shen, M. N. Vyalyi, and M. N. Vyalyi, Classical and quantum computation.   American Mathematical Soc., 2002, no. 47.
  • (27) J. Kempe and O. Regev, “3-local hamiltonian is qma-complete,” arXiv preprint quant-ph/0302079, 2003.
  • (28) J. Kempe, A. Kitaev, and O. Regev, “The complexity of the local hamiltonian problem,” SIAM Journal on Computing, vol. 35, no. 5, pp. 1070–1097, 2006.
  • (29) A. R. Meyer and L. J. Stockmeyer, “The equivalence problem for regular expressions with squaring requires exponential space,” in SWAT (FOCS), 1972, pp. 125–129.
  • (30) L. J. Stockmeyer, “The polynomial-time hierarchy,” Theoretical Computer Science, vol. 3, no. 1, pp. 1–22, 1976.
  • (31) M. R. Garey and D. S. Johnson, “Computers and intractability,” A Guide to the, 1979.
  • (32) L. G. Valiant, “The complexity of enumeration and reliability problems,” SIAM Journal on Computing, vol. 8, no. 3, pp. 410–421, 1979.
  • (33) D. Venturelli and A. Kondratyev, “Reverse quantum annealing approach to portfolio optimization problems,” Quantum Machine Intelligence, vol. 1, no. 1, pp. 17–30, 2019.
  • (34) A. D. King, J. Carrasquilla, J. Raymond, I. Ozfidan, E. Andriyash, A. Berkley, M. Reis, T. Lanting, R. Harris, F. Altomare et al., “Observation of topological phenomena in a programmable lattice of 1,800 qubits,” Nature, vol. 560, no. 7719, pp. 456–460, 2018.
  • (35) E. Farhi, J. Goldstone, and S. Gutmann, “A quantum approximate optimization algorithm,” arXiv preprint arXiv:1411.4028, 2014.
  • (36) S. Hadfield, Z. Wang, B. O’Gorman, E. G. Rieffel, D. Venturelli, and R. Biswas, “From the quantum approximate optimization algorithm to a quantum alternating operator ansatz,” Algorithms, vol. 12, no. 2, p. 34, 2019.
  • (37) S. Bravyi, D. P. Divincenzo, R. I. Oliveira, and B. M. Terhal, “The complexity of stoquastic local hamiltonian problems,” arXiv preprint quant-ph/0606140, 2006.
  • (38) S. Bravyi and B. Terhal, “Complexity of stoquastic frustration-free hamiltonians,” Siam journal on computing, vol. 39, no. 4, pp. 1462–1485, 2010.
  • (39) M. Marvian, D. A. Lidar, and I. Hen, “On the computational complexity of curing non-stoquastic hamiltonians,” Nature communications, vol. 10, no. 1, pp. 1–9, 2019.
  • (40) E. Crosson, T. Albash, I. Hen, and A. Young, “De-signing hamiltonians for quantum adiabatic optimization,” Quantum, vol. 4, p. 334, 2020.

Appendix A 0-1-LP-QCOMMUTE is NP HARD

We reduce the 0-1-LP-QCOMMUTE problem to the EQUAL SUBSET SUM problem. We define the EQUAL SUBSET SUM problem as before:

Definition:

EQUAL SUBSET SUM Given a set S={s1,s2,,sn}S=\{s_{1},s_{2},\ldots,s_{n}\}, with si+s_{i}\in\mathbb{Z}^{+}, find two non-empty disjoint subsets, A,BA,B such that aiAai=biBbi\sum_{a_{i}\in A}a_{i}=\sum_{b_{i}\in B}b_{i}.

The EQUAL SUBSET SUM problem is known to be NP-Completewoeginger1992equal . We map an instance of the EQUAL SUBSET SUM problem to the 0-1-LP-QCOMMUTE problem; the former of which is defined over a set S={s1,s2,,sn}S=\{s_{1},s_{2},\ldots,s_{n}\}, with si+s_{i}\in\mathbb{Z}^{+}. In order to connect EQUAL SUBSET SUM with solving a linear system over discrete variables (the key of Theorem III.1), we will associate an assignment of integers in SS to the two subsets AA and BB with a function uu over SS such that u={u1,,un}u=\{u_{1},\ldots,u_{n}\} with ui{1,0,1}u_{i}\in\{-1,0,1\}. We associate the value uiu_{i} as the assignment uu gives to integer sis_{i}. Slightly abusing notation, this defines a function on any subset M={sm1,sm2,,sm|M|}M=\{s_{m_{1}},s_{m_{2}},\ldots,s_{m_{|M|}}\} such that u(M)={um1,um2,,um|M|}u(M)=\{u_{m_{1}},u_{m_{2}},\ldots,u_{m_{|M|}}\}. When discussing a subset of a single element ses_{e}, we also abuse notation to allow for u(se)=ueu(s_{e})=u_{e}. We can then define an integer valued function ES(u)=siSnuisiE_{S}(u)=\sum_{s_{i}\in S}^{n}u_{i}s_{i}. If we associate integers sis_{i} such that ui=1u_{i}=1 with integers in subset AA, and those with ui=1u_{i}=-1 with integers in subset BB, then we can rewrite it as ES(u)=siAsisiBsiE_{S}(u)=\sum_{s_{i}\in A}s_{i}-\sum_{s_{i}\in B}s_{i} (note that ui=0u_{i}=0 means that the corresponding integer is not chosen for any of the two subsets). Then, EQUAL SUBSET SUM has a solution if and only if there is an assignment function uu with a nontrivial image such that ES(u)=inuisi=0E_{S}(u)=\sum_{i}^{n}u_{i}s_{i}=0.

However, we need a vector representation to exploit the structure of Theorem III.1. Let smaxs_{\text{max}} be the maximum of SS. We define SMS^{M} as the matrix with the binary representations of SS as its column vectors. Given sjSs_{j}\in S, we define entry sijM=sjis_{ij}^{M}=s_{j}^{i} – referring to the ii-th bit of integer sjs_{j}. This defines a m×nm\times n matrix with m=log(smax)m=\lceil\log(s_{max})\rceil.

The idea is that we wish to give each integer an associated binary vector such that multiplying a binary vector with SMS^{M} corresponds to selecting that integer to participate in a sum. We refer to the vectorized form of uu as μ{1,0,1}n\vec{\mu}\in\{-1,0,1\}^{n} such that μ=(u1,,un)\vec{\mu}=(u_{1},\ldots,u_{n}). Since multiplying a matrix by a vector on the right results in a linear combination of the matrix columns, with the coefficients being the corresponding components of the vector, it would be tempting to assume that ES(u)=SMμE_{S}(u)=S^{M}\,\vec{\mu}, since the columns of SMS^{M} are associated with the integers in SS. Then we would have something like ES(u)=0E_{S}(u)=0 if and only if SMμ=0S^{M}\,\vec{\mu}=\vec{0}, providing our desired connection between Theorem III.1 and EQUAL SUBSET SUM.

Unfortunately this does not work, since the columns of SS contain a binary representations of the integers sis_{i}, while the expression ES(u)E_{S}(u) refers to the usual addition of integers, and not bit component wise addition. To illustrate what we mean with this, consider the (improper) set S={1,1,2}S=\{1,1,2\} which delineates:

SM=s1s2s3\ldelim(20.5em110\rdelim)20.5em001\displaystyle S^{M}=\;\begin{array}[]{ccccc}&s_{1}&s_{2}&s_{3}&\\ \ldelim({2}{0.5em}&1&1&0&\rdelim){2}{0.5em}\\ &0&0&1&\\ \end{array}

Even though the associated EQUAL SUBSET SUM problem has a simple solution associated with the function u={1,1,1}u=\{1,1,-1\} (assign the first two integers to subset AA and the third to subset BB), a simple calculation shows that SMμ=(2,1)0S^{M}\,\vec{\mu}=(2,-1)\neq\vec{0}. From the example above we can see that what we are missing is a way of incorporating the “bit carry" that occurs in binary addition into the operations of regular matrix-vector multiplication. The main goal of this appendix is to show how this can be accomplished by embedding these matrix operations into a larger vector space.

In order to resolve this issue, we will introduce a mechanism to do generalized bit addition - bit addition that is generalized to when the bit values can both be positive and negative as well as zero. We add ancillary bits 𝒜\mathscr{A} such that uu^{\ast} is the assignment uu expanded to this new space S𝒜S\cup\mathscr{A} as u={u1,,un,un+1,,un+|𝒜|}u^{\ast}=\{u_{1},\ldots,u_{n},u_{n+1},\ldots,u_{n+|\mathscr{A}|}\}. Slightly abusing notation, for any subset M=MSM𝒜M=M_{S}\cup M_{\mathscr{A}} with MS={sms1,,sms|MS|}M_{S}=\{s_{ms_{1}},\ldots,s_{ms_{|M_{S}|}}\} and M𝒜={ama1,,ama|M𝒜|}M_{\mathscr{A}}=\{a_{ma_{1}},\ldots,a_{ma_{|M_{\mathscr{A}}|}}\}, we define u(M)={ums1,,ums|MS|,ama1,,ama|M𝒜|}u^{\ast}(M)=\{u_{ms_{1}},\ldots,u_{ms_{|M_{S}|}},a_{ma_{1}},\ldots,a_{ma_{|M_{\mathscr{A}}|}}\}. We construct new constraints 𝒦\mathscr{K} such that ES(u)=0E𝒦(u)=0E_{S}(u)=0\Leftrightarrow E_{\mathscr{K}}(u^{\ast})=0. Moreover, uu^{\ast} will allow for a vectorized form μ\vec{\mu^{\ast}} and 𝒦\mathscr{K} a matrix KMK^{M} (see A.2) such that E𝒦(u)=0KMμ=0E_{\mathscr{K}}(u^{\ast})=0\Leftrightarrow K^{M}\,\vec{\mu^{\ast}}=0. Intuitively, uu^{\ast} picks coefficients for values over SS and is subsequently forced to take values on 𝒜\mathscr{A} corresponding to doing valid bit addition and only satisfies 𝒦\mathscr{K} if the bit entries of the total sum is indeed zero. Fig. 1 gives a visual description of the steps used to create our full reduction. As such, for a given set of integers SS, we follow the reduction to construct a binary matrix KMK^{M} such that the row vectors of KMK^{M} define the constraint operators K^i=j=1|S𝒜|kijMσjz\hat{K}_{i}=\sum_{j=1}^{|S\cup\mathscr{A}|}k_{ij}^{M}\sigma_{j}^{z}. This serves as the input binary LP to the oracle solver of 0-1-LP-QCOMMUTE to tell us if a Hamiltonian HH exists such that HH has an off-diagonal term in the spin-z basis that shows the existence of v,w\vec{v},\vec{w}, which describe two subsets AA and BB as the solution to the given Equal Subset Sum problem.

Refer to caption

Figure 1: A flow cart describing how our reduction works, we recommend motivated readers refer back to it as they read the reduction. An instance of EQUAL SUBSET SUM (box 1) is mapped into a binary constraint representation such that the sum function EE defined over the assignment uu is equivalent to sum(A)sum(B)\text{sum}(A)-\text{sum}(B) where uu assigns variables to either AA, BB, or they are not used (box 2). To exploit Theorem III.1, constraints CC are mapped to constraints 𝒦\mathscr{K} (box 3), such that assignment E𝒦(u)=0ES(u)=0E_{\mathscr{K}}(u^{\ast})=0\Leftrightarrow E_{S}(u^{\ast})=0. Unlike SS, 𝒦\mathscr{K} allows for a simple matrix representation such that KMμ=0E𝒦(u)=0K^{M}\,\vec{\mu^{\ast}}=0\Leftrightarrow E_{\mathscr{K}}(u^{\ast})=0 (box 4), where μ\vec{\mu} is a naive vectorized form of uu^{\ast}. Note that if u exists such that ES(u)=0E_{S}(u)=0, then many uu^{\ast} exist such that E𝒦(u)=0E_{\mathscr{K}}(u^{\ast})=0, but each reduces to the same uu. The constraint version of KMK^{M} can be embedded row-wise to define operators K^1,,KS𝒜^\hat{K}_{1},\ldots,\hat{K_{S\cup\mathscr{A}}} as K^i=j=1|S𝒜|kijMσjz\hat{K}_{i}=\sum_{j=1}^{|S\cup\mathscr{A}|}k_{ij}^{M}\sigma_{j}^{z} such that a 0-1-LP-QCOMMUTE oracle solves to show the existence of a driver Hamiltonian HdH_{d}, which we can interpret back to see there must be a solution to EQUAL SUBSET SUM as well.

A.1 Generalized Full Adder

Inputs Output
Primary Secondary
a b s c s c
-1 -1 0 -1 - -
-1 0 -1 0 1 -1
-1 1 0 0 - -
0 -1 -1 0 1 -1
0 0 0 0 - -
0 1 1 0 -1 1
1 -1 0 0 - -
1 0 1 0 -1 1
1 1 0 1 - -
Table 1: The generalized full adder; if uu^{\ast} takes a particular value on inputs aa and bb, then uu^{\ast} will be forced to take the corresponding sum (represented by ss) and carry (represented by cc) values. In the case that a+ba+b is not a power of two, ss and cc have two possible values they can take. Here primary (secondary) operations correspond to the operations where the carry is set to zero (nonzero) if possible.

In this section we describe how to build the basis for our reduction, which is to find a matrix such that the values uu^{\ast} takes on the set SS are added bitwise over the ancillary bits 𝒜\mathscr{A}. There will be specific ancillary bits such that the total sum that uu^{\ast} takes on SS can be deduced from its value on these bits. Consider again the simple example we introduced in the previous section. We will add ancillary variables such that their values are forced to be what is dictated by the bit addition of values in SS. This can be summarized in Table 1. If uu^{\ast} takes a particular value on two inputs aa and bb, then the table describes what value uu^{\ast} will be forced to take on new ancillary values ss and cc (representing the sum and carry bits respectively).

Like the ordinary adder, the generalized adder accepts all values such that u(a)+u(b)=2u(c)+u(s)u^{\ast}(a)+u^{\ast}(b)=2\,u^{\ast}(c)+u^{\ast}(s) except now u(x){1,0,1}u^{\ast}(x)\in\{-1,0,1\} for any xx and so u(a)+u(b){2,1,0,1,2}u^{\ast}(a)+u^{\ast}(b)\in\{-2,-1,0,1,2\}. Note that then the carry bit and the sum bit are not unique like in the case of the ordinary full adder. For example if u(a)=1u^{\ast}(a)=1 and u(b)=0u^{\ast}(b)=0, then it is possible that u(c)=0u^{\ast}(c)=0 and u(s)=1u^{\ast}(s)=1 like in the ordinary adder, but also that u(c)=1u^{\ast}(c)=1 and u(s)=1u^{\ast}(s)=-1. Since 2u(c)+u(s)2\,u^{\ast}(c)+u^{\ast}(s) is the same value for both, they are both technically valid. The operations keen to the ordinary full adder we refer to as primary and those that do not as secondary. When possible, a primary operation will set the carry bit to zero while a secondary operation will set the carry bit to either one or negative one. One may hope that we could force the primary mode of operation, but we could not construct a 0-1 matrix that could force these modes of operations over the secondary modes since our condition for satisfaction is through equivalence statements like u(a)+u(b)=2u(c)+u(s)u^{\ast}(a)+u^{\ast}(b)=2\,u^{\ast}(c)+u^{\ast}(s), but no equivalence statement can state a preference in representation. While it does not affect the correctness of our result, it does mean that the number of solutions is not preserved in our reduction - there are many valid uu^{\ast} that reduced to a single uu. The reduction is therefore not parsimonious.

To enforce the generalized adder between two inputs and two outputs we need to generate the correct submatrix. Given inputs aa and bb, we define the matrix on a,b,s,c,x1,x2,x3a,b,s,c,x_{1},x_{2},x_{3} - with x1,x2,x3x_{1},x_{2},x_{3} being intermediating ancillas - as:

GAM=abx1x2x3cs\ldelim(60.5emab11100\rdelim)60.5em00101110001111001001000010100000101\displaystyle GA^{M}=\;\begin{array}[]{c c c c c c c c c}&a&b&x_{1}&x_{2}&x_{3}&c&s&\\ \ldelim({6}{0.5em}&a&b&1&1&1&0&0&\rdelim){6}{0.5em}\\ &0&0&1&0&1&1&1&\\ &0&0&0&1&1&1&1&\\ &0&0&1&0&0&1&0&\\ &0&0&0&1&0&1&0&\\ &0&0&0&0&1&0&1&\end{array} (15)

As constraints, we can write it as:

GA1(a,b,x1,x2,x3)\displaystyle GA_{1}(a,b,x_{1},x_{2},x_{3}) =0,\displaystyle=0, (16)
GA2(x1,x3,s,c)\displaystyle GA_{2}(x_{1},x_{3},s,c) =0,\displaystyle=0, (17)
GA3(x2,x3,s,c)\displaystyle GA_{3}(x_{2},x_{3},s,c) =0,\displaystyle=0, (18)
GA4(x1,c)\displaystyle GA_{4}(x_{1},c) =0,\displaystyle=0, (19)
GA5(x2,c)\displaystyle GA_{5}(x_{2},c) =0,\displaystyle=0, (20)
GA6(x3,s)\displaystyle GA_{6}(x_{3},s) =0.\displaystyle=0. (21)

For every generalized adder in Fig. 3 (as described in the protocol we gave in Section A.1), we have a submatrix over the corresponding variables. We give a simple case by case proof that GAMGA^{M} enforces uu^{\ast} to be valid if and only if its entries satisfy 2u(c)+u(s)=u(a)+u(b)2\,u^{\ast}(c)+u^{\ast}(s)=u^{\ast}(a)+u^{\ast}(b) as seen in Fig. 1 in Appendix B.

A.2 The Simple Reduced Case

Before we move on to give a general protocol for any given problem, we consider the simple case we described earlier with the integer (improper) set S={1,1,2}S=\{1,1,2\}. We give a slightly reduced description for this problem to show what the reductions typically look like. We implement a generalized adder for the bits s11s_{1}^{1} and s21s_{2}^{1} - introducing the ancillary bits k11,z11k_{1}^{1},z_{1}^{1} that are the corresponding carry and sum bit. We then implement a generalized adder for the bits s32s_{3}^{2} and k11k_{1}^{1} - introducing the ancillary bits k21,z21k_{2}^{1},z_{2}^{1} that the corresponding carry and sum bit. As such, ES(u)=0u(z11)=u(z21)=u(k21)=0E_{S}(u^{\ast})=0\Leftrightarrow u^{\ast}(z_{1}^{1})=u^{\ast}(z_{2}^{1})=u^{\ast}(k_{2}^{1})=0, since the latter condition is equivalent to saying that the bitwise sum of the two sets is zero. This is represented in Fig. 2A. Each box in the diagram refers to a generalized full adder. In words, we add the assignments u1,u2u_{1}^{\ast},u_{2}^{\ast} of the bits s11,s21s_{1}^{1},s_{2}^{1} and add the respective carry bit assignment with the assignment u3u_{3}^{\ast} on the bit s32s_{3}^{2}. The resulting integer is given by E{z11,z21,k21}(u({z11,z21,k21}))=u(z11)+2×u(z21)+4×u(k21)E_{\{z_{1}^{1},z_{2}^{1},k_{2}^{1}\}}\left(u^{\ast}(\{z_{1}^{1},z_{2}^{1},k_{2}^{1}\})\right)=u^{\ast}(z_{1}^{1})+2\times u^{\ast}(z_{2}^{1})+4\times u^{\ast}(k_{2}^{1}) - the first row sum bit, the second row sum bit, and what can be considered the third row sum bit added with their respective power of two. This must be zero if uu^{\ast} defines subsets of equal sums and therefore uu^{\ast} must be zero on each of them.

Refer to caption Refer to caption
A B
Figure 2: Subfigure A shows the reduced embedding of the EQUAL SUBSET SUM instance with the (improper) integer set {1,1,2}\{1,1,2\}. Each box represents a generalized full adder. Each adder describes a corresponding submatrix in the matrix K~M\tilde{K}^{M} (check Eq. 38). Subfigure B shows the full embedding of the same instance.

The resulting matrix K~M\tilde{K}^{M} - here we use a tilde to signify that we are in the reduced construction case - that this process defines can be represented as:

K~M=s11s21s32x11x12x13k11z11x21x22x23k21z21\ldelim(150.5em1101110000000\rdelim)150.5em00010111000000000111100000000100100000000001010000000000010100000001000101110000000000101110000000001111000000001001000000000010100000000000101000000010000000000000000100000000000001\displaystyle\tilde{K}^{M}=\;\begin{array}[]{ c c c c | c c c | c c | c c c | c c c }&s_{1}^{1}&s_{2}^{1}&s_{3}^{2}&x_{1}^{1}&x_{1}^{2}&x_{1}^{3}&k_{1}^{1}&z_{1}^{1}&x_{2}^{1}&x_{2}^{2}&x_{2}^{3}&k_{2}^{1}&z_{2}^{1}&\\ \ldelim({15}{0.5em}&1&1&0&1&1&1&0&0&0&0&0&0&0&\rdelim){15}{0.5em}\\ &0&0&0&1&0&1&1&1&0&0&0&0&0&\\ &0&0&0&0&1&1&1&1&0&0&0&0&0&\\ &0&0&0&1&0&0&1&0&0&0&0&0&0&\\ &0&0&0&0&1&0&1&0&0&0&0&0&0&\\ &0&0&0&0&0&1&0&1&0&0&0&0&0&\\ \cline{2-14}\cr&0&0&1&0&0&0&1&0&1&1&1&0&0&\\ &0&0&0&0&0&0&0&0&1&0&1&1&1&\\ &0&0&0&0&0&0&0&0&0&1&1&1&1&\\ &0&0&0&0&0&0&0&0&1&0&0&1&0&\\ &0&0&0&0&0&0&0&0&0&1&0&1&0&\\ &0&0&0&0&0&0&0&0&0&0&1&0&1&\\ \cline{2-14}\cr&0&0&0&0&0&0&0&1&0&0&0&0&0&\\ &0&0&0&0&0&0&0&0&0&0&0&1&0&\\ &0&0&0&0&0&0&0&0&0&0&0&0&1&\end{array} (38)

One can check that if μ=(1,1,1,1,1,0,1,0,0,0,0,0,0)\vec{\mu^{\ast}}=(1,1,-1,-1,-1,0,1,0,0,0,0,0,0), then K~Mμ=0\tilde{K}^{M}\,\vec{\mu^{\ast}}=\vec{0}. The vector μ\vec{\mu^{\ast}} defines the assignment u(S)={1,1,1}u^{\ast}(S)=\{1,1,-1\} - since s1,s2,s3s_{1},s_{2},s_{3} are the first three entries of the vectorized form. This defines the two sets A={s1,s2}A=\{s_{1},s_{2}\} and B={s3}B=\{s_{3}\} as a solution to the EQUAL SUBSET SUM problem posed. One can check that μ=(1,1,0,0,0,0,0,0,0,0,0,0,0)\vec{\mu^{\ast}}=(1,-1,0,0,0,0,0,0,0,0,0,0,0) is also a solution, corresponding to the sets A={1}A=\{1\} and B={1}B=\{1\}.

In this reduced construction, we only used the generalized full adder for the significant bits of each sjSs_{j}\in S for a given bit entry ii. This helps to greatly reduce the size of the resulting embedding, but hopefully still conveys the principal idea behind our reduction. While we could write a general protocol on the same principle, it requires a more involved strategy than the one we take.

A.3 The Simple Unreduced Case

To simplify the construction of the embedding at the cost of increasing their corresponding size, we follow the same logic as before, but do not prune the insignificant bits. In the unreduced construction, we “compute” the sum bit by bit. Like in the reduced case, the resulting sum bit at the end of each layer corresponds to a bit entry that the sum defined by uu^{\ast} takes - remember, in the end, the value of aAabBb\sum_{a\in A}a-\sum_{b\in B}b was described bitwise by the value uu^{\ast} took on the last sum bit in each layer plus the last layer’s carry bit (e.g. ES(u(S))=u(z1)+2×u(z2)+4×u(k2)E_{S}(u^{\ast}(S))=u^{\ast}(z_{1})+2\times u^{\ast}(z_{2})+4\times u^{\ast}(k_{2})). This remains the same in the unreduced representation. Note that nonzero sums can have multiple bit representations when the entries can be negative or positive, i.e. 1=1×1+1×2=1×1+0×21=-1\times 1+1\times 2=1\times 1+0\times 2, while the sum 0 has only one.

In words, we add the bits of each integer in the corresponding bit entry as well as all carry bits from the previous layer to find the total sum of all the integers if none of them had significant bits beyond this layer. Let u(zendi)u^{\ast}(z_{end}^{i}) be the last sum bit for any row ii. Then the total sum up to the current layer ii can be written as 2i(2×q+s)+j=1i2j1u(zendj)2^{i}\left(2\times q+s\right)+\sum_{j=1}^{i}2^{j-1}u^{\ast}(z_{end}^{j}) for some qq. Then we identify ss as the last sum bit of the current layer, u(zendi)u^{\ast}(z_{end}^{i}) and qq as the net number of carries passed from layer ii to i+1i+1.

Consider again the simple case we described earlier. We have a (improper) set S={1,1,2}S=\{1,1,2\}, such that we can identify each of these three values as s1,s2,s3s_{1},s_{2},s_{3}. Refer to Fig. 2B to see the resulting diagram that this construction will give. Then s11,s21,s31s_{1}^{1},s_{2}^{1},s_{3}^{1} are the first bits of each of these three. We use generalized full adders to add - bit by bit - the values s11,s21,s31s_{1}^{1},s_{2}^{1},s_{3}^{1} and feed the resulting carry bits k11,k21k_{1}^{1},k_{2}^{1} to the next layer while z21z_{2}^{1} takes the value of the lowest bit entry for the total sum of the assignment. In the second layer we add - bit by bit - the values s12,s22,s33,k11,k21s_{1}^{2},s_{2}^{2},s_{3}^{3},k_{1}^{1},k_{2}^{1} and feed the resulting carry bits k12,k22,k32,k42k_{1}^{2},k_{2}^{2},k_{3}^{2},k_{4}^{2} to the next layer while z24z_{2}^{4} takes the value of the second lowest bit entry for the total sum. Since the maximum bit entry was given in row two, row three adds only the carry bits k12,k22,k32,k42k_{1}^{2},k_{2}^{2},k_{3}^{2},k_{4}^{2}, which generates the carry bits k13,k23,k33k_{1}^{3},k_{2}^{3},k_{3}^{3} that are subsequently fed into layer four while z43z_{4}^{3} is the third lowest bit entry for the total sum. Layer four adds the carry values and generates the corresponding carry bits k14,k24k_{1}^{4},k_{2}^{4} as well as the sum bit z24z_{2}^{4}. Lastly, layer five adds these values and generates the corresponding carry bit k15k_{1}^{5} as well as the last sum bit z14z_{1}^{4}. To complete our description, each layer has internal sum variables from each generalized adder. Every line in the diagram corresponds to a variable; variables that are between two boxes are intermediaries, such as all the carry bits except k15k_{1}^{5} and all the sum bits except the last ones in each layer. For example, layer one has z11z_{1}^{1} - an intermediate sum bit that is passed from the first generalized adder to the second. This is in contrast to z21z_{2}^{1}, which is the sum bit of the second generalized adder and is the lowest bit entry for the total sum of the assignment. All carry bits except for the very last one - the one from the single generalized adder in the last row - are intermediaries. Variables that are not between boxes are determined; sijs_{i}^{j} are set to the jj-th lowest bit in the ii-th integer of the set SS while zendiz_{end}^{i} for layer ii and k15k_{1}^{5} are set to one in the corresponding matrix.

A.4 The General Unreduced Case

Before we turn our attention to a full protocol for the general unreduced case, we give a more intuitive and visual description of the reduction. Fig. 3 gives a schematic of what the general case looks like. Note that Fig. 2B fits precisely this description as well.

Refer to caption

Figure 3: This figure shows the layout of the generalized complete adder for enforcing that uu^{\ast} is only valid if the corresponding uu on S={s1,,sn}S=\{s_{1},\ldots,s_{n}\} is also valid. In each row, a box corresponds to a generalized adder (with the truth table given in Table 1) where the output of that whole row (labeled by the sum bit zz) is zero if and only if uu^{\ast} is valid. After mm (the largest bit length of any siSs_{i}\in S) rows, the next rows are fed only carries from the previous rows. As such, the number of generalized adders decreases by one, until the very last row, where we have that z1mnz_{1}^{mn} and k1mnk_{1}^{mn} should both be zero for uu^{\ast} to be valid on the set. The final constraint matrix is a representation of this diagram, with each generalized adder representing a submatrix that enforces the relationship shown in Table 1 (check Eq. 15).

We call the generalized function with the truth table corresponding to Table 1 as GAsGA_{s} and GAkGA_{k} for the sum and carry bit respectively, and so the constraints we considered earlier enforce: u(c)=GAc(u(a),u(b))u^{\ast}(c)=GA_{c}(u^{\ast}(a),u^{\ast}(b)) and u(s)=GAs(u(a),u(b))u^{\ast}(s)=GA_{s}(u^{\ast}(a),u^{\ast}(b)). We use the common convention of writing u(a1,,ak)u^{\ast}(a_{1},\ldots,a_{k}) as a condensed form of (u(a1),,u(ak))(u^{\ast}(a_{1}),\ldots,u^{\ast}(a_{k})) so that GAc(u(a),u(b))GAc(u(a,b))GA_{c}(u^{\ast}(a),u^{\ast}(b))\equiv GA_{c}(u^{\ast}(a,b)). These are not proper functions since GAsGA_{s} and GAkGA_{k} sometimes have two valid modes of operation. We also define GAs(u(s1:k))=GAs(GAs(GAs(u(s1),u(s2)),),u(sn))GA_{s}(u^{\ast}(s_{1:k}))=GA_{s}\left(GA_{s}\left(\ldots GA_{s}\left(u^{\ast}(s_{1}),u^{\ast}(s_{2})\right),\ldots\right),u^{\ast}(s_{n})\right) to help condense our writing.

To enforce the right bit addition, we use the following protocol:

  • 1.

    Let l=1l=1, 𝒦=Ø\mathscr{K}=\O, and 𝒜=Ø\mathscr{A}=\O.

  • 2.

    Generate (n1)l(n-1)l carry bits (k1l,,k(n1)llk_{1}^{l},\ldots,k_{(n-1)l}^{l}) and append them to 𝒜\mathscr{A} as well as (n1)l(n-1)l sum bits (z1l,,z(n1)llz_{1}^{l},\ldots,z_{(n-1)l}^{l}) and append them to 𝒜\mathscr{A}. Add n1n-1 constraints to 𝒦\mathscr{K} that will enforce GAGA between s1l,snls_{1}^{l},\ldots s_{n}^{l} in order, such that for any assignment uu^{\ast}, uu^{\ast} is valid if and only if

    u(k1l)\displaystyle u^{\ast}(k_{1}^{l}) =GAk(u(s1l,s2l))\displaystyle=GA_{k}(u^{\ast}(s_{1}^{l},s_{2}^{l})) (39)
    u(z1l)\displaystyle u^{\ast}(z_{1}^{l}) =GAs(u(s1l,s2l))\displaystyle=GA_{s}(u^{\ast}(s_{1}^{l},s_{2}^{l})) (40)
    u(kil)\displaystyle u^{\ast}(k_{i}^{l}) =GAk(u(zi1l,si+1l))=GAk(GAs(u(s1:il)))i[2,n1]\displaystyle=GA_{k}(u^{\ast}(z_{i-1}^{l},s_{i+1}^{l}))=GA_{k}(GA_{s}(u^{\ast}(s_{1:i}^{l})))\;\;\forall i\in[2,n-1] (41)
    u(zil)\displaystyle u^{\ast}(z_{i}^{l}) =GAs(u(zi1l,si+1l))=GAs(u(s1:i+1l))i[2,n1]\displaystyle=GA_{s}(u^{\ast}(z_{i-1}^{l},s_{i+1}^{l}))=GA_{s}(u^{\ast}(s_{1:i+1}^{l}))\;\;\forall i\in[2,n-1] (42)

    Then place nlnl constraints to 𝒦\mathscr{K} that will enforce GAGA between {k1l1,k(n1)(l1)l1}\{k_{1}^{l-1},\ldots k_{(n-1)(l-1)}^{l-1}\} (the carry ins from the previous layer) and zn1z_{n-1} such that for any assignment uu^{\ast}, uu^{\ast} is valid if and only if:

    u(kil)\displaystyle u^{\ast}(k_{i}^{l}) =GAk(u(zi1l,kinl1))=GAk(GAs(u(s1:nl,k1:inl1)))i[n,(n1)l]\displaystyle=GA_{k}(u^{\ast}(z_{i-1}^{l},k_{i-n}^{l-1}))=GA_{k}(GA_{s}(u^{\ast}(s_{1:n}^{l},k_{1:i-n}^{l-1})))\;\;\forall i\in[n,(n-1)l] (43)
    u(zil)\displaystyle u^{\ast}(z_{i}^{l}) =GAs(u(zi1l,kinl1))=GAs(u(s1:nl,k1:inl1))i[n,(n1)l]\displaystyle=GA_{s}(u^{\ast}(z_{i-1}^{l},k_{i-n}^{l-1}))=GA_{s}(u^{\ast}(s_{1:n}^{l},k_{1:i-n}^{l-1}))\;\;\forall i\in[n,(n-1)l] (44)
  • 3.

    Let l=l+1l=l+1. If lml\leq m, then Go to Step 2.

  • 4.

    At the last run of step 2., we had (n1)m(n-1)m total carry bits. Now we add layers feeding carries forward like before, but without introducing any new bits from the actual integers. As such, in each layer, we will have one less carry bit generated than the layer before it.

  • 5.

    Let r=1r=1

  • 6.

    Generate (n1)mr(n-1)m-r carry bits {k1r+m,,k(n1)mrr+m}\{k_{1}^{r+m},\ldots,k_{(n-1)m-r}^{r+m}\} and append them to 𝒜\mathscr{A} as well as (n1)mr(n-1)m-r sum bits (z1r+m,,z(n1)mrr+mz_{1}^{r+m},\ldots,z_{(n-1)m-r}^{r+m}) and append them to 𝒜\mathscr{A}. Add (n1)mr(n-1)m-r constraints to 𝒦\mathscr{K} that will enforce GA on the carry bits of the previous layer. For the first layer:

    u(k1m+1)\displaystyle u^{\ast}(k_{1}^{m+1}) =GAk(u(k1m,k2m)))\displaystyle=GA_{k}(u^{\ast}(k_{1}^{m},k_{2}^{m}))) (45)
    u(z1m+1)\displaystyle u^{\ast}(z_{1}^{m+1}) =GAs(u(k1m,k2m)))\displaystyle=GA_{s}(u^{\ast}(k_{1}^{m},k_{2}^{m}))) (46)
    u(kim+1)\displaystyle u^{\ast}(k_{i}^{m+1}) =GAk(u(zim+1,ki+1m))i[2,m(n1)1]\displaystyle=GA_{k}(u^{\ast}(z_{i}^{m+1},k_{i+1}^{m}))\;\;\forall i\in[2,m(n-1)-1] (47)
    u(zim+1)\displaystyle u^{\ast}(z_{i}^{m+1}) =GAk(u(zim+1,ki+1m))i[2,m(n1)1]\displaystyle=GA_{k}(u^{\ast}(z_{i}^{m+1},k_{i+1}^{m}))\;\;\forall i\in[2,m(n-1)-1] (48)

    For all the subsequent layers:

    u(k1m+r)\displaystyle u^{\ast}(k_{1}^{m+r}) =GAk(u(k1m+r1,k2m+r1)))\displaystyle=GA_{k}(u^{\ast}(k_{1}^{m+r-1},k_{2}^{m+r-1}))) (49)
    u(z1m+r)\displaystyle u^{\ast}(z_{1}^{m+r}) =GAs(u(k1m+r1,k2m+r1)))\displaystyle=GA_{s}(u^{\ast}(k_{1}^{m+r-1},k_{2}^{m+r-1}))) (50)
    u(kim+r)\displaystyle u^{\ast}(k_{i}^{m+r}) =GAk(u(zim+r,ki+1m+r1))=GAk(GAs(u(k1:i+1m+r1)))i[2,m(n1)r]\displaystyle=GA_{k}(u^{\ast}(z_{i}^{m+r},k_{i+1}^{m+r-1}))=GA_{k}(GA_{s}(u^{\ast}(k_{1:i+1}^{m+r-1})))\;\;\forall i\in[2,m(n-1)-r] (51)
    u(zim+r)\displaystyle u^{\ast}(z_{i}^{m+r}) =GAs(u(zim+r,ki+1m+r1))=GAs(u(k1:i+1m+r1))i[2,m(n1)r]\displaystyle=GA_{s}(u^{\ast}(z_{i}^{m+r},k_{i+1}^{m+r-1}))=GA_{s}(u^{\ast}(k_{1:i+1}^{m+r-1}))\;\;\forall i\in[2,m(n-1)-r] (52)
  • 7.

    Let r=r+1r=r+1. If rm(n1)r\leq m(n-1), go to Step 6.

  • 8.

    Lastly add constraints to force the last sum bit in each row to be zero, those constraints simply are {z(n1)ll}\{z_{(n-1)l}^{l}\} for l{1,,m}l\in\{1,\ldots,m\} and {zm(n1)rm+r}\{z_{m(n-1)-r}^{m+r}\} for r{1,,m(n1)}r\in\{1,\ldots,m(n-1)\} (check Fig. 3). We also add {k1m(n1)}\{k_{1}^{m(n-1)}\}.

Theorem A.1.

Suppose there exists uu such that i=1nuisi=0\sum_{i=1}^{n}u_{i}s_{i}=0, then and only then does there exist uu^{\ast} such that u(zendl)=u(k1mn)=0u^{\ast}(z_{end}^{l})=u^{\ast}(k_{1}^{mn})=0 (where zendlz_{end}^{l} refers to the last sum bit in each row as shown in 3). Then ES(u(S))=0ES𝒜(u(S𝒜))=0KMμ=0E_{S}(u(S))=0\Leftrightarrow E_{S\cup\mathscr{A}}(u^{\ast}(S\cup\mathscr{A}))=0\Leftrightarrow K^{M}\,\vec{\mu^{\ast}}=0.

Proof.

We first consider the forward direction. First recognize that i=1nuisi=i=1nj=1muisij2j\sum_{i=1}^{n}u_{i}s_{i}=\sum_{i=1}^{n}\sum_{j=1}^{m}u_{i}s_{i}^{j}2^{j}. It must be that i=1nuisi1mod2=0\sum_{i=1}^{n}u_{i}s_{i}^{1}\mod 2=0. Then i=1nuisi1=σ1{,4,2,0,2,4,}\sum_{i=1}^{n}u_{i}s_{i}^{1}=\sigma^{1}\in\{\ldots,-4,-2,0,2,4,\ldots\}. Note that if inputs aa and bb have different signs for the generalized adder, the carry and sum bits are both zero, if aa and bb are the same sign then they pass a carry. When one is zero, then the other one is simply passed on using the primary operation of GAkGA_{k} and GAsGA_{s}. In the forward direction of the proof, we only need to consider the primary operations. As such, it is clear that u(zn11)=0u^{\ast}(z_{n-1}^{1})=0 since the number of positive and negative inputs added is zero modulo 2. It should also be straight forward to see that i=1n1u(ki1)=σ12\sum_{i=1}^{n-1}u^{\ast}(k_{i}^{1})=\frac{\sigma^{1}}{2}. Now recognize that (i=1nj=1luisij)/2l=σl{,4,2,0,2,4,}\left(\sum_{i=1}^{n}\sum_{j=1}^{l}u_{i}s_{i}^{j}\right)/2^{l}=\sigma^{l}\in\{\ldots,-4,-2,0,2,4,\ldots\}. Note that σl=σl12+i=1nuisil\sigma^{l}=\frac{\sigma^{l-1}}{2}+\sum_{i=1}^{n}u_{i}s_{i}^{l} where we can identify σl12=i=1f[l1]u(kil1)\frac{\sigma^{l-1}}{2}=\sum_{i=1}^{f[l-1]}u^{\ast}(k_{i}^{l-1}), with f[x]=Θ(mx)x(n1)+Θ(xm)(m(n1)x)f[x]=\Theta(m-x)x(n-1)+\Theta(x-m)(m(n-1)-x) for all ii. Here f[x]f[x] has a Heaviside step function to differentiate between the indexing of rows generated by Step 2 of the protocol versus those generated later by Step 6. Again it is clear that u(zf(l)l)=0u^{\ast}(z_{f(l)}^{l})=0 since the number of positive inputs and negative inputs of u(s1:nl,k1:f(l1)l1)u^{\ast}(s_{1:n}^{l},k_{1:f(l-1)}^{l-1}) is zero modulo 2. Since i=1n|si|<n2m\sum_{i=1}^{n}|s_{i}|<n2^{m}, we must only worry at most about mlog(n)m\log(n) rows, but we have mnmn rows as zero for uu^{\ast}.

We now consider the backward direction. The proof will look very similar to the forward direction, but now we also have to give some consideration that uu^{\ast} could make use of secondary operations, not just primary operations. Consider in a specific row, we used the secondary operations, e.g. GA~k(1,0)=1\tilde{GA}_{k}(1,0)=1 and GA~s(1,0)=1\tilde{GA}_{s}(1,0)=-1. Here we used the tilde to alert the reader that these are the secondary operations specifically. We know that u(zendl)=0u^{\ast}(z_{end}^{l})=0 for any layer ll as the assumption, and so the number of GA~\tilde{GA} operations is even. It must be of opposite kinds such that the number of total carries is unchanged (since they are still valid operations such that 2c+s=a+b2\,c+s=a+b) - for every operation that propagrates an extra carry at the expense of reducing its sum bit there must be a secondary operation that reduces its carry bit to surplus its sum bit. If not, then u(zendl)0u^{\ast}(z_{end}^{l})\neq 0. Then we can replace them with the primary operations. The rest of the arguments follow through as before. We have u(zn1l)=0u^{\ast}(z_{n-1}^{l})=0 and since i=1nu(si1)=i=1n12×u(ki1)+u(zn11)\sum_{i=1}^{n}u^{\ast}(s_{i}^{1})=\sum_{i=1}^{n-1}2\times u^{\ast}(k_{i}^{1})+u^{\ast}(z_{n-1}^{1}) with u(zn11)=0u^{\ast}(z_{n-1}^{1})=0, we have σ1=i=1n1u(ki1)\sigma^{1}=\sum_{i=1}^{n-1}u^{\ast}(k_{i}^{1}). Again σl+u(zendl)=σl12+i=1nu(sil)\sigma^{l}+u^{\ast}(z_{end}^{l})=\frac{\sigma^{l-1}}{2}+\sum_{i=1}^{n}u^{\ast}(s_{i}^{l}) and we know that u(zendl)=0u^{\ast}(z_{end}^{l})=0. By the same bound, we know that after mnmn rows having zero on all the outputs is sufficient to see that i=1nj=1mu(sij)=0\sum_{i=1}^{n}\sum_{j=1}^{m}u^{\ast}(s_{i}^{j})=0 and so let u(si)=u(si)u(s_{i})=u^{\ast}(s_{i}) for every siSs_{i}\in S. ∎

Given an input integer set SS, this protocol outputs constraint set 𝒦={K1,,KS𝒜}\mathscr{K}=\{K_{1},\ldots,K_{S\cup\mathscr{A}}\} (the variables with indices such that the entry is nonzero in KMK^{M}) such that an assignment vector μ\vec{\mu^{\ast}} has value zero for every constraint in the set if and only if these exists a valid assignment for SS that defines two disjoint nonempty sets AA and BB such that aAabBb=0\sum_{a\in A}a-\sum_{b\in B}b=0. We can then identify the constraint operators as the row vectors of KMK^{M} as coefficients on spin-z operators on each qubit: K^i=j|S𝒜|kijmσjz\hat{K}_{i}=\sum_{j}^{|S\cup\mathscr{A}|}k_{ij}^{m}\sigma_{j}^{z}, such that our solver for 0-1-LP-QCOMMUTE finds a Hermitian matrix that commutes with these constraint operators.

A.5 Proof of Runtime

In the worse case, we construct no more than 55 new variables and 66 constraints for each GAGA illustrated in Fig. 3. For row i<m+1i<m+1, this leads to no more than 5(n1)i5\,(n-1)\,i new variables and 6n(n1)i6\,n\,(n-1)\,i constraints. Then after row mm, we have no more than 5(n1)m25\,(n-1)\,m^{2} variables and 6(n1)m26\,(n-1)\,m^{2} constraints. Row i>mi>m has no more than mnim\,n-i generalized adders, creating no more than 5(mni)5\,(m\,n-i) new variables and 6(mni)6\,(m\,n-i) constraints. In total, we have no more than 𝒪(m2n2)\mathscr{O}\left(m^{2}n^{2}\right) variables and 𝒪(m2n2)\mathscr{O}\left(m^{2}n^{2}\right) constraints. The constraint matrix therefore has size 𝒪(m2n2)×𝒪(m2n2)\mathscr{O}\left(m^{2}n^{2}\right)\times\mathscr{O}\left(m^{2}n^{2}\right). The reduction is therefore a polynomial time algorithm.

A.6 Reducing a Solution of ILP-COMMUTE to a Solution of EQUAL SUBSET SUM

We consider the same set up as in Section V. Using the protocol from Section A (check Fig. 1) we can reduce any instance of the EQUAL SUBSET SUM problem with polynomial overhead, and if any solution to 0-1-LP-QCOMMUTE exists, there must be vv and ww (and therefore the sets AA and BB) to describe at least one off-diagonal term in the spin-z basis. By our construction, the ancilla bits used for forcing are the bits beyond the n-th bit. Similarly, if a solution to EQUAL SUBSET SUM exists, by selecting the values of vv and ww to match the indices of chosen elements for the sets AA and BB, we are able to set the values of the first nn bits and then propagate their value through the general adder to find vv^{\prime} and ww^{\prime} over the enlarged space. Then H=i=1|S𝒜|(σ+)vi(σ)wi+i=1|S𝒜|(σ)vi(σ+)wiH=\bigotimes_{i=1}^{|S\bigcup\mathcal{A}|}\left(\sigma^{+}\right)^{v_{i}^{\prime}}\left(\sigma^{-}\right)^{w_{i}^{\prime}}+\bigotimes_{i=1}^{|S\bigcup\mathcal{A}|}\left(\sigma^{-}\right)^{v_{i}^{\prime}}\left(\sigma^{+}\right)^{w_{i}^{\prime}} solves 0-1-LP-QCOMMUTE. This leads to the following Theorem:

Theorem A.2.

0-1-LP-QCOMMUTE is NP-Hard.

Through the same proof that ILP-QCOMMUTE is polynomial verifiable, 0-1-LP-QCOMMUTE is likewise polynomial verifiable.

Theorem A.3.

0-1-LP-QCOMMUTE is NP-Complete.

It also leads to an important corollary:

Corollary A.3.1.

{1,0,1}\{-1,0,1\}-LP-QCOMMUTE is NP-Complete.

As well as another proof to the result in Section V:

Corollary A.3.2.

ILP-QCOMMUTE is NP-Complete.

Appendix B Proof of the Matrix Implementation of the Generalized Adder

Given inputs aa and bb, we define the matrix on a,b,s,c,x1,x2,x3a,b,s,c,x_{1},x_{2},x_{3} - with x1,x2,x3x_{1},x_{2},x_{3} being intermediating ancillas - as:

GAM=abx1x2x3cs\ldelim(60.5emab11100\rdelim)60.5em00101110001111001001000010100000101\displaystyle GA^{M}=\;\begin{array}[]{c c c c c c c c c}&a&b&x_{1}&x_{2}&x_{3}&c&s&\\ \ldelim({6}{0.5em}&a&b&1&1&1&0&0&\rdelim){6}{0.5em}\\ &0&0&1&0&1&1&1&\\ &0&0&0&1&1&1&1&\\ &0&0&1&0&0&1&0&\\ &0&0&0&1&0&1&0&\\ &0&0&0&0&1&0&1&\end{array} (60)

As constraints, we can write it as:

GA1(a,b,x1,x2,x3)\displaystyle GA_{1}(a,b,x_{1},x_{2},x_{3}) =0,\displaystyle=0, (61)
GA2(x1,x3,s,c)\displaystyle GA_{2}(x_{1},x_{3},s,c) =0,\displaystyle=0, (62)
GA3(x2,x3,s,c)\displaystyle GA_{3}(x_{2},x_{3},s,c) =0,\displaystyle=0, (63)
GA4(x1,c)\displaystyle GA_{4}(x_{1},c) =0,\displaystyle=0, (64)
GA5(x2,c)\displaystyle GA_{5}(x_{2},c) =0,\displaystyle=0, (65)
GA6(x3,s)\displaystyle GA_{6}(x_{3},s) =0.\displaystyle=0. (66)

For every generalized adder in Fig. 3 (as described in the protocol we gave in Section A.1), we have a submatrix over the corresponding variables. We give a simple case by case proof that GAMGA^{M} enforces uu^{\ast} to be valid if and only if its entries satisfy 2u(c)+u(s)=u(a)+u(b)2\,u^{\ast}(c)+u^{\ast}(s)=u^{\ast}(a)+u^{\ast}(b) as seen in Fig. 1.

A constraint is satisfied if and only if the assignment uu^{\ast} over the variables of that constraint sums to zero. Then an assignment satisfies all of them if u(GAi)=0u^{\ast}(GA_{i})=0 for all i[1,6]i\in[1,6]. Although checkable through brute force calculations, we give simple arguments for emulation of bit addition step by step:

If u(a)=u(b)=1u^{\ast}(a)=u^{\ast}(b)=1, then and only then do we have u(c)=1u^{\ast}(c)=1 and u(s)=0u^{\ast}(s)=0. If u(a)=1u^{\ast}(a)=1 and u(b)=1u^{\ast}(b)=1, then two of the auxillary bits must have an assignment of -1 and one must not. If u(x1)=1u^{\ast}(x_{1})=-1 then u(c)=1u^{\ast}(c)=1 by GA4GA_{4}, but then u(x2)=1u^{\ast}(x_{2})=-1 by GA5GA_{5} and vice versa. Then u(x3)=0u^{\ast}(x_{3})=0, otherwise GA1GA_{1} cannot be satisfied. Then u(s)=0u^{\ast}(s)=0 as wanted. Suppose that u(s)=0u^{\ast}(s)=0 and u(c)=1u^{\ast}(c)=1, then likewise GA4GA_{4} and GA3GA_{3} force that u(x1)=u(x2)=1u^{\ast}(x_{1})=u^{\ast}(x_{2})=-1. Then from GA2GA_{2}, we have that u(x3)=0u^{\ast}(x_{3})=0 and so from GA1GA_{1} that u(a)=u(b)=1u^{\ast}(a)=u^{\ast}(b)=1.

If u(a)=1u^{\ast}(a)=1 and u(b)=0u^{\ast}(b)=0 or u(a)=0u^{\ast}(a)=0 and u(b)=1u^{\ast}(b)=1, then and only then do we have u(c)=0u^{\ast}(c)=0 and u(s)=1u^{\ast}(s)=1 or u(c)=1u^{\ast}(c)=1 and u(s)=1u^{\ast}(s)=-1. Suppose that u(a)=1u^{\ast}(a)=1 or u(b)=1u^{\ast}(b)=1, but not both. From GA1GA_{1}, we know that either one of the auxillary bits must take value -1 or two take the value -1 and one takes the value 1. If either x1x_{1} or x2x_{2} take value -1, but not the other then GA4GA_{4} and GA5GA_{5} lead to a contradiction, then if x3=1x_{3}=1 and by GA6GA_{6} it must be that s=1s=-1. Otherwise x1=x2=0x_{1}=x_{2}=0 and so u(x3)=1u^{\ast}(x_{3})=-1 by GA2GA_{2} and GA3GA_{3}. GA6GA_{6} forces that u(s)=1u^{\ast}(s)=1. Suppose that u(c)=0u^{\ast}(c)=0 and u(s)=1u^{\ast}(s)=1. Then u(x3)=1u^{\ast}(x_{3})=-1 from GA6GA_{6} and u(x1)=u(x2)=0u^{\ast}(x_{1})=u^{\ast}(x_{2})=0 from GA4GA_{4} and GA5GA_{5}. Then GA1GA_{1} is only satisfied if u(a)=1u^{\ast}(a)=1 or u(b)=1u^{\ast}(b)=1, but not both. Suppose instead that u(c)=1u^{\ast}(c)=1 and u(s)=1u^{\ast}(s)=-1. Then by GA6GA_{6} it must be that x3=1x_{3}=1. By GA5GA_{5} and GA4GA_{4}, it must be that x1=1x_{1}=-1 and x2=1x_{2}=-1. Then by GA1GA_{1} it must be that u(a)u^{\ast}(a) or u(b)u^{\ast}(b) is 1, but not both.

If u(a)+u(b)=0u^{\ast}(a)+u^{\ast}(b)=0, then and only then do we have u(c)=0u^{\ast}(c)=0 and u(s)=0u^{\ast}(s)=0. Suppose that u(a)+u(b)=0u^{\ast}(a)+u^{\ast}(b)=0. From GA1GA_{1}, we know that at most two auxillary bits are non-zero and they have opposite sign. From GA4GA_{4} and GA5GA_{5} if one of the first two auxillary bits is non-zero then so is the other one, but they must have the same sign. As such GA1GA_{1} can only be satisfied with u(x1)=u(x2)=u(x3)=0u^{\ast}(x_{1})=u^{\ast}(x_{2})=u^{\ast}(x_{3})=0. Then it follows that u(c)=u(s)=0u^{\ast}(c)=u^{\ast}(s)=0. Suppose that u(c)=u(s)=0u^{\ast}(c)=u^{\ast}(s)=0. From GA4GA_{4}, GA5GA_{5}, and GA6GA_{6}, we have that u(x1)=u(x2)=u(x3)=0u^{\ast}(x_{1})=u^{\ast}(x_{2})=u^{\ast}(x_{3})=0. Then GA1GA_{1} can only be satisfied if u(a)+u(b)=0u^{\ast}(a)+u^{\ast}(b)=0.

The same logic works if we swap the values 11 and 1-1 everywhere in the above proof.