# From the Quantum Approximate Optimization Algorithm to a Quantum Alternating Operator Ansatz

^{1}

^{2}

^{3}

^{4}

^{5}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Background

#### The Original Quantum Approximate Optimization Algorithm

- The phase Hamiltonian ${H}_{\mathrm{P}}$ encodes the cost function f to be optimized, i.e., acts diagonally on n-qubit computational basis states as:$${H}_{\mathrm{P}}|\mathbf{y}\rangle =f(\mathbf{y})|\mathbf{y}\rangle .$$
- The mixing Hamiltonian ${H}_{\mathrm{M}}$ is the transverse field Hamiltonian:$${H}_{\mathrm{M}}=\sum _{j=1}^{n}{X}_{j},$$
- The initial state is selected to be the equal superposition state of all possible solutions:$$|s\rangle =\frac{1}{\sqrt{{2}^{n}}}\sum _{x}|x\rangle \phantom{\rule{0.277778em}{0ex}},$$
- A parameterized quantum state is created by alternately applying Hamiltonians ${H}_{\mathrm{P}}$ and ${H}_{\mathrm{M}}$ for p rounds, where the duration in round j is specified by the parameters ${\gamma}_{j}$ and ${\beta}_{j}$, respectively:$$|\mathit{\beta},\gamma \rangle ={e}^{-i{\beta}_{p}{H}_{\mathrm{M}}}{e}^{-i{\gamma}_{p}{H}_{\mathrm{P}}}\dots {e}^{-i{\beta}_{2}{H}_{\mathrm{M}}}{e}^{-i{\gamma}_{2}{H}_{\mathrm{P}}}{e}^{-i{\beta}_{1}{H}_{\mathrm{M}}}{e}^{-i{\gamma}_{1}{H}_{\mathrm{P}}}|s\rangle .$$
- A computational basis measurement is performed on the state, which returns a candidate solution $\mathbf{y}$ with probability ${\left|\langle \mathbf{y}||\mathit{\beta},\gamma \rangle \right|}^{2}.$ Repeating the above state preparation and measurement, the expected value of the cost function over the returned solution samples is given by:$$\langle f\rangle =\langle \mathit{\beta},\gamma |{H}_{\mathrm{P}}|\mathit{\beta},\gamma \rangle ,$$
- The above steps may then be repeated altogether, with updated sets of time parameters, as part of a classical optimization loop (such as gradient descent or other approaches) used to optimize the algorithm parameters with respect to an objective such as $\langle f\rangle $.
- The best problem solution found overall is returned.

## 3. The Quantum Alternating Operator Ansatz (QAOA)

- A family of phase-separation operators ${U}_{\mathrm{P}}(\gamma )$ that depends on the objective function f, and;
- A family of mixing operators ${U}_{\mathrm{M}}(\beta )$ that depends on the domain and its structure,

#### 3.1. Design Criteria

**Initial state.**We require that the initial state $|s\rangle $ be trivial to implement, by which we mean that it can be created by a constant-depth (in the size of the problem) quantum circuit from the $|0\dots 0\rangle $ state. Here, we often take as our initial state a single feasible solution, usually implementable by a depth-1 circuit consisting of single-qubit bit-flip operations X. Because in such a case the initial phase operator only applies a global phase, we may want to consider the algorithm as starting with a single-mixing operator ${U}_{\mathrm{M}}({\beta}_{0})$ to the initial state as a first step. In the quantum approximate optimization algorithm, the standard starting state $|+\dots +\rangle $ is obtained by a depth-1 circuit that applies a Hadamard H gate to each of the qubits in the $|0\dots 0\rangle $ state.

**Phase-separation unitaries.**We require the family of phase-separation operators to be diagonal in the computational basis. In almost all cases, we take ${U}_{\mathrm{P}}(\gamma )={e}^{-i\gamma {H}_{f}}$, where f is the objective function.

**Mixing unitaries (or “mixers”).**We require the family of mixing operators ${U}_{\mathrm{M}}(\beta )$ to:

- Preserve the feasible subspace: For all values of the parameter $\beta $, the resulting unitary takes feasible states to feasible states, and;
- Provide transitions between all pairs of states corresponding to feasible points. More concretely, for any pair of feasible computational-basis states $\mathbf{x},\mathbf{y}\in F$, there is some parameter value ${\beta}^{\ast}$ and some positive integer r such that the corresponding mixer connects those two states: $\left|\u2329\mathbf{x}\phantom{\rule{0.166667em}{0ex}}|\phantom{\rule{0.166667em}{0ex}}{U}_{\mathrm{M}}^{r}({\beta}^{\ast})\phantom{\rule{0.166667em}{0ex}}|\phantom{\rule{0.166667em}{0ex}}\mathbf{y}\u232a\right|>0$.

## 4. QAOA Mappings: Strings

#### 4.1. Example: Max-$\kappa $-ColorableSubgraph

**Problem.**Given a graph $G=(V,E)$ with n vertices and m edges, and $\kappa $ colors, maximize the size (number of edges) of a properly vertex-$\kappa $-colorable subgraph.

#### 4.1.1. Single Qudit Mixing Operators

**r-nearby-values single-qudit mixer.**Let ${U}_{r-\mathrm{NV}}(\beta )={e}^{-i\beta {H}_{r-\mathrm{NV}}}$, where ${H}_{r-\mathrm{NV}}={\sum}_{i=1}^{r}\left({\stackrel{\u02d8}{X}}^{i}+{({\stackrel{\u02d8}{X}}^{\u2020})}^{i}\right)$, which acts on a single qudit, with $\stackrel{\u02d8}{X}={\sum}_{a=0}^{d-1}|a+1\rangle \langle a|$. We identified two special cases by name: The “single-qudit ring mixer” for $r=1$, ${H}_{\mathrm{ring}}={H}_{1-\mathrm{NV}}$ and the “fully-connected” mixer for $r=d-1$, ${H}_{\mathrm{FC}}={H}_{(d-1)-\mathrm{NV}}$. Whenever we introduced a Hamiltonian, we also implicitly introduced its corresponding family of unitaries, as with ${H}_{r-\mathrm{NV}}$ and ${U}_{r-\mathrm{NV}}(\beta )$.

**Parity single-qudit ring mixer.**Still in the one-hot encoding, we partitioned the d terms ${e}^{-i\beta \left({X}_{a}{X}_{a+1}+{Y}_{a}{Y}_{a+1}\right)}$ by the parity of their indices. Let:

**Repeated parity single-qudit ring mixers.**As we mentioned above, a single application of ${U}_{\mathrm{parity}}(\beta )$ will have nonzero transition amplitudes only between pairs of colors with indices no more than two apart, which suggests that it may be useful to repeat the parity mixer within one mixing step.

**Partition single-qudit ring mixers.**We now generalize the above construction for the parity single-qudit ring mixer to more general partition mixers. For a given ordered partition $\mathcal{P}=({P}_{1},\dots ,{P}_{p})$ of the terms of ${H}_{r-\mathrm{NV}}$ such that all pairs of terms within a ${P}_{i}$ act on disjoint states of the qudit, let:

**Binary single-qudit mixer for $d={2}^{l}$.**We now return briefly to the binary encoding, and describe a different single-qudit mixer. An alternative to the r-nearby values single-qudit mixer, which is easily implementable using the binary encoding when $d={2}^{l}$ is a power of two, is the “simple binary” single-qudit mixer:

#### 4.1.2. Full QAOA Mapping

**Mixing operator.**We used as the full mixer a parity ring mixer made up of parity single-qudit ring mixers, one for each of the qudits corresponding to each vertex:

**Phase-separation operator.**The objective function can be written in classical one-hot encoding as:

**Initial state.**Any encoded coloring can be generated by a depth-1 circuit of at most n single-qubit X gates. A reasonable initial state is one in which all vertices are assigned the same color. Alternatively, we could start with any other feasible state, or the initial state could be obtained by applying one or more rounds of the mixer to a single feasible state, so that the algorithm begins with a superposition of feasible states.

#### 4.2. Example: MaxIndependentSet

**Problem.**Given a graph $G=(V,E)$, with $\left|V\right|=n$ and $\left|E\right|=m$, find the largest subset ${V}^{\prime}\subset V$ of mutually non-adjacent vertices.

#### 4.2.1. Partial Mixing Operator at Each Vertex

#### 4.2.2. Full QAOA Mapping

**Mixing operators.**Let ${H}_{\mathrm{CX}}={\sum}_{i=1}^{n}{H}_{\mathrm{CX},{v}_{i}}$. We defined two distinct types of mixers:

- The simultaneous controlled-X mixer, ${U}_{\mathrm{sim}-\mathrm{CX}}(\beta )={e}^{-i\beta {H}_{\mathrm{CX}}}$, and;
- A class of partitioned controlled-$X(\beta )$ mixers, ${U}_{\mathcal{P}-\mathrm{CX}}(\beta )={\prod}_{i=1}^{\left|\mathcal{P}\right|}{\prod}_{v\in {P}_{i}}{U}_{\mathrm{CX},v}$,

**Phase-separation operator.**The objective function is the size of the independent set, or $f(\mathbf{x})={\sum}_{i=1}^{n}{x}_{i}$, which we could translate into a phase-separating Hamiltonian via substitution of $(I-Z)/2$ for each binary variable. Instead, we used affine transformation of the objective function $g(\mathbf{x})=n-2f(\mathbf{x})$, which, when translated, yields a phase separation operator of a simpler form:

**Initial state.**A reasonable initial state is the trivial state $|s\rangle ={|0\rangle}^{\otimes n}$ corresponding to the empty set.

#### 4.3. Example: MaxColorableInducedSubgraph

**Problem.**Given $\kappa $ colors, and a graph $G=(V,E)$ with n vertices and m edges, find the largest induced subgraph that can be properly $\kappa $-colored.

#### 4.3.1. Controlled Null-Swap Mixer at a Vertex

#### 4.3.2. Full QAOA Mapping

**Mixing operators.**Define:

- The simultaneous controlled null-swap mixer, ${U}_{\mathrm{sim}-\mathrm{NS}}(\beta )={e}^{-i\beta {H}_{\mathrm{NS}}}$, and;
- A family of partitioned controlled null-swap mixers, ${U}_{\mathcal{P}-\mathrm{NS}}(\beta )={\prod}_{a=1}^{\kappa}{\prod}_{i=1}^{\left|\mathcal{P}\right|}{\prod}_{v\in {P}_{i}}{U}_{\mathrm{NS},v,a}$.

**Phase-separation operator.**We can translate the objective function to a Hamiltonian as usual, or translate a linear modification of the objective function to obtain a simpler form. The phase separator function $g(\mathbf{x})=n-2f(\mathbf{x})$ yields the simple phase separator Hamiltonian:

**Initial state.**A reasonable initial state is $|s\rangle ={\left(|1\rangle \otimes {|0\rangle}^{\otimes \kappa}\right)}^{\otimes n}$, corresponding to all vertices uncolored.

#### 4.4. Example: MinGraphColoring

**Problem.**Given a graph $G=(V,E)$, find the minimal number of colors ${k}^{\ast}$ required to properly color it.

#### 4.4.1. Partial Mixer at a Vertex

#### 4.4.2. Full QAOA Mapping

**Mixing Operator.**Let:

- The simultaneous controlled-swap mixer:$${U}_{\mathrm{sim}-\mathrm{NS}}(\beta )={e}^{-i\beta {H}_{\mathrm{CS}}},\phantom{\rule{4.pt}{0ex}}\mathrm{and};$$
- A family of partitioned controlled-swap mixers:$${U}_{\mathcal{P}-\mathrm{NS}}(\beta )=\prod _{a,b}\prod _{i=1}^{\left|\mathcal{P}\right|}\prod _{v\in {P}_{i}}{U}_{\mathrm{CS},v,\{a,b\}}(\beta )\phantom{\rule{0.277778em}{0ex}}.$$

**Phase-separation operator.**The objective function, $f:{\left[\kappa \right]}^{n}\to {\mathit{Z}}_{+}$, is:

**Initial state.**For the initial state, we used an easily found ${D}_{G}+1$ (or ${D}_{G}+2$) coloring.

#### 4.4.3. Compilation in One-Hot Encoding

**Mixer.**In the one-hot encoding, the controlled-swap mixing Hamiltonian can be written as:

**Phase separator.**Let ${U}_{\mathrm{P},a}(\gamma )={e}^{-i\gamma {H}_{\mathsf{NONE}(\mathbf{x},a)}}$, so that the phase separator Equation (40) can be written as ${U}_{\mathrm{P}}(\gamma )={\prod}_{a=1}^{\kappa}a{U}_{\mathrm{P}}{U}_{\mathrm{P},a}(\gamma )$. Each partial phase separator can alternatively be written as:

**Initial state.**Any coloring can be prepared in depth 1 using n single-qubit X gates:

## 5. QAOA Mappings: Orderings and Schedules

#### 5.1. Example: Traveling Salesperson Problem (TSP)

**Problem.**Given a set of n cities, and distances $d:{\left[n\right]}^{2}\to {\mathbb{R}}_{+}$, find an ordering of the cities that minimizes the total distance traveled for the corresponding tour. A tour visits each city exactly once and returns from the last city to the first. Note that we defined $\left[n\right]=\{1,2,\dots ,n\}$ and $[0,n]=\{0,1,\dots ,n\}$.

#### 5.1.1. Mapping

**Ordering swap partial mixing Hamiltonians.**Our mixers for orderings will be built from partial mixer Hamiltonians we call “value-selective ordering swap mixing Hamiltonians.” Consider $\{{\iota}_{i},{\iota}_{j}\}=\{u,v\}$, indicating that city u (resp. v) is visited at the ith (resp. jth) stop on the tour, or vice versa. There are ${\left(\genfrac{}{}{0pt}{}{n}{2}\right)}^{2}$ value-selective ordering swap mixing Hamiltonians, ${H}_{\mathrm{PS},\{i,j\},\{u,v\}}$, which swap the ith and jth elements in the ordering if and only if those elements are the cities u and v:

**Simultaneous ordering swap mixer.**Defining ${H}_{\mathrm{PS}}={\sum}_{i=1}^{n}{H}_{\mathrm{PS},i}$, we have the “simultaneous ordering swap mixer”:

**Color-parity ordering swap mixer.**Simultaneous ordering swap mixer. To define the ordered partition, we first defined an ordered partition on the set of adjacent partial mixers ${U}_{\mathrm{PS},i,\{u,v\}}$ for a fixed tour position i, where the parts of this partition contains mutually commuting partial mixers. We then partitioned the i to obtain a full ordered partition. Two partial mixers ${U}_{\mathrm{PS},i,\{u,v\}}$ and ${U}_{\mathrm{PS},i,\{{u}^{\prime},{v}^{\prime}\}}$ commute as long as $\{u,v\}\cap \{{u}^{\prime},{v}^{\prime}\}=\varnothing $. Partitioning the $\left(\genfrac{}{}{0pt}{}{n}{2}\right)$ pairs of cities into $\kappa $ parts such that each part contains only mutually disjoint pairs is equivalent to considering a $\kappa $-edge-coloring of the complete graph ${K}_{n}$ and assigning an ordering to the colors. For odd n, $\kappa =n$ suffices, and for even n, $\kappa =n-1$ suffices [40]. (Using the geometrical construction based on regular polygons, we can define the canonical partition by placing the vertices at the vertices of the polygon in order, with the last one in the center for even n; the parts of the partition are then ordered by their lowest element under the lexicographical ordering of the pairs of cities $\{u,v\}$.) Let ${\mathcal{P}}_{\mathrm{col}}=({P}_{1},\dots ,{P}_{c},\dots ,{P}_{\kappa})$ be the resulting ordered partition, which we call a “color partition” of the pairs of cities. For example, for $n=4$, the partition is ${\mathcal{P}}_{\mathrm{col}}=\left(\left\{\{1,2\},\{3,4\}\right\},\left\{\{1,3\},\{2,4\}\right\},\left\{\{1,4\},\{2,3\}\right\}\right)$. For different tour positions i, two partial unitaries ${U}_{\mathrm{PS},i,\{u,v\}}$ and ${U}_{\mathrm{PS},{i}^{\prime},\{{u}^{\prime},{v}^{\prime}\}}$ commute if i and ${i}^{\prime}$ are not consecutive ($|i-{i}^{\prime}\phantom{\rule{3.33333pt}{0ex}}mod\phantom{\rule{0.277778em}{0ex}}n|>1$). Thus, for partitioning the positions, we may use the parity partition ${\mathcal{P}}_{\mathrm{par}}$, as defined in Section 4.1. We can thus define the “color-parity” ordered partition ${\mathcal{P}}_{\mathrm{CP}}={\mathcal{P}}_{\mathrm{col}}\times {\mathcal{P}}_{\mathrm{par}}$, with the induced lexicographical ordering of the parts. The part ${P}_{c,\mathrm{odd}}$ contains all ${U}_{\mathrm{PS},i,\{u,v\}}$ such that i is odd and edge $\{u,v\}$ is colored c, i.e., in ${P}_{c}$, and defines the unitary:

#### 5.1.2. Compilation

**Encoding orderings.**We encoded orderings in two stages: First into strings, and then into bits making use of the encodings from Section 4. Here, we focus on a “direct encoding” as opposed to the “absolute encoding” that is introduced in Section 5.3. Other encodings of orderings are possible, such as the Lehmer code and inversion tables. In direct encoding, an ordering $\mathit{\iota}=\left({\iota}_{1},\dots ,{\iota}_{n}\right)$ is encoded directly as a string ${\left[n\right]}^{n}$ of integers. Once in the form of strings, any of the string encodings introduced in Section 4 can be applied. We applied the one-hot encoding with ${n}^{2}$ binary variables; the binary variable ${x}_{j,u}$ indicates whether or not ${\iota}_{j}=u$ in the ordering, in other words, whether city u is visited at the j-th stop of the tour.

**Phase separator.**We used the phase function $g(\mathit{\iota})=4f(\mathit{\iota})-(n-2){\sum}_{u=1}^{n}{\sum}_{v=1}^{n}d(u,v)$, which translates to a phase separator encoded as:

**Mixer.**The individual value-selective ordering swap partial mixer, which swaps cities u, v between tour positions i and j, is expressed in the one-hot encoding as:

**Initial state.**The initial state, an arbitrary ordering, can be prepared from the zero state $|00\dots 0\rangle $ using at most n single-qubit X gates.

#### 5.2. Example: Single Machine Scheduling (SMS), Minimizing Total Squared Tardiness

**Problem**. $(1|{d}_{j}|\sum {w}_{j}{T}_{j}^{2}).$ Given a set of n jobs with processing times $\mathbf{p}$, deadlines $\mathbf{d}$, and weights $\mathbf{w}$, find a schedule minimizing the total weighted squared tardiness ${\sum}_{j=1}^{n}{w}_{j}{T}_{j}^{2}$. The tardiness of job j with completion time ${C}_{j}$ is defined as ${T}_{j}=max\{0,{C}_{j}-{d}_{j}\}$. Here, we took all quantities to be integers.

**Mixer and initial state.**We used the same initial state preparation, and the same mixer as in TSP for mixing the ordering, in addition to any of the single-qudit mixers from Section 4.1.1 for each of the slack variables. Because the ordering and slack mixers act on separate sets of qubits ($\mathbf{x}$ and $\mathbf{y}$), they can be implemented in parallel. Note that the only requirement for the upper bound of the range of the slack variable ${y}_{i}$ is that it be at least${d}_{i}-{p}_{i}+1$. In particular, it could be ${2}^{\lceil {log}_{2}({d}_{i}-{p}_{i}+1)\rceil}$, allowing us to use the binary encoding without modification.

#### 5.3. SMS, Minimizing Total Tardiness

**Problem**. $(1|{d}_{j}|\sum {w}_{j}{T}_{j})$. Given a set of jobs with integer processing times $\mathbf{p}$, deadlines $\mathbf{d}$, and weights $\mathbf{w}$, find a schedule minimizing the total weighted tardiness ${\sum}_{j=1}^{n}{w}_{j}{T}_{j}$.

#### 5.3.1. Encoding and Mixer

**Absolute and positional encodings.**In the “absolute” encoding of the ordering $\mathit{\iota}=({\iota}_{1},\dots ,{\iota}_{n})$, we assigned each item i a value ${s}_{i}\in [0,h]$, where the “horizon” h is a parameter of the encodings, such that for all $i<j$, ${s}_{{\iota}_{i}}<{s}_{{\iota}_{j}}$. In certain cases, there will be an item-specific horizon ${h}_{i}$ such that ${s}_{i}\in [0,{h}_{i}]$. Note that in general, the relationship between encoded states and the orderings they encode is not injective, but it will be in the domains to which we apply it. Once the ordering $\mathit{\iota}$ is encoded as a string $\mathbf{s}(\mathit{\iota})\in {\times}_{i=1}^{n}[0,{h}_{i}]$, the resulting string can be encoded using any of the string encodings previously introduced. We call the special case of the “absolute” encoding with $h=n$ the “positional” encoding; using the one-hot encoding of the resulting strings, the “direct” and “positional” encodings are the same.

**Time-swap mixer.**We now introduce a mixer that is specific to the absolute encoding in which there is a single horizon h and each job i has a processing time ${p}_{i}$. Let the horizon be $h={\sum}_{i=1}^{n}{p}_{i}$. Each job can start between time 0 and ${h}_{i}=h-{p}_{i}$. (Other optimizations may be made on an instance-specific basis, though we neglect elaborating on these for ease of exposition.) We used a “time-swap” partial mixer that acts on absolutely encoded orderings:

#### 5.3.2. Mapping and Compilation

**Phase separator.**The objective function is the weighted total tardiness:

**Mixer.**The partial time-swap mixer:

**Initial state.**We used an arbitrary ordering of the jobs as the initial state.

#### 5.4. SMS, with Release Dates

**Problem**. $(1|{d}_{j},{r}_{j}|\ast )$. Given a set of jobs with integer processing times $\mathbf{p}$, deadlines $\mathbf{d}$, release times $\mathbf{r}$, and weights $\mathbf{w}$, find a schedule that minimizes some function of the tardiness, such that each job starts no earlier than its release time.

#### 5.4.1. Partial Mixer: Controlled Null-Swap Mixer

#### 5.4.2. Encoding and Compilation

**Objective function.**As an example objective function, we again considered minimizing the weighted total tardiness, Equation (69). The one-hot encoded phase Hamiltonian takes the form of Equation (70), with ${b}_{j}$ included in the summation range of t:

**Initial state.**Any feasible schedule can be used as the initial state. In particular, we used a greedy earliest-release-date schedule. Assume without loss of generality that the jobs are ordered by their release times, i.e., ${r}_{1}\le {r}_{2}\le \cdots \le {r}_{n}$. Then set ${s}_{1}={r}_{1}$ and recursively set ${s}_{i}=max\{{r}_{i},{s}_{i-1}+{p}_{i-1}\}$, which is feasible though likely suboptimal.

#### 5.4.3. Mapping Variants

## 6. Conclusions

## Author Contributions

## Acknowledgments

## Conflicts of Interest

## Appendix A. Compendium of Mappings and Compilations

#### Appendix A.1. Bit-Flip (X) Mixers

**Variables:**n binary variables.

**Initial state:**${|0\rangle}^{\otimes n}$ or ${|+\rangle}^{\otimes n}$.

**Mixer:**The standard mixer ${U}_{\mathrm{M}}^{H}(\beta )={e}^{-i\beta B}$, where $B={\sum}_{j=1}^{m}{X}_{j}$, which can be implemented with depth 1. (Since all terms commute and act on separate qubits, we do not need to consider partitioned variants of the standard mixer.)

**Phase separator:**${U}_{\mathrm{P}}(\gamma )=exp[-i\gamma {H}_{\mathrm{P}}]$, where we specify ${H}_{\mathrm{P}}$ for each problem.

#### Appendix A.1.1. Maximum Cut

**Problem:**Given a graph $G=(V,E)$, find a subset $S\subset V$ such that the number of edges between S and $V\backslash S$ is the largest.

**Approximability:**APX-complete [51,52]. NP-hard to approximate better than $16/17$ [53]. Semidefinite programming achieves 0.8785 [54], which is optimal under the unique games conjecture [55]. On bounded degree graphs with ${D}_{G}\ge 3$, it can be approximated to within $0.8785+O({D}_{G})$ [56], in particular to 0.921 for ${D}_{G}=3$, but remains APX-complete [51].

**Configuration space, Domain, and Encoding:**${\{0,1\}}^{n}$, indicating whether each vertex is in S or not.

**Objective:**$max\left|\left\{\{u,v\}\in E:u\in S,v\notin S\right\}\right|$.

**Phase separator**: ${H}_{\mathrm{P}}={\sum}_{\{u,v\}\in E}{Z}_{u}{Z}_{v}$.

**Resource count for phase separator:**m gates with depth at most ${D}_{G}+1$.

**Variant:**Directed-MaxCut (Max-Directed-Cut), where we seek to maximize the number of the directed edges leaving S. The phase separator is replaced by ${H}_{\mathrm{P}}={\sum}_{(u,v)\in E}({Z}_{u}-{Z}_{v}+{Z}_{u}{Z}_{v})$.

#### Appendix A.1.2. Max-ℓ-SAT

**Problem:**Given m disjunctive clauses over n Boolean variables $\mathbf{x}$, where each clause contains at most $\ell \ge 2$ literals, find a variable assignment that maximizes the number of satisfied clauses. Let ${\mathbf{x}}_{\alpha}$ be the variables involved in clause $\alpha $ and ${C}_{\alpha}({\mathbf{x}}_{\alpha})=1$ (0) if the state of ${\mathbf{x}}_{\alpha}$ (resp., does not) satisfies the clause.

**Prior QAOA work:**Considered in Reference [20].

**Approximability:**APX-complete [51]. The best classical approximation ratio for Max-2-Sat is $0.940$ [57], which cannot be improved beyond $0.943$ under the unique games conjecture [55], or beyond $0.954$ unless $P=NP$ [53]. For Max-3-Sat, an efficient $7/8$-approximation [58] is known, which is optimal unless $P=NP$ [53]. Remains APX-complete when any literal appears in at most 3 clauses [50].

**Objective:**$max{\sum}_{j=\alpha}^{m}{C}_{\alpha}({\mathbf{x}}_{\alpha})$.

**Phase separator:**${H}_{\mathrm{P}}={\sum}_{\alpha =1}^{m}{H}_{{C}_{\alpha}}({\mathbf{x}}_{\alpha})$.

**Resource count for phase separator:**Can be implemented with $(\genfrac{}{}{0pt}{}{\ell}{k})$ many k-local $ZZ\dots Z$ gates, for $k=1,\dots ,\ell $, overall requiring at most $O(m{2}^{\ell})$ two-qubit gates.

#### Appendix A.1.3. Min-ℓ-SAT

**Problem:**The same as Max-ℓ-SAT, except with minimization instead of maximization of the number of satisfied clauses.

**Approximability:**APX-complete [59]. Unless $P=NP$, no classical algorithm can do better than $1.3606$ for MinSAT [60], or, for Min-ℓ-SAT, better than $15/14\simeq 1.0714$ for $k=2$ or $7/6\simeq 1.1667$ for arbitrary ℓ [61]. On the other hand, constructive algorithms are known which achieve approximation ratios of $1.1037$, $1.2136$, and $1-{2}^{1-\ell}$ for Min-2-SAT, Min-3-SAT, and Min-ℓ-SAT, respectively [61,62].

**Mapping:**The same as Max-ℓ-SAT.

#### Appendix A.1.4. Max-Not-All-Equal-ℓ-SAT (NAE-ℓ-SAT)

**Problem:**The same as in Max-ℓ-SAT, except that in NAE-ℓ-SAT, each clause is satisfied only if all $\ell \ge 3$ variables do not all have the same value.

**Approximability:**APX-complete [51]. A classical $1.38$-approximation algorithm is known [63]. For $\ell =3$ approximable to $1.138$ but no better than $1.090$ [50,64].

**Variant:**Similar considerations apply to Max-1-in-ℓ-Sat, in which a clause is satisfied when exactly one of its variables is true.

#### Appendix A.1.5. Set Splitting

**Problem:**Given a set $\mathcal{S}$ and a collection of subsets ${\left\{{S}_{j}\right\}}_{j=1}^{m}$, seek a partition $\mathcal{S}={\mathcal{S}}_{1}\cup (\mathcal{S}\backslash {\mathcal{S}}_{1})$ that maximizes the number of split sets, i.e., subsets ${S}_{j}$ with elements in both ${\mathcal{S}}_{1}$ and $\mathcal{S}\backslash {\mathcal{S}}_{1}$.

**Approximability:**APX-complete [65]. Can be approximated to $0.7499$ [66]. Remains APX-complete if each ${S}_{j}$ is restricted to having at most or exactly $k\ge 2$ elements [67]. For each ${S}_{j}$ having exactly $k\ge 4$ elements, unless $P=NP$, there is no efficient classical algorithm that does essentially better than a random partition [53,68]. The generalization MaxHypergraphCut, in which each subset is given a weight and we seek to maximize the total weight of the split sets, can be approximated to 0.7499 [66].

**Reduction to Not-All-Equal-ℓ-SAT:**This problem is a special case of NAE-ℓ-SAT, where none of the variables are negated.

#### Appendix A.1.6. E3Lin2

**Problem:**Given a set of m three-variable equations $\mathcal{A}=\left\{{A}_{j}\right\}$, over n binary variables $\mathbf{x}\in {\{0,1\}}^{n}$, where each equation ${A}_{j}$ is of the form ${x}_{{a}_{1,j}}+{x}_{{a}_{2,j}}+{x}_{{a}_{3,j}}={b}_{j}\phantom{\rule{3.33333pt}{0ex}}mod\phantom{\rule{0.277778em}{0ex}}2$ where ${a}_{1,j},\phantom{\rule{3.33333pt}{0ex}}{a}_{2,j},\phantom{\rule{3.33333pt}{0ex}}{a}_{3,j}\in \left[n\right]$ and ${b}_{j}\in \{0,1\}$, find an assignment $\mathbf{x}\in {\{0,1\}}^{n}$ that maximizes the number of satisfied equations.

**Prior QAOA work:**Considered in Reference [16].

**Approximability:**No efficient $1+\u03f5$ classical approximation algorithm unless $P=NP$ [53]. For the case where each variable appears in at most D equations, an efficient classical algorithm satisfies a $1/2+\Omega ({D}^{-1/2})$ fraction of the equations [23]. Shown in Reference [16] that QAOA with $p=1$ achieves the same result up to a factor logarithmic in D for this case.

**Objective:**Maximize the number of satisfied equations.

**Phase Separator**: ${H}_{\mathrm{P}}={\sum}_{j=1}^{m}{H}_{j}$ where ${H}_{j}={(-1)}^{{b}_{j}}{Z}_{{a}_{1,j}}{Z}_{{a}_{2,j}}{Z}_{{a}_{3,j}}\phantom{\rule{0.277778em}{0ex}}.$

**Resource count for phase separator:**Can be implemented with m many 3-qubit gates.

#### Appendix A.2. Controlled-Bit-Flip (Λ_{f}(X)) Mixers

**Configuration space:**The configuration space of each problem is the subsets ${V}^{\prime}$ of some set V (resp., ${S}^{\prime}\subset S$), represented by bitstrings $\mathbf{x}\in {\{0,1\}}^{n}$, with ${x}_{v}=1$ indicating $v\in {V}^{\prime}$.

**Constraint graph:**An instance of each problem is either specified by a graph or has a natural corresponding constraint graph whose vertices correspond to the variables and with respect to which each variable v is graph-adjacent to $\mathrm{nbhd}(v)$.

**Domain:**Elements of the configuration space that satisfy some CNF formula (whose clauses correspond to the edges of the problem or the constraint graph, except for MinSetCover) that specifies a required property.

**Objective:**Maximize or minimize the subset cardinality.

**Mixing rule:**Swap an element v in or out of ${V}^{\prime}$ if some predicate $\chi ({\mathbf{x}}_{\mathrm{nbhd}(v)})$ is satisfied by the partial state of its neighbors. (The predicate $\chi $ will depend on the problem.)

**Partial mixing Hamiltonian:**${H}_{\mathrm{CX},v}={X}_{v}{H}_{{P}_{v}}$, which can be used to define both a simultaneous controlled bit-flip mixer and a class of partitioned controlled bit-flip mixers. (See Section 4.2).

#### Appendix A.2.1. MaxIndependentSet [Section 4.2]

**Problem:**Given $G=(V,E)$, maximize the size of a subset ${V}^{\prime}\subset V$ of mutually non-adjacent vertices.

**Approximability:**Poly-APX-complete [69], and has no constant factor approximation unless $P=NP$. On bounded degree graphs with maximum degree ${D}_{G}\ge 3$ can be approximated to $({D}_{G}+2)/3$ [69], but remains APX-complete [51].

**Domain:**Independent sets, $\left\{\mathbf{x}:{\bigwedge}_{\{u,v\}\in E}{\overline{x}}_{u}\vee {\overline{x}}_{v}\right\}$.

**Objective:**max $|{V}^{\prime}|={\sum}_{v\in V}{x}_{v}$.

**Mixing rule:**Swap v in or out of ${V}^{\prime}$ if none of its neighbors are in ${V}^{\prime}$.

**Partial mixing Hamiltonian:**${H}_{\mathrm{CX},v}={X}_{v}{H}_{\mathsf{NOR}({x}_{\mathrm{nbhd}(v)})}$.

**Phase separator:**${U}_{\mathrm{P}}(\gamma )=exp(-i\gamma {\sum}_{u\in V}{Z}_{u})$.

**Initial state:**$|s\rangle ={|0\rangle}^{\otimes n}$, i.e., ${V}^{\prime}=\varnothing $.

**Resource count:**

**Controlled-bit-flip mixers:**n multiqubit-controlled-$X(\beta )$ gates, each with at most ${D}_{G}$ controls (exactly ${D}_{v}$ controls for each vertex). Depth at most n but will be much less for sparsely connected graphs.**Phase separator:**n single-qubit Z-rotations. Depth 1.

**Variants:**Extends easily to weighted-MaxIndependentSet with objective function $f={\sum}_{i=1}^{n}{w}_{i}{x}_{i}$.

#### Appendix A.2.2. MaxClique

**Problem:**Given $G=(V,E)$, maximize the size of a clique in G (a subset ${V}^{\prime}\subset V$ that induces a subgraph in which all pairs of vertices are adjacent).

**Approximability:**A $O(n/{log}^{2}n)$-approximation is known [70], but cannot be efficiently approximated classically better than $O({n}^{1-\u03f5})$ for any $\u03f5>0$ unless $P=NP$ [71].

**Domain:**Cliques, $\left\{\mathbf{x}:{\bigwedge}_{\{u,v\}\in E(\overline{G})}{\overline{x}}_{u}\vee {\overline{x}}_{v}\right\}$.

**Objective:**max $|{V}^{\prime}|={\sum}_{v\in V}{x}_{v}$.

**Reduction to MaxIndependentSet:**Every clique on $G=(V,E)$ gives on independent set on the complement graph $\overline{G}=(V,E(\overline{G}))$ where $E(\overline{G})=\left(\genfrac{}{}{0pt}{}{V}{2}\right)\backslash E$. Therefore, a mapping for MaxClique is given by the mapping for MaxIndependentSet applied to the complement graph $\overline{G}$.

**Resource count:**The same resources as for MaxIndependentSet, except that the controlled bit-flip mixers are now multiqubit-controlled-X gates with at most $n-{D}_{G}-1$ controls (exactly $n-{D}_{v}-1$ controls for each vertex v).

#### Appendix A.2.3. MinVertexCover

**Problem:**Given $G=(V,E)$, minimize the size of a subset ${V}^{\prime}\subset V$ that covers V, i.e., for every $(u,v)\in E$, $u\in {V}^{\prime}$ or $v\in {V}^{\prime}$.

**Prior QAOA work:**A quantum walk generalization of QAOA is proposed for this problem in Reference [31].

**Approximability:**APX-complete [51]. Has a $(2-\Theta (1/\sqrt{logn}))$-approximation [72] but cannot be approximated better than $1.3606$ unless $P=NP$ [73].

**Domain:**Vertex covers, $\left\{\mathbf{x}:{\bigwedge}_{\{u,v\}\in E(\overline{G})}{x}_{u}\vee {x}_{v}\right\}$.

**Objective:**min $|{V}^{\prime}|$.

**Initial state:**$|s\rangle ={|1\rangle}^{\otimes n}$, i.e., ${V}^{\prime}=V$.

**Mixing rule:**Swap v in or out of ${V}^{\prime}$ if all of the edges incident to v are covered by ${V}^{\prime}\cap \mathrm{nbhd}(v)$.

**Phase Separator:**${U}_{\mathrm{P}}(\gamma )=exp(-i\gamma {\sum}_{u\in V}{Z}_{u})$.

**Reduction to MaxIndependentSet:**A subset ${V}^{\prime}\subset V$ is a vertex cover if and only if $V\backslash {V}^{\prime}$ is an independent set, so the problem of finding a minimum vertex cover is equivalent to that of finding a maximum independent set. While as approximation problems they are not equivalent [49], we can use the same mapping as for MaxIndependentSet with each ${\overline{x}}_{v}$ replaced by ${x}_{v}$. The resource counts are the same as for MaxIndependentSet.

**Reduction to MinSat:**Maranthe et al. [74] give an approximation-preserving reduction to Min-${D}_{G}$-SAT enabling us to use the QAOA constuction given above for MinSat. The resource counts are the same as for MinSat with m variables and n clauses.

#### Appendix A.2.4. MaxSetPacking

**Problem:**Given a universe $\left[n\right]$ and m subsets $\mathcal{S}={\left({S}_{j}\right)}_{j=1}^{m}$, ${S}_{j}\subset \left[n\right]$, find the maximum cardinality subcollection ${\mathcal{S}}^{\prime}\subset \mathcal{S}$ of pairwise disjoint subsets.

**Approximability:**As difficult as MaxClique [50]. Cannot be efficiently approximated within any constant factor unless $P=NP$ [75]. The best known algorithm gives an $O(\sqrt{n})$-approximation [76]. APX-complete with the restriction $|{S}_{j}|\le k$ (Max-k-Set-Packing).

**Constraint graph:**Vertices $V=\left[m\right]$ corresponding to elements of $\mathcal{S}$, edges E corresponding to pairs of intersecting subsets.

**Domain:**Subcollections containing mutually disjoint subsets, $\left\{\mathbf{x}:{\bigwedge}_{\{i,j\}\in E}{\overline{x}}_{i}\vee {\overline{x}}_{j}\right\}$.

**Objective:**max $|{\mathcal{S}}^{\prime}|={\sum}_{j=1}^{m}{x}_{j}$

**Initial state:**$|s\rangle ={|0\rangle}^{\otimes m}$, i.e., ${\mathcal{S}}^{\prime}=\varnothing $.

**Mixing rule:**Swap ${S}_{j}$ in or out of ${\mathcal{S}}^{\prime}$ if ${S}_{j}$ is disjoint from the other subsets in ${\mathcal{S}}^{\prime}$, i.e., ${\mathbf{x}}_{\mathrm{nbhd}(j)}=\mathbf{0}$.

**Partial mixing Hamiltonian:**${H}_{\mathrm{CX},j}={2}^{-{D}_{j}}{X}_{j}{\prod}_{i\in \mathrm{nbhd}(j)}(I+{Z}_{i})={X}_{j}{H}_{\mathsf{NOR}({x}_{\mathrm{nbhd}(j)})}$.

**Phase separator:**${U}_{\mathrm{P}}(\gamma )=exp(-i\gamma {\sum}_{j=1}^{m}{Z}_{j})$.

**Resource count:**

**Controlled-bit-flip mixers:**Each partial mixer ${H}_{\mathrm{CX},j}$ is implemented as a controlled-${R}_{X}$ gate with ${D}_{j}$ control qubits. Partial mixer depth at most m.**Phase separator:**m single-qubit Z-rotations. Depth 1.**Initial state:**Depth 0.

**Variants**: Also called MaxHypergraphMatching. Equivalent to MaxClique under a PTAS-reduction [50].

#### Appendix A.2.5. MinSetCover

**Problem:**Given a universe $\left[n\right]$ and m subsets $\mathcal{S}={\left({S}_{j}\right)}_{j=1}^{n}$, ${S}_{j}\subset \left[n\right]$, find the minimum cardinality subcollection ${\mathcal{S}}^{\prime}\subset \mathcal{S}$ of the ${S}_{j}$ such that their union recovers $\left[n\right]$.

**Approximability:**There exists a $1+lnn$ algorithm [77]. Cannot be efficiently approximated to $(1-o(1))lnn$ unless $P=NP$ [78]. APX-complete with the restriction $|{S}_{j}|\le k$ (Max-k-Set-Cover) [50].

**Constraint graph:**Vertices $\left[m\right]$ corresponding to subcollections in $\mathcal{S}$; two vertices $\{i,j\}$ are adjacent if and only if their corresponding sets intersect, ${S}_{i}\cap {S}_{j}\ne \varnothing $.

**Domain:**Set covers, $\left\{\mathbf{x}:{\bigcup}_{j\in \left[m\right]:{x}_{j}=1}{S}_{j}=\left[n\right]\right\}$.

**Objective:**min $|{\mathcal{S}}^{\prime}|={\sum}_{j=1}^{m}{x}_{j}$.

**Initial state:**$|s\rangle ={|1\rangle}^{\otimes m}$, i.e., ${\mathcal{S}}^{\prime}=\mathcal{S}$.

**Mixing rule:**Swap set ${S}_{j}$ in or out of ${\mathcal{S}}^{\prime}$ if ${\mathcal{S}}^{\prime}\backslash {S}_{j}$ covers $\left[n\right]$.

**Partial mixing Hamiltonian:**

**Phase separator:**${U}_{\mathrm{P}}(\gamma )=exp(-i\gamma {\sum}_{j=1}^{m}{Z}_{j})$.

**Resource count:**

**Controlled-bit-flip mixers:**For each ${H}_{\mathrm{CX},j}$, use $|{S}_{j}|$ ancilla qubits. Use each ancilla qubit i to compute ${\bigvee}_{\ell \in \mathrm{nbhd}(j):i\in {S}_{\ell}}{x}_{\ell}$ using a controlled NOT gate with $|\{\ell \in \mathrm{nbhd}(j):i\in {S}_{\ell}\}|\le |\mathrm{nbhd}(j)|={D}_{j}$ control qubits. Then implement ${H}_{\mathrm{CX},j}$ using a controlled X gate on qubit j with the $|{S}_{j}|$ ancilla qubits as the control. Finally, uncompute the ancilla qubits using the same $|{S}_{j}|$ controlled NOT gates as in the first step. Depth at most $2{D}_{j}+1$ per partial mixer.**Phase separator:**m single-qubit Z-rotations. Depth 1.**Initial state:**Depth 0.

**Variants**: Equivalent to minimum hitting set [50] and under L-reductions equivalent to minimum dominating set (which is a special case of minimum set cover).

#### Appendix A.3. XY Mixers

#### Appendix A.3.1. Max-κ-ColorableSubgraph [Section 4.1]

**Problem:**Given a graph G and $\kappa $ colors, maximize the size (number of edges) of a properly colored subgraph.

**Approximability:**A random coloring properly colors a fraction $1-1/\kappa $ of edges in expectation. Equivalent to MaxCut for $\kappa =2$. For $\kappa >2$, semidefinite programming gives a $(1-1/\kappa +\left(2+o(\kappa )\right)\frac{ln\kappa}{{\kappa}^{2}})$-approximation [79], which is optimal up to the $o(\kappa )$ factor under the unique games conjecture [55]. APX-complete for $\kappa \ge 2$ [51] and no PTAS exists unless $P=NP$ [65].

**Configuration space and domain:**The set of all colorings with at most $\kappa $ colors, $\mathbf{x}\in {\left[\kappa \right]}^{n}$.

**Objective:**max ${\sum}_{\{u,v\}\in E}\mathsf{NEQ}({x}_{u},{x}_{v})$.

**Initial state:**All vertices colored with color 1, ${|1\rangle}^{n}$.

**Partial Mixing Hamiltonian:**${H}_{r-\mathrm{NV}}={\sum}_{a=1}^{r}\left({\stackrel{\u02d8}{X}}^{a}+{({\stackrel{\u02d8}{X}}^{\u2020})}^{a}\right)$.

**Encoding:**One-hot.

**Phase Separator:**${U}_{\mathrm{P}}(\gamma )={\prod}_{\{u,v\}\in E}{\prod}_{j=1}^{\kappa}exp\left(-i\gamma {Z}_{v,j}{Z}_{v,j}\right)$**Resource count:**- -
**Number of qubits:**$n\kappa $.- -
**Parity ring mixer:**$n\kappa $ two-qubit ($XY$) gates, with depth at most 2 ($\kappa $ even) or 3 ($\kappa $ odd).- -
**Phase separator:**$n\kappa $ two-qubit ($ZZ$) gates. Depth at most ${D}_{G}+1$.- -
**Initial state:**n single-qubit X gates. Depth 1.

**Alternative encoding (for $\kappa ={2}^{l}$):**Binary

**Phase separator:**${U}_{\mathrm{P}}(\gamma )={\prod}_{\{u,v\}\in E}{\Lambda}_{\mathsf{EQ}{\mathbf{x}}_{u},\mathit{v}}\left({e}^{-i\gamma}\right)$**Mixer:**${U}_{\mathrm{M}}(\beta )={\prod}_{i=1}^{n}{e}^{-i\beta {X}_{i,0}}{{\mathrm{ADD}}_{i}(1)}^{\u2020}{e}^{-i\beta {X}_{i,0}}{\mathrm{ADD}}_{i}(1).$ where ${\mathrm{ADD}}_{i}(z)$ adds z to the register i encoding an integer in binary.**Resource count:**- -
**Parity ring mixer:**$2n$$\mathrm{ADD}$s, $2n$ single-qubit rotations; completely parallelizable.- -
**Phase separator:**m controlled-phase gates with $2l$ controls; depth $O({D}_{G})$.- -
**Initial state:**n single-qubit X gates in depth 1.

#### Appendix A.3.2. Graph Partitioning (Minimum Bisection)

**Problem**

**:**Given a graph G such that n is even, find a subset ${V}_{0}\subset V$ satisfying $|{V}_{0}|=n/2$ such that the number of edges between ${V}_{0}$ and $V\backslash {V}_{0}$ is minimized.

**Prior AQO work:**Studied in the context of AQO for constrained optimization [6].

**Configuration space, domain, and encoding:**Bit strings $\mathbf{x}$ of Hamming weight $n/2$.

**Objective**: $min{\sum}_{\left\{uv\right\}\in E}\mathsf{NEQ}({x}_{u},{x}_{v})$.

**Initial state:**Any $\mathbf{x}$ of Hamming weight $n/2$.

**Phase separator**: ${U}_{\mathrm{P}}(\gamma )=exp(-i\gamma {\sum}_{\left\{uv\right\}\in E}{Z}_{u}{Z}_{v})$.

**Partial mixing Hamiltonian:**Qubit ring XY mixer ${H}_{\mathrm{ring}}^{(\mathrm{enc})}={\sum}_{u=1}^{n}\left({X}_{u}{X}_{u+1}+{Y}_{u}{Y}_{u+1}\right)$.

**Resource count:**

**Number of qubits:**n.**Parity ring mixer:**n two-qubit (XX+YY) gates, with depth at most 2 (n even) or 3 (n odd).**Phase separator:**m two-qubit (ZZ) gates. Depth at most ${D}_{G}+1$.**Initial state:**$n/2$ single-qubit X gates. Depth 1.

#### Appendix A.3.3. Maximum Bisection

**Problem:**Given a graph G such that n is even, and edge weights ${w}_{j}$, find a subset ${V}_{0}\subset V$ satisfying $|{V}_{0}|=n/2$ such that the total weight of edges crossing between ${V}_{0}$ and $V\backslash {V}_{0}$ is maximized.

**Approximability:**A random bisection gives an $0.5$-approximation in expectation, improved to $0.65$ [79].

**Mapping:**Same as graph partitioning (Appendix A.3.2) with weights included in the phase separator.

#### Appendix A.3.4. Maximum Vertex κ-Cover

**Problem**: Variant of vertex cover optimization problem. Given a graph G and an integer $\kappa \le n$, find a subset ${V}_{0}\subset V$ of size $|{V}_{0}|=\kappa $ such that the number of edges covered by ${V}_{0}$ is maximized.

**Approximability:**It is NP-hard to decide whether or not a fraction $(1-\u03f5)$ of the edges can be $\kappa $-covered [65].

**Mapping:**Same as graph partitioning (Appendix A.3.2) with the Hamming weight $n/2$ replaced by $\kappa $.

#### Appendix A.4. Controlled-XY Mixers

#### Appendix A.4.1. Max-κ-ColorableInducedSubgraph [Section 4.3]

**Problem:**Given a graph G and $\kappa $ colors, maximize the size of a subset of vertices ${V}^{\prime}\subset V$ whose induced subgraph is $\kappa $-colorable.

**Approximability:**Equivalent to MaxIndependentSet for $k=1$. Both as easy and as hard to approximate as MaxIndependentSet for $k\ge 1$ [50,81]. On bounded degree graphs, can be approximated to $({D}_{G}/k+1)/2$, but remains APX-complete [82].

**Configuration space:**${[\kappa +1]}^{n}$. (0-th color is “uncolored” and represents $v\notin {V}^{\prime}$.)

**Domain:**$\kappa $-colorable induced subgraphs, $\left\{\mathbf{x}:{\bigwedge}_{\{i,j\}\in E}\left(\mathsf{EQ}({x}_{i},0)\vee \mathsf{EQ}({x}_{j},0)\vee \mathsf{NEQ}({x}_{i},{x}_{j})\right)\right\}$.

**Objective:**min ${\sum}_{i=1}^{n}\mathsf{NEQ}({x}_{i},0)$.

**Initial state:**All vertices uncolored, ${|10\dots 0\rangle}^{\otimes n}$.

**Mixing rule:**A vertex can switch between being uncolored and colored j only if none of its neighbours are colored j.

**Partial mixing Hamiltonian:**Controlled null-swap mixer at a vertex.

**Encoding:**One-hot.

**Phase separator:**${U}_{\mathrm{P}}(\gamma )=exp(\frac{i}{2}\gamma {\sum}_{u\in V}{\sum}_{j=1}^{\kappa}{Z}_{u,j})$.

**Resource count:**

**Partitioned controlled null-swap mixers:**$n\kappa $ partial mixers, each acting on at most ${D}_{G}+1$ qubits. Depth at most $n\kappa $ but will be much less for sparsely connected graphs.**Phase separator:**n single-qubit Z-rotations. Depth 1.**Initial state:**$|s\rangle ={\left(|1\rangle \otimes {|0\rangle}^{\otimes \kappa}\right)}^{\otimes n}$, implemented in depth 1 with n X gates.

#### Appendix A.4.2. MinGraphColoring [Section 4.4]

**Problem:**Given a graph G, minimize the number of colors required to properly color it.

**Approximability:**The best classical algorithm [83] achieves approximation ratio $O(n\frac{{(loglogn)}^{2}}{{log}^{3}n})$, and we cannot do better than ${n}^{1-\u03f5}$ for any $\u03f5>0$ unless $P=NP$ [71]. For edge-colorings of multigraphs, there is a ($1.1+0.8/{\kappa}^{\ast}$)-approximate algorithm [84].

**Configuration space:**${\left[\kappa \right]}^{n}$, $\phantom{\rule{0.277778em}{0ex}}\kappa ={D}_{G}+2$.

**Domain:**Proper $\kappa $-colorings of G (many of which use fewer than $\kappa $ colors), $\left\{\mathbf{x}:{\bigwedge}_{\{i,j\}\in E}\mathsf{NEQ}({x}_{i},{x}_{j})\right\}$.

**Objective:**Minimize number of used colors: ${\sum}_{a=1}^{\kappa}\mathsf{OR}(\mathsf{EQ}({x}_{1},a),\dots ,\mathsf{EQ}({x}_{n},a))$.

**Mixing rule:**The color of vertex u may be swapped between colors c and ${c}^{\prime}$ if none of its neighbours are already colored c or ${c}^{\prime}$.

**Partial mixing Hamiltonian:**Controlled-swap partial mixing Hamiltonian.

**Encoding:**One-hot.

**Phase separator:**${\prod}_{a=1}^{\kappa}{\Lambda}_{\mathsf{OR}({\mathbf{x}}_{\left[n\right],a})}\left({e}^{-i\gamma}\right)$.

**Resource count:**

**Partitioned controlled-swap mixers:**$\kappa (\kappa -1)n/2$ controlled gates on no more than ${D}_{G}+2$ qubits.**Phase separator:**$\kappa $ partial phase separators acting on $n+1$ qubits, one target qubit and n control qubits. Depth 2 in partial phase separators, or depth 1 with the addition of $\kappa $ ancilla qubits.**Initial state:**Any valid $\kappa $ coloring (can be efficiently computed classically). Can be implemented in depth 1 using n single-qubit X gates.

**Reduction from MinEdgeColoring:**In MinEdgeColoring, the objective is to minimize the number of colors needed to color the edges so that no two adjacent edges have the same color. This is equivalent to MinGraphColoring on the line graph.

#### Appendix A.4.3. MinCliqueCover

**Problem:**Given a graph G, we seek the smallest collection of cliques ${S}_{1},\dots ,{S}_{k}\subset V$, such that every vertex belongs to at least one clique.

**Approximability:**If MaxClique is approximable within $f(n)$ for a given instance, then MinCliqueCover approximable to $O(f(n))$ [50]. Not approximable within ${n}^{\u03f5}$ for any $\u03f5>0$ [85].

**Reduction to MinGraphColoring:**A partition of the vertices of G is a k-clique cover if and only if it is a proper k-coloring of the complement graph ${G}^{\prime}=(V,{E}^{c})$, and moreover, the smallest clique cover corresponds to the chromatic number of the complement graph. Thus the previous construction suffices.

#### Appendix A.5. Permutation Mixers

#### Appendix A.5.1. TravelingSalespersonProblem (TSP) [Section 5.1]

**Problem:**Given a set of n cities and distances $d:{\left[n\right]}^{2}\to {\mathbb{R}}_{+}$, find an ordering of the cities that minimizes the total distance traveled on the corresponding tour.

**Approximability:**NPO-complete [86]. MetricTSP is APX-complete [87] and has a $3/2$-approximation [88]. The corresponding MaxTSP problem is approximable within $7/5$ for symmetric distance, and $63/38$ if asymmetric.

**Configuration space and domain**: Orderings of the cities $\left\{\mathit{\iota}\right\}$.

**Objective:**min $f(\mathit{\iota})={\sum}_{j=1}^{n}{d}_{{\iota}_{j},{\iota}_{j+1}}$.

**Partial mixer:**Partial permutation swap mixer.

**Encoding:**Direct one-hot.

**Compilation:**

**Phase separator:**${H}_{\mathrm{P}}^{(\mathrm{enc})}={\sum}_{i=1}^{n}{\sum}_{u=1}^{n}{\sum}_{v=1}^{n}d(u,v){Z}_{u,i}{Z}_{v,i+1}$.**Partial mixer:**${U}_{\mathrm{PS},\{i,j\},\{u,v\}}^{(\mathrm{enc})}(\beta )={e}^{-i\beta {H}_{\mathrm{PS},\{i,j\},\{u,v\}}}$, where ${H}_{\mathrm{PS},\{i,j\},\{u,v\}}^{(\mathrm{enc})}$ is given in Equation (55).

**Initial state:**Arbitrary ordering.

**Resource count:**

**Color-parity permutation swap mixer (Section 5.1):**At most $(n-1)\left(\genfrac{}{}{0pt}{}{n}{2}\right)$ 4-qubit partial mixers, in depth at most $2n$.**Phase separator:**${n}^{2}(n-1)$ mutually commuting two-qubit gates. Depth no more than ${D}_{G}+1$.**Initial state:**n single-qubit X gates. Depth 1.

#### Appendix A.5.2. SMS, Minimizing Total Weighted Squared Tardiness [Section 5.2]

**Problem:**$(1|{d}_{j}|\sum {w}_{j}{T}_{j}^{2})$. Given a set of jobs with processing times $\mathbf{p}$, deadlines $\mathbf{d}\in {\mathbb{Z}}_{+}$, and weights $\mathbf{w}$, find a schedule that minimizes the total weighted squared tardiness ${\sum}_{j=1}^{n}{w}_{j}{T}_{j}^{2}$.

**Approximability:**Considered in Reference [89].

**Configuration space and domain:**Orderings of the jobs $\left\{\mathit{i}\right\}$, and an integer slack variable ${y}_{j}\in [0,{d}_{j}-{p}_{j}]$ for each job.

**Objective:**min $f(\mathit{\iota},\mathbf{y})={\sum}_{j=1}^{n}{w}_{j}{\left({s}_{j}(\mathit{\iota})+{p}_{j}-{d}_{j}+{y}_{j}\right)}^{2}.$

**Partial mixer:**Partial permutation swap mixer for computational qubits; binary mixer mixer for the slack qubits.

**Encoding:**Direct one-hot for the ordering variables; binary for the slack variables.

**Compilation:**

**Phase separator:**The encoded phase separator is a 3-local Hamiltonian containing- -
- all 1-local terms;
- -
- all 2-local terms of two computational qubits corresponding to different jobs at different places in the ordering, all 2-local terms of two ancilla qubits corresponding to the same job, and all 2-local terms of one computational qubit and one ancilla qubit except when they correspond to different jobs and the computational qubit corresponds to that job being last in the ordering;
- -
- all 3-local terms of three computational qubits corresponding to different jobs at different places in the ordering and all 3-local terms containing two computational qubits corresponding to different jobs at different places in the ordering and one ancilla qubit corresponding to the later job.

**Partial mixer:**${H}_{\mathrm{PS},\{i,j\},\{u,v\}}^{(\mathrm{enc})}={S}_{u,i}^{+}{S}_{v,j}^{+}{S}_{u,j}^{-}{S}_{v,i}^{-}+{S}_{u,i}^{-}{S}_{v,j}^{-}{S}_{u,j}^{+}{S}_{v,i}^{+}$.**Initial state**Arbitrary ordering.

**Resource count:**

**Color-parity permutation swap mixer (Section 5.1):**At most $(n-1)\left(\genfrac{}{}{0pt}{}{n}{2}\right)$ 4-qubit partial mixers, in depth at most $2n$. Single-qubit X mixer for slack binary variables can be done in parallel with the permutation swap mixer.**Phase separator:**Let ${\mu}_{i}=\u2308{log}_{2}({d}_{i}-{p}_{i}+1)\u2309$ be the number of bits needed for the slack variable ${y}_{i}$, and $\mu ={\sum}_{i=1}^{n}{\mu}_{i}$.- -
- Number of 1-local gates: ${n}^{2}+\mu $.
- -
- Number of 2-local gates: $2{\left(\genfrac{}{}{0pt}{}{n}{2}\right)}^{2}+{\sum}_{i=1}^{n}\left(\genfrac{}{}{0pt}{}{{\mu}_{i}}{2}\right)+\mu ({n}^{2}-n+1)$.
- -
- Number of 3-local gates: $6{\left(\genfrac{}{}{0pt}{}{n}{3}\right)}^{2}+2\mu {\left(\genfrac{}{}{0pt}{}{n}{2}\right)}^{2}$.

**Initial state:**n single-qubit X gates. Depth 1.

#### Appendix A.5.3. SMS, Minimizing Total Weighted Tardiness [Section 5.3]

**Problem:**$(1|{d}_{j}|\sum {w}_{j}{T}_{j})$. Given a set of n jobs with processing times $\mathbf{p}$, deadlines $\mathbf{d}\in {\mathbb{Z}}_{+}$, and weights $\mathbf{w}$, find a schedule that minimizes the total weighted tardiness ${\sum}_{j=1}^{n}{w}_{j}{T}_{j}$.

**Approximability:**There exists an $(n-1)$-approximation [90]. The decision version is strongly NP-hard [91].

**Configuration space and domain:**Orderings of the jobs $\left\{\mathit{i}\right\}$.

**Objective:**$f(\mathit{\iota})={\sum}_{i=1}^{n}{w}_{i}max\{0,{d}_{i}-{s}_{i}(\mathit{\iota})-{p}_{i}\}.$

**Encoding:**Absolute one-hot.

**Mixing rule:**Swap two jobs only if they are scheduled in consecutive order.

**Partial mixer:**Partial time-swap mixer (specific to the absolute encoding).

**Initial state:**Arbitrary ordering.

**Compilation:**

**Phase separator:**${H}_{\mathrm{P}}^{(\mathrm{enc})}={\sum}_{i=1}^{n}{w}_{i}{\sum}_{t={d}_{i}-{p}_{i}+1}^{{h}_{i}}(t+{p}_{i}-{d}_{i}){Z}_{i,t}.$**Partial mixer:**${H}_{\mathrm{TS},t,\{i,j\}}^{(\mathrm{enc})}={S}_{i,t+{p}_{j}}^{+}{S}_{j,t}^{+}{S}_{i,t}^{-}{S}_{j,t+{p}_{i}}^{-}+{S}_{i,t+{p}_{j}}^{-}{S}_{j,t}^{-}.{S}_{i,t}^{+}{S}_{j,t+{p}_{i}}^{+}$.

**Resource count:**

**Color–time partitioned time-swap mixer:**$h\left(\genfrac{}{}{0pt}{}{n}{2}\right)$ 4-qubit gates in depth $h\kappa $.**Phase separator:**At most $nh$ single-qubit gates, depth 1.**Initial state:**n single-qubit X gates, depth 1.

#### Appendix A.5.4. SMS, with Release Dates [Section 5.4]

**Problem:**$(1|{d}_{j},{r}_{j}|f)$. Given a set of jobs with processing times $\mathbf{p}$, deadlines $\mathbf{d}$, release times $\mathbf{r}\in {\mathbb{Z}}_{+}$ and weights $\mathbf{w}$, find a schedule that minimizes some (given) function f of the schedule, e.g., weighted total tardiness such that each job starts no earlier than its release time.

**Approximability:**For all deadlines being zero, the minimal weighted total tardiness (completion times in this special case) is $1.685$-approximable [92].

**Configuration space:**$\left\{\mathit{s}\right\}={\times}_{j=1}^{n}\left[{W}_{j}\cup \left\{{b}_{j}\right\}\right]$, where ${W}_{j}=[{r}_{j},h-{p}_{j}]$ is the window of times in which job j can start and ${b}_{j}$ is the job’s “buffer” slot.

**Domain:**Schedules in the configuration space such that no two jobs overlap.

**Objective:**Maximize (or minimize) a given cost function $f(\mathit{s})$, e.g., weighted total tardiness $f(\mathit{s})={\sum}_{j=1}^{n}{w}_{j}{T}_{j}$, where ${T}_{j}=max\{0,{d}_{i}-{s}_{i}-{p}_{i}\}$ is the tardiness of job j.

**Mixing rule:**Swap a job between time $t\in h$ and its buffer slot if no other job is running at time t.

**Partial mixer:**Controlled null-swap mixer; see Section 5.4.

**Initial state:**Greedy earliest-release-date schedule.

**Encoding:**One-hot encoding.

**Compilation:**

**Partial mixer:**${H}_{\mathrm{NS},i,t}^{(\mathrm{enc})}=\left({\prod}_{j\ne i}{\prod}_{{t}^{\prime}\in {\mathrm{nbhd}}_{i,t}(j)}\frac{1}{2}(I+{Z}_{j,{t}^{\prime}})\right)\left({X}_{i,t}{X}_{i,{b}_{i}}+{Y}_{i,t}{Y}_{i,{b}_{i}}\right).$**Phase separator (for min weighted total tardiness):**See Equation (77).

**Resource count:**

**Controlled null-swap mixer:**SMS-instance dependent, see discussion in Section 5.4.**Phase separator (for min weighted total tardiness):**At most ${\sum}_{j}(h-{d}_{j}+1)$ single-qubit Z gates. Depth 1.**Initial state:**n single-qubit X gates. Depth 1.

## Appendix B. Glossary of Mapping Terms

#### Appendix B.1. Mixers

#### Appendix B.1.1. Partial Mixing Hamiltonians

- r-nearby-values mixer: ${H}_{r-\mathrm{NV}}={\sum}_{a=1}^{r}\left({\stackrel{\u02d8}{X}}^{a}+{({\stackrel{\u02d8}{X}}^{\u2020})}^{a}\right)$. The special cases of $r=1$ and $r=d-1$ are called the “ring mixer” and “fully-connected mixer”, respectively.
- simple binary mixer: When $d={2}^{l}$ is a power of two: ${H}_{\mathrm{binary}}^{(\mathrm{enc})}={\sum}_{i=1}^{l}{X}_{i}.$
- null-swap mixer: For cases when one of the d values corresponds to a “null” value (e.g., black or uncolored in graph coloring), ${H}_{\mathrm{NS}}={\sum}_{a=1}^{d-1}\left(|0\rangle \langle a|+|a\rangle \langle 0|\right)$.

- Value-selective permutation swap mixer: Swaps the ith and jth elements in the ordering if those elements are u and v, see Equation (46) in Section 5.1.
- Value-independent permutation swap mixer: Swaps the ith and jth elements of the ordering regardless of which items those are, see Equation (48) in Section 5.1.

- Controlled null-swap mixer:
- -
- Section 4.3 for MaxColorableInducedSubgraph, Equation (27).
- -
- Section 5.4 for SMS with release dates, Equation (73).

- Controlled-SWAP mixer: Section 4.4 for MinGraphColoring, Equation (34).

#### Appendix B.1.2. Partitions

- Parity-mixer: For Hamiltonian terms of type ${\sum}_{u}{A}_{u}{B}_{u+1}$, where $u\in \left[n\right]$ and ${A}_{u}$ and ${B}_{u+1}$ are operators acting on qubit u and $u+1$, respectively. Partition the index set $\left\{u\right\}$ into even and odd subsets. See Section 4.1 for details.
- Color-mixer: For index pairs $(u,v)\in (\genfrac{}{}{0pt}{}{\left[n\right]}{2})$, let ${\mathcal{P}}_{\mathrm{col}}=({P}_{1},\dots ,{P}_{\kappa})$ be an ordered partition of the indices $(\genfrac{}{}{0pt}{}{\left[n\right]}{2})$ into $\kappa $ parts such that each part contains only mutually disjoint pairs of indices from $\left[n\right]$. This is equivalent to considering a $\kappa $-edge-coloring of the complete graph ${K}_{n}$, and assigning an ordering to the colors, so we call ${\mathcal{P}}_{\mathrm{col}}$ the “color partition”. For even n, $\kappa =n-1$ suffices, and for odd n, $\kappa =n$. See Section 5.1 for its use.

#### Appendix B.2. Encodings

- One-hot encoding: The qudit basis states $|a\rangle $, $a=0,\dots ,d-1$, are encoded as the d-qubit states ${|0\rangle}^{\otimes a}\otimes |1\rangle \otimes {|1\rangle}^{\otimes d-1-a}$. See Section 4.1.1
- Binary encoding: Each qudit basis state $|a\rangle $ is encoded as the ℓ-qubit basis state $|{a}_{2}\rangle $, where ${a}_{2}$ denotes the binary representation of a, and $\ell =\lceil {log}_{2}d\rceil $. See Section 4.1.1.A generalization of the binary encoding is radix encoding, which represents a in base-r, with positive integer r. While the binary encoding is convenient for qubits, and is hence appealing in terms of implementability, it is plausible that for some problems, a more general radix encoding could be a natural choice.

- Direct encoding: An ordering $\mathit{\iota}=\left({\iota}_{1},\dots ,{\iota}_{n}\right)$ is encoded directly as a string ${\left[n\right]}^{n}$ of integers. It is demonstrated for TSP and SMS $(1|{d}_{j}|{\sum}_{j}{w}_{j}{T}_{j}^{2})$ in Section 5.1 and Section 5.2, respectively.
- Absolute encoding: To encode the ordering $\mathit{\iota}=({\iota}_{1},\dots ,{\iota}_{n})$, we assigned each item i a value ${s}_{i}\in [0,h]$, where the “horizon” h is a parameter of the encodings, such that for all $i<j$, ${s}_{{\iota}_{i}}<{s}_{{\iota}_{j}}$. It is demonstrated for SMS $(1|{d}_{j}|{\sum}_{j}{w}_{j}{T}_{j})$ in Section 5.3.

- Direct one-hot encoding, see Section 5.1.
- Absolute one-hot encoding, see Section 5.3.

## Appendix C. Elementary Operators

#### Appendix C.1. SWAP and XY Opertors

- In the subspace spanned by $\{|01\rangle ,|10\rangle \}$, $X{Y}_{i,j}$ and ${\mathrm{SWAP}}_{i,j}$ behave identically.
- In the subspace $\{|11\rangle ,|00\rangle \}$, $X{Y}_{i,j}$ acts as null while ${\mathrm{SWAP}}_{i,j}$ acts as an identity.
- The operators $X{Y}_{i,j}$ and ${\mathrm{SWAP}}_{i,j}$ are both Hermitian. ${\mathrm{SWAP}}_{i,j}$ is unitary.
- Applied to a multiqubit system, Hamiltonians of the form ${H}_{\mathrm{SWAP}}={\sum}_{i,j}{\mathrm{SWAP}}_{i,j}$ or ${H}_{\mathrm{XY}}={\sum}_{i,j}X{Y}_{i,j}$, where either sum may be taken over arbitrary subsets of indices, each preserve the Hamming weight of computational basis states; hence, so do the corresponding unitaries $exp[-i\beta {H}_{\mathrm{XY}}]$ and $exp[-i\beta {H}_{\mathrm{SWAP}}]$. Although the two operators do not behave identically on the full Hilbert space, they can both serve as mixers in situations in which Hamming weight is the relevant constraint.
- To enforce simultaneous swaps of multiple qubit pairs, in Hamiltonians such as $H={\prod}_{\{i,j\}}{\mathrm{SWAP}}_{i,j}$, each ${\mathrm{SWAP}}_{i,j}$ cannot in general be directly replaced by $X{Y}_{i,j}$ due to the second item above. See the TSP problem in Section 5.1 as an example.

#### Appendix C.2. Generalized Pauli Gates for Qudits

## References

- Farhi, E.; Goldstone, J.; Gutmann, S. A quantum approximate optimization algorithm. arXiv. 2014. Available online: https://arxiv.org/abs/1411.4028 (accessed on 11 February 2019).
- Biswas, R.; Jiang, Z.; Kechezhi, K.; Knysh, S.; Mandrà, S.; O’Gorman, B.; Perdomo-Ortiz, A.; Petukhov, A.; Realpe-Gómez, J.; Rieffel, E.; et al. A NASA perspective on quantum computing: Opportunities and challenges. Parallel Comput.
**2017**, 64, 81–98. [Google Scholar] [CrossRef] - Rieffel, E.G.; Venturelli, D.; O’Gorman, B.; Do, M.B.; Prystay, E.M.; Smelyanskiy, V.N. A case study in programming a quantum annealer for hard operational planning problems. Quant. Inform. Process.
**2015**, 14, 1–36. [Google Scholar] [CrossRef] - Lucas, A. Ising formulations of many NP problems. Front. Phys.
**2014**, 2, 5. [Google Scholar] [CrossRef] - Hadfield, S. On the representation of Boolean and real functions as Hamiltonians for quantum computing. arXiv. 2018. Available online: https://arxiv.org/pdf/1804.09130.pdf (accessed on 11 February 2019).
- Hen, I.; Spedalieri, F.M. Quantum annealing for constrained optimization. Phys. Rev. Appl.
**2016**, 5, 034007. [Google Scholar] [CrossRef] - Hen, I.; Sarandy, M.S. Driver Hamiltonians for constrained optimization in quantum annealing. Phys. Rev.
**2016**, 93, 062312. [Google Scholar] [CrossRef] - Rieffel, E.G.; Polak, W. Quantum Computing: A Gentle Introduction; MIT Press: Cambridge, MA, USA, 2011. [Google Scholar]
- IBM. IBM Q and Quantum Computing. Available online: https://www.research.ibm.com/ibm-q/ (accessed on 1 September 2017).
- Boixo, S.; Smelyanskiy, V.N.; Shabani, A.; Isakov, S.V.; Dykman, M.; Denchev, V.S.; Amin, M.H.; Smirnov, A.Y.; Mohseni, M.; Neven, H. Computational multiqubit tunnelling in programmable quantum annealers. Nat. Commun.
**2016**, 7, 10327. [Google Scholar] [CrossRef] [PubMed] - Sete, E.A.; Zeng, W.J.; Rigetti, C.T. A functional architecture for scalable quantum computing. In Proceedings of the 2016 IEEE International Conference on Rebooting Computing (ICRC), San Diego, CA, USA, 17–19 October 2016; pp. 1–6. [Google Scholar] [CrossRef]
- Mohseni, M.; Read, P.; Neven, H.; Boixo, S.; Denchev, V.; Babbush, R.; Fowler, A.; Smelyanskiy, V.; Martinis, J. Commercialize quantum technologies in five years. Nature
**2017**, 543, 171–174. [Google Scholar] [CrossRef] - Debnath, S.; Linke, N.; Figgatt, C.; Landsman, K.; Wright, K.; Monroe, C. Demonstration of a small programmable quantum computer with atomic qubits. Nature
**2016**, 536, 63–66. [Google Scholar] [CrossRef] - Saffman, M. Quantum computing with atomic qubits and Rydberg interactions: progress and challenges. J. Phys. B Atom. Mol. Opt. Phys.
**2016**, 49, 202001. [Google Scholar] [CrossRef] - Zahedinejad, E.; Zaribafiyan, A. Combinatorial optimization on gate model quantum computers: A survey. arXiv. 2017. Available online: https://arxiv.org/pdf/1708.05294.pdf (accessed on 11 February 2019).
- Farhi, E.; Goldstone, J.; Gutmann, S. A quantum approximate optimization algorithm applied to a bounded occurrence constraint problem. arXiv. 2014. Available online: https://arxiv.org/pdf/1412.6062.pdf (accessed on 11 February 2019).
- Farhi, E.; Harrow, A.W. Quantum supremacy through the quantum approximate optimization algorithm. arXiv. 2016. Available online: https://arxiv.org/pdf/1602.07674.pdf (accessed on 11 February 2019).
- Yang, Z.C.; Rahmani, A.; Shabani, A.; Neven, H.; Chamon, C. Optimizing variational quantum algorithms using Pontryagin’s minimum principle. Phys. Rev. X
**2017**, 7, 021027. [Google Scholar] [CrossRef] - Jiang, Z.; Rieffel, E.G.; Wang, Z. Near-optimal quantum circuit for Grover’s unstructured search using a transverse field. Phys. Rev. A
**2017**, 95, 062317. [Google Scholar] [CrossRef] - Wecker, D.; Hastings, M.B.; Troyer, M. Training a quantum optimizer. Phys. Rev. A
**2016**, 94, 022309. [Google Scholar] [CrossRef] - Wang, Z.; Hadfield, S.; Jiang, Z.; Rieffel, E.G. Quantum approximate optimization algorithm for MaxCut: A fermionic view. Phys. Rev. A
**2018**, 97, 022304. [Google Scholar] [CrossRef] - Venturelli, D.; Do, M.; Rieffel, E.; Frank, J. Compiling quantum circuits to realistic hardware architectures using temporal planners. Quantum Sci. Tech.
**2018**, 3, 025004. [Google Scholar] [CrossRef] - Barak, B.; Moitra, A.; O’Donnell, R.; Raghavendra, P.; Regev, O.; Steurer, D.; Trevisan, L.; Vijayaraghavan, A.; Witmer, D.; Wright, J. Beating the random assignment on constraint satisfaction problems of bounded degree. arXiv. 2015. Available online: https://arxiv.org/pdf/1505.03424.pdf (accessed on 11 February 2019).
- Hadfield, S.; Wang, Z.; Rieffel, E.G.; O’Gorman, B.; Venturelli, D.; Biswas, R. Quantum Approximate Optimization with Hard and Soft Constraints. In Proceedings of the Second International Workshop on Post Moores Era Supercomputing, Denver, CO, USA, 12–17 November 2017; ACM: New York, NY, USA, 2017; pp. 15–21. [Google Scholar]
- Fingerhuth, M.; Babej, T.; Ing, C. A quantum alternating operator ansatz with hard and soft constraints for lattice protein folding. arXiv. 2018. Available online: https://arxiv.org/pdf/1810.13411.pdf (accessed on 11 February 2019).
- Farhi, E.; Goldstone, J.; Gutmann, S.; Neven, H. Quantum algorithms for fixed qubit architectures. arXiv. 2017. Available online: https://arxiv.org/pdf/1703.06199.pdf (accessed on 11 February 2019).
- Lechner, W. Quantum approximate optimization with parallelizable gates. arXiv. 2018. Available online: https://arxiv.org/pdf/1802.01157.pdf (accessed on 11 February 2019).
- Ho, W.W.; Hsieh, T.H. Efficient preparation of non-trivial quantum states using the quantum approximate optimization algorithm. arXiv. 2019. Available online: https://arxiv.org/pdf/1803.00026.pdf (accessed on 11 February 2019).
- Verdon, G.; Broughton, M.; Biamonte, J. A quantum algorithm to train neural networks using low-depth circuits. arXiv. 2017. Available online: https://arxiv.org/pdf/1712.05304.pdf (accessed on 11 February 2019).
- Otterbach, J.; Manenti, R.; Alidoust, N.; Bestwick, A.; Block, M.; Bloom, B.; Caldwell, S.; Didier, N.; Fried, E.S.; Hong, S.; et al. Unsupervised machine learning on a hybrid quantum computer. arXiv. 2017. Available online: https://arxiv.org/pdf/1712.05771.pdf (accessed on 11 February 2019).
- Marsh, S.; Wang, J. A quantum walk-assisted approximate algorithm for bounded NP optimisation problems. Quant. Inform. Process.
**2019**, 18, 61. [Google Scholar] [CrossRef] - Lloyd, S. Quantum approximate optimization is computationally universal. arXiv. 2018. Available online: https://arxiv.org/pdf/1812.11075.pdf (accessed on 11 February 2019).
- Guerreschi, G.G.; Smelyanskiy, M. Practical optimization for hybrid quantum-classical algorithms. arXiv. 2017. Available online: https://arxiv.org/pdf/1701.01450.pdf (accessed on 11 February 2019).
- McClean, J.R.; Boixo, S.; Smelyanskiy, V.N.; Babbush, R.; Neven, H. Barren plateaus in quantum neural network training landscapes. arXiv. 2018. Available online: https://arxiv.org/pdf/1803.11173.pdf (accessed on 11 February 2019).
- Booth, K.E.C.; Do, M.; Beck, J.C.; Rieffel, E.; Venturelli, D.; Frank, J. Comparing and integrating constraint programming and temporal planning for quantum circuit compilation. arXiv. 2018. Available online: https://arxiv.org/pdf/1803.06775.pdf (accessed on 11 February 2019).
- Gottesman, D.; Kitaev, A.; Preskill, J. Encoding a qubit in an oscillator. Phys. Rev. A
**2001**, 64, 012310. [Google Scholar] [CrossRef] - Bartlett, S.D.; de Guise, H.; Sanders, B.C. Quantum encodings in spin systems and harmonic oscillators. Phys. Rev. A
**2002**, 65, 052316. [Google Scholar] [CrossRef] - Verstraete, F.; Cirac, J.I.; Latorre, J.I. Quantum circuits for strongly correlated quantum systems. Phys. Rev. A
**2009**, 79, 032316. [Google Scholar] [CrossRef] - Chow, J.M. Quantum Information Processing with Superconducting Qubits. Ph.D. Thesis, Yale University, London, UK, 2010. [Google Scholar]
- Soifer, A. The Mathematical Coloring Book: Mathematics of Coloring and the Colorful Life of Its Creators; Springer: Berlin, Germany, 2008. [Google Scholar]
- Zuckerman, D. On unapproximable versions of NP-complete problems. SIAM J. Comput.
**1996**, 25, 1293–1304. [Google Scholar] [CrossRef] - Papadimitriou, C.H. Computational Complexity; John Wiley and Sons: Hoboken, NJ, USA, 1994. [Google Scholar]
- Yato, T.; Seta, T. Complexity and completeness of finding another solution and its application to puzzles. IEICE Trans. Fund. Electron. Commun. Comput. Sci.
**2003**, 86, 1052–1060. [Google Scholar] - Ueda, N.; Nagao, T. NP-Completeness Results for NONOGRAM via Parsimonious Reductions. Available online: https://pdfs.semanticscholar.org/1bb2/3460c7f0462d95832bb876ec2ee0e5bc46cf.pdf (accessed on 30 August 2017).
- Bremner, M.J.; Jozsa, R.; Shepherd, D.J. Classical simulation of commuting quantum computations implies collapse of the polynomial hierarchy. Proc. R. Soc. Lond. Math. Phys. Sci.
**2010**, 467. [Google Scholar] [CrossRef] - Li, G.; Ding, Y.; Xie, Y. Tackling the qubit mapping problem for NISQ-Era quantum devices. arXiv. 2018. Available online: https://arxiv.org/pdf/1809.02573.pdf (accessed on 11 February 2019).
- Bremner, M.J.; Montanaro, A.; Shepherd, D.J. Average-case complexity versus approximate simulation of commuting quantum computations. Phys. Rev. Lett.
**2016**, 117, 080501. [Google Scholar] [CrossRef] [PubMed] - Bremner, M.J.; Montanaro, A.; Shepherd, D.J. Achieving quantum supremacy with sparse and noisy commuting quantum computations. Quantum
**2017**, 1, 8. [Google Scholar] [CrossRef] - Trevisan, L. Inapproximability of combinatorial optimization problems. In Paradigms of Combinatorial Optimization, 2nd ed.; John Wiley and Sons: Hoboken, NJ, USA, 2014; pp. 381–434. [Google Scholar]
- Ausiello, G.; Crescenzi, P.; Gambosi, G.; Kann, V.; Marchetti-Spaccamela, A.; Protasi, M. Complexity and Approximation: Combinatorial Optimization Problems and Their Approximability Properties; Springer: Berlin, Germany, 2012. [Google Scholar]
- Papadimitriou, C.; Yannakakis, M. Optimization, approximation, and complexity classes. J. Comput. Syst. Sci.
**1991**, 43, 425–440. [Google Scholar] [CrossRef] - Khanna, S.; Motwani, R.; Sudan, M.; Vazirani, U. On syntactic versus computational views of approximability. SIAM J. Comput.
**1998**, 28, 164–191. [Google Scholar] [CrossRef] - Håstad, J. Some optimal inapproximability results. J. ACM
**2001**, 48, 798–859. [Google Scholar] [CrossRef] - Goemans, M.X.; Williamson, D.P. Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming. J. ACM
**1995**, 42, 1115–1145. [Google Scholar] [CrossRef] - Khot, S.; Kindler, G.; Mossel, E.; O’Donnell, R. Optimal inapproximability results for MAX-CUT and other 2-variable CSPs? SIAM J. Comput.
**2007**, 37, 319–357. [Google Scholar] [CrossRef] - Feige, U.; Karpinski, M.; Langberg, M. Improved approximation of Max-Cut on graphs of bounded degree. J. Algorithms
**2002**, 43, 201–219. [Google Scholar] [CrossRef] - Lewin, M.; Livnat, D.; Zwick, U. Improved rounding techniques for the MAX 2-SAT and MAX DI-CUT problems. In Proceedings of the International Conference on Integer Programming and Combinatorial Optimization, Cambridge, MA, USA, 27–29 May 2002; Springer: Berlin, Germany, 2002; pp. 67–82. [Google Scholar]
- Karloff, H.; Zwick, U. A 7/8-approximation algorithm for MAX 3SAT? In Proceedings of the 38th Annual Symposium on Foundations of Computer Science, Miami Beach, FL, USA, 20–22 October 1997; pp. 406–415. [Google Scholar] [CrossRef]
- Kohli, R.; Krishnamurti, R.; Mirchandani, P. The minimum satisfiability problem. SIAM J. Discrete Math.
**1994**, 7, 275–283. [Google Scholar] [CrossRef] - Dinur, I.; Safra, S. The importance of being biased. In Proceedings of the 34th Annual ACM Symposium on the Theory of Computing, Montreal, ON, Canada, 19–21 May 2002; pp. 33–42. [Google Scholar]
- Avidor, A.; Zwick, U. Approximating MIN 2-SAT and MIN 3-SAT. Theor. Comput. Syst.
**2005**, 38, 329–345. [Google Scholar] [CrossRef] - Bertsimas, D.; Teo, C.; Vohra, R. On dependent randomized rounding algorithms. Oper. Res. Lett.
**1999**, 24, 105–114. [Google Scholar] [CrossRef] - Andersson, G.; Engebretsen, L. Better approximation algorithms for set splitting and Not-All-Equal SAT. Inform. Process. Lett.
**1998**, 65, 305–311. [Google Scholar] [CrossRef] - Zwick, U. Approximation algorithms for constraint satisfaction problems involving at most three variables per constraint. In Proceedings of the Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, San Francisco, CA, USA, 25–27 January 1998; pp. 201–210. [Google Scholar]
- Petrank, E. The hardness of approximation: Gap location. Comput. Complex.
**1994**, 4, 133–157. [Google Scholar] [CrossRef] - Zhang, J.; Ye, Y.; Han, Q. Improved approximations for max set splitting and max NAE SAT. Discrete Appl. Math.
**2004**, 142, 133–149. [Google Scholar] [CrossRef] - Lovász, L. Coverings and colorings of hypergraphs. In Proceedings of the Fourth Southeastern Conference on Combinatorics, Graph Theory, and Computing, Boca Raton, FL, USA, 5–8 March 1973; Utilitas Mathematica Publishing: Winnipeg, MB, Canada, 1973; pp. 3–12. [Google Scholar]
- Guruswami, V. Inapproximability results for set splitting and satisfiability problems with no mixed clauses. Algorithmica
**2004**, 38, 451–469. [Google Scholar] [CrossRef] - Bazgan, C.; Escoffier, B.; Paschos, V.T. Completeness in standard and differential approximation classes: Poly-(D) APX-and (D) PTAS-completeness. Theor. Comput. Sci.
**2005**, 339, 272–292. [Google Scholar] [CrossRef] - Boppana, R.; Halldórsson, M.M. Approximating maximum independent sets by excluding subgraphs. BIT Numer. Math.
**1992**, 32, 180–196. [Google Scholar] [CrossRef] - Zuckerman, D. Linear degree extractors and the inapproximability of max clique and chromatic number. In Proceedings of the Thirty-Eighth Annual ACM Symposium on Theory of Computing, Seattle, WA, USA, 21–23 May 2006; pp. 681–690. [Google Scholar]
- Karakostas, G. A better approximation ratio for the vertex cover problem. ACM Trans. Algorithms
**2009**, 5, 41. [Google Scholar] [CrossRef] - Dinur, I.; Safra, S. On the hardness of approximating minimum vertex cover. Ann. Math.
**2005**, 162, 439–485. [Google Scholar] [CrossRef] - Marathe, M.V.; Ravi, S. On approximation algorithms for the minimum satisfiability problem. Inform. Process. Lett.
**1996**, 58, 23–29. [Google Scholar] [CrossRef] - Hazan, E.; Safra, S.; Schwartz, O. On the complexity of approximating k-set packing. Comput. Complex.
**2006**, 15, 20–39. [Google Scholar] [CrossRef] - Halldórsson, M.M.; Kratochvıl, J.; Telle, J.A. Independent sets with domination constraints. Discrete Appl. Math.
**2000**, 99, 39–54. [Google Scholar] [CrossRef] - Johnson, D.S. Approximation algorithms for combinatorial problems. In Proceedings of the Fifth Annual ACM Symposium on Theory of Computing, Austin, TX, USA, 30 April–2 May 1973; pp. 38–49. [Google Scholar]
- Dinur, I.; Steurer, D. Analytical approach to parallel repetition. In Proceedings of the Forty-Sixth Annual ACM Symposium on Theory of Computing, New York, NY, USA, 31 May–3 June 2014; ACM: New York, NY, USA, 2014; pp. 624–633. [Google Scholar]
- Frieze, A.; Jerrum, M. Improved approximation algorithms for MAXk-CUT and MAX BISECTION. Algorithmica
**1997**, 18, 67–81. [Google Scholar] [CrossRef] - Krauthgamer, R.; Feige, U. A polylogarithmic approximation of the minimum bisection. SIAM Rev.
**2006**, 48, 99–130. [Google Scholar] [CrossRef] - Panconesi, A.; Ranjan, D. Quantifiers and approximation. In Proceedings of the 22nd Annual ACM Symposium on Theory of Computing, Baltimore, MD, USA, 13–17 May 1990; pp. 446–456. [Google Scholar]
- Halldórsson, M.M. Approximating Discrete Collections via Local Improvements. In Proceedings of the Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, San Francisco, CA, USA, 22–24 January 1995; pp. 160–169. [Google Scholar]
- Halldórsson, M.M. A still better performance guarantee for approximate graph coloring. Inform. Process. Lett.
**1993**, 45, 19–23. [Google Scholar] [CrossRef] - Nishizeki, T.; Kashiwagi, K. On the 1.1 edge-coloring of multigraphs. SIAM J. Discrete Math.
**1990**, 3, 391–410. [Google Scholar] [CrossRef] - Lund, C.; Yannakakis, M. On the hardness of approximating minimization problems. J. ACM
**1994**, 41, 960–981. [Google Scholar] [CrossRef] - Orponen, P.; Mannila, H. On Approximation Preserving Reductions: Complete Problems and Robust Measures (Revised Version). Available online: https://pdfs.semanticscholar.org/d7d4/44112250080800b25794352814e4f42ae0b0.pdf (accessed on 30 August 2017).
- Papadimitriou, C.H.; Yannakakis, M. The traveling salesman problem with distances one and two. Math. Oper. Res.
**1993**, 18, 1–11. [Google Scholar] [CrossRef] - Christofides, N. Worst-Case Analysis of a New Heuristic for the Travelling Salesman Problem; Technical Report, Management Sciences Research Group; Carnegie-Mellon Univ: Pittsburgh, PA, USA, 1976. [Google Scholar]
- Schaller, J.; Valente, J.M. Minimizing the weighted sum of squared tardiness on a single machine. Comput. Oper. Res.
**2012**, 39, 919–928. [Google Scholar] [CrossRef] - Cheng, T.E.; Ng, C.; Yuan, J.; Liu, Z. Single machine scheduling to minimize total weighted tardiness. Eur. J. Oper. Res.
**2005**, 165, 423–443. [Google Scholar] [CrossRef] - Lenstra, J.K.; Kan, A.R.; Brucker, P. Complexity of machine scheduling problems. Ann. Discrete Math.
**1977**, 1, 343–362. [Google Scholar] - Goemans, M.X.; Queyranne, M.; Schulz, A.S.; Skutella, M.; Wang, Y. Single machine scheduling with release dates. SIAM J. Discrete Math.
**2002**, 15, 165–192. [Google Scholar] [CrossRef]

**Figure 1.**The quantum alternating operator ansatz (QAOA${}_{p}$) quantum circuit schematic. Here, an encoding to qubits for a given problem domain is assumed. The box shows an example decomposition of a QAOA mixing operator family ${U}_{M}(\beta )$ into a sequence of partial mixers ${U}_{M,\alpha}(\beta )$. In this ansatz, a one-parameter family of mixing operators does not in general correspond to time evolution under a fixed mixing Hamiltonian ${H}_{M}$. The construction of this paper includes different orderings of the partial mixers, resulting in a variety of inequivalent mixing operators with different implementation costs. Though not shown in the figure, phase and mixing operators will often include ancilla qubits to facilitate computation and simple compilation to one- and two-qubit gates. The circuit shown indicates measurement at the end of the algorithm; in general, a quantum alternating operator ansatz circuit may be instead embedded as part of a larger quantum algorithm. Likewise, different initial states may be used which may be constructed by design or the output of another quantum subroutine.

**Figure 2.**Example: Quantum alternating operator ansatz mapping for Max-$\kappa $-ColorableSubgraph with $\kappa =3$ in the one-hot encoding. The 4-node graph on the left is mapped to 12 qubits on the right, one vertical layer for each color. The solid lines show pairs of qubits acted on by the phase operator, which checks if adjacent vertices have the same color. The dashed lines show the qubits acted on by the mixing operator, which mixes the possible colors of each vertex independently.

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Hadfield, S.; Wang, Z.; O’Gorman, B.; Rieffel, E.G.; Venturelli, D.; Biswas, R. From the Quantum Approximate Optimization Algorithm to a Quantum Alternating Operator Ansatz. *Algorithms* **2019**, *12*, 34.
https://doi.org/10.3390/a12020034

**AMA Style**

Hadfield S, Wang Z, O’Gorman B, Rieffel EG, Venturelli D, Biswas R. From the Quantum Approximate Optimization Algorithm to a Quantum Alternating Operator Ansatz. *Algorithms*. 2019; 12(2):34.
https://doi.org/10.3390/a12020034

**Chicago/Turabian Style**

Hadfield, Stuart, Zhihui Wang, Bryan O’Gorman, Eleanor G. Rieffel, Davide Venturelli, and Rupak Biswas. 2019. "From the Quantum Approximate Optimization Algorithm to a Quantum Alternating Operator Ansatz" *Algorithms* 12, no. 2: 34.
https://doi.org/10.3390/a12020034