Paper The following article is Open access

Amplitude amplification-inspired QAOA: improving the success probability for solving 3SAT

, , , and

Published 4 January 2024 © 2024 The Author(s). Published by IOP Publishing Ltd
, , Citation Alexander Mandl et al 2024 Quantum Sci. Technol. 9 015028 DOI 10.1088/2058-9565/ad141d

2058-9565/9/1/015028

Abstract

The Boolean satisfiability problem (SAT), in particular 3SAT with its bounded clause size, is a well-studied problem since a wide range of decision problems can be reduced to it. The Quantum Approximate Optimization Algorithm (QAOA) is a promising candidate for solving 3SAT for Noisy Intermediate-Scale Quantum devices in the near future due to its simple quantum ansatz. However, although QAOA generally exhibits a high approximation ratio, there are 3SAT problem instances where the algorithm's success probability when obtaining a satisfying variable assignment from the approximated solution drops sharply compared to the approximation ratio. To address this problem, in this paper, we present variants of the algorithm that are inspired by the amplitude amplification algorithm to improve the success probability for 3SAT. For this, (i) three amplitude amplification-inspired QAOA variants are introduced and implemented, (ii) the variants are experimentally compared with a standard QAOA implementation, and (iii) the impact on the success probability and ansatz complexity is analyzed. The experiment results show that an improvement in the success probability can be achieved with only a moderate increase in circuit complexity.

Export citation and abstract BibTeX RIS

Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 license. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.

1. Introduction

The Boolean satisfiability problem (SAT) is a well-studied decision problem in computer science [13]. A range of application scenarios from formal verification of hardware [4] to planning problems [1, 5] can be encoded as SAT instances. Due to its strict form and its limitation of clause size to three literals, often 3SAT is considered, because all SAT instances can be reduced to 3SAT in polynomial time [6]. Various solvers for 3SAT exist on classical computers. However, since 3SAT is NP-complete [7], these solvers have high runtime complexity in the worst case, and therefore several works are currently investigating the possibility of quantum algorithms for solving 3SAT [8, 9].

Quantum computing promises to speed up various applications. To implement 3SAT solvers, different quantum algorithms, such as amplitude amplification [10, 11] or variational approaches such as the quantum approximate optimization algorithm (QAOA) [12], have been employed. However, current noisy intermediate-scale quantum (NISQ) devices are characterized by a limited number of qubits and a high rate of gate errors [13]. This restricts the circuit size of quantum algorithms executable on current quantum hardware. Although amplitude amplification is optimal in its complexity for general unstructured search problems [14], the quantum circuit that is required to solve 3SAT for larger instances exceeds the limits imposed by the current NISQ devices.

As variational quantum algorithms such as QAOA generally require shallower circuits, they have the potential to be used for 3SAT on NISQ devices. Although QAOA was originally proposed as an algorithm for the MAX-CUT problem [12], it uses a cost function that can be adapted to the specific problem at hand. Thus, QAOA is applied to a broad range of optimization problems [12, 1517]. However, while in certain applications it was experimentally shown that QAOA obtains a set of solutions of robust approximation ratio [9], the optimization procedure tends to amplify suboptimal solutions [18]. Thus, the original implementation of QAOA might find wrong solutions for decision problems such as the 3SAT problem.

For general optimization problems, it has been experimentally demonstrated that the approximation ratio of QAOA can be improved by various adjustments to the algorithm. These include reformulations of the cost function [17, 19], the used mixing operator [16], or the parameter initialization strategy [2022]. Some of these adaptions [16, 23] further make use of concepts introduced in amplitude amplification algorithms such as Grover's search algorithm [10, 11, 24, 25] and variational adaptions thereof [8, 26]. Since 3SAT can also be formulated as unstructured search for satisfying assignments, adaptions that make use of concepts from amplitude amplification might improve the performance of QAOA for 3SAT as well. However, so far it has not been investigated whether an adapted QAOA algorithm can overcome the previously described problems of QAOA for solving 3SAT.

In this paper, we experimentally investigate if adapting QAOA using concepts from amplitude amplification improves the success probability for 3SAT (section 6.1) and evaluate how such adaptions influence the computational complexity of the ansatz (section 6.2). To this end, we implement three different variants of QAOA and compare them using randomly generated formulas.

The remainder of this paper is organized as follows: section 2 gives the required background on the 3SAT problem and presents QAOA and amplitude amplification. Section 3 covers how QAOA can be applied to solve 3SAT and highlights shortcomings of the algorithm which serve as the motivation for the paper. Section 4 presents the three different adapted QAOA variants that are evaluated by the experiments described in section 5. Section 6 highlights the results of the experiments and section 7 summarizes related approaches and optimizations of QAOA. The results are discussed regarding their applicability in building 3SAT solvers on quantum computers in section 8, before summarizing this work and presenting future research opportunities in section 9.

2. Background

In this section, first the SAT and 3SAT problem are introduced. It is followed by a brief description of QAOA. Since the adaptions of QAOA presented in section 4 make use of concepts of amplitude amplification, this algorithm is introduced at the end of this section.

2.1. Boolean satisfiability

As stated above, determining the satisfiability of Boolean formulas (SAT) is a well-studied problem since a wide range of decision problems can be reduced to instances of SAT. Especially the 3SAT variant of the problem is studied in the context of quantum algorithms due to its simple structure and convenient mapping to quantum circuits.

The 3SAT problem concerns propositional formulas $\phi = \bigwedge_{j = 1}^m c_j$ in conjunctive normal form. These formulas are composed of m clauses, each containing the disjunction of three literals: $c_j = \bigvee_{i = 1}^3 l_{i,j}$. Each literal $l_{i,j}$ is either an atomic variable ak from the set of Boolean variables $\{a_1, \dots a_n\}$ or its negation $\lnot a_k$. The literals are referred to as negative if its atomic variable is negated and as positive otherwise. To define solutions for 3SAT formulas, the following definition is required:

Definition (3SAT interpretation). An interpretation v is a function that assigns 1 or 0 to 3SAT formulas according to the following rules:

  • For an atom ak : $v(a_k) = 0$ or $v(a_k) = 1$.
  • For a literal $l_{i,j}$ containing the atom ak : $v(l_{i,j}) = v(a_k)$ if the literal is positive and $v(l_{i,j}) = 1 - v(a_k)$ if the literal is negative.
  • For a clause cj : $v(c_j) = 1$ iff for one of its literals $v(l_{i,j}) = 1$ holds, and $v(c_j) = 0$ otherwise.
  • For a 3SAT formula φ: $v(\phi) = \prod_{j = 1}^m v(c_j)$.

An interpretation represents the evaluation of a formula to the truth values true and false. Since the assignment of truth values to atomic variables can be represented as a binary vector, we generally refer to an interpretation v by its variable assignment $\vec{x} = (x_1, \dots, x_n) = (v(a_1), \dots, v(a_n))$. The evaluation of the formula according to this variable assignment is then denoted as

Equation (1)

Using this evaluation, the 3SAT problem is given as:

Definition (3SAT problem). The input is a 3SAT formula φ. The goal is to decide whether there exists a variable assignment $\vec{x}$ such that $\phi(\vec{x}) = 1$. Such a satisfying interpretation is referred to as a model.

Although only the question of the satisfiability of given formulas is of interest for this decision problem, a satisfying variable assignment $\vec{x}$ can usually be obtained from 3SAT solvers for satisfiable instances.

The 3SAT problem is one of the prime examples of NP-complete problems. Possible improvements in the computing time and the solution quality when solving 3SAT by using quantum algorithms directly improve existing algorithms that make use of a 3SAT solver as a subroutine. For example, any speedup in solving satisfiability problems on a quantum computer can be leveraged to provide an algorithm for factoring integers that outperforms the classical Number Field Sieve [27].

Many studies were conducted to classify the computational resources required to solve instances of the 3SAT problem depending on specific properties of the input formulas [2, 3, 28]. One of these properties is the satisfiability probability. This is the probability that there exists a satisfying variable assignment for a random 3SAT formula. This satisfiability probability is closely linked to the clause-to-variable-ratio of randomly generated 3SAT formulas [28, 29]. Figure 1 shows the satisfiability probability for randomly generated formulas with a fixed number of variables n and a varying clause-to-variable ratio $\alpha = m/n$. The figure shows that the satisfiability probability decreases sharply around a clause-to-variable ratio $\alpha^{^{\prime}} \approx 4.2$ [2931]. In this so-called phase transition region, problem instances change from formulas with a small number of clauses, which are satisfiable with high probability, to very constrained formulas that are almost certainly unsatisfiable. This change in satisfiability probability affects the runtime complexity of SAT solvers. For formulas near the phase transition, the time required to solve them generally increases. This phenomenon was experimentally shown by examining the computing time required for backtracking search-based solvers [28], the Davis-Putnam procedure [30], and similar algorithms [31]. Moreover, it has also been observed that the phase transition affects quantum algorithms for 3SAT. For formulas in the phase transition region, the probability that satisfying variable assignments are obtained decreases [9, 32]. Since the hardest instances for the 3SAT problem are concentrated near the phase transition region, this classification supports finding appropriate problem instances for testing and verifying newly devised 3SAT solving algorithms. As such, the clause-to-variable ratio is also used to classify the inputs for the experiments shown in section 5.

Figure 1.

Figure 1. The proportion of satisfiable formulas for randomly generated 3SAT instances, which serves as an indication of the phase transition in the satisfiability probability. The points at each line mark the interpolated point where this proportion reaches $50\%$. As the number of variables n increases, the points approach a clause-to-variable ratio of $\alpha^{^{\prime}} \approx 4.2$ as indicated by the dotted line.

Standard image High-resolution image

A common characteristic to measure the quality of quantum algorithms solving 3SAT is the success probability for randomly generated formulas. It describes the probability that the decision (satisfiable or unsatisfiable) that is obtained by an algorithm for a formula of a specific clause-to-variable ratio is correct. This value will also be used in this work to inspect the performance of the proposed variants.

Another variant of the SAT problem is the MAX-3SAT problem, which formulates 3SAT as an optimization problem. This problem seeks to not specifically find a variable assignment $\vec{x}$ that satisfies the overall formula φ, but it aims to give assignments that maximize the number of satisfied 3SAT clauses. These assignments can serve, for example, as heuristics for planning problems [5].

Using the notation from equation (1), the goal of MAX-3SAT is to minimize the cost function

Equation (2)

which counts the number of unsatisfied clauses in a given formula containing m clauses. In contrast to the success probability that is used to evaluate algorithms solving 3SAT, for optimization algorithms such as MAX-3SAT, the approximation ratio is evaluated. This is the ratio between the number of clauses that are satisfied by a variable assignment that is obtained from an optimization algorithm and the number of clauses that are satisfied in an optimal assignment. For a given 3SAT formula φ, any optimal assignment for the MAX-3SAT problem satisfies $m_{opt} \unicode{x2A7D} m$ clauses. If φ is not satisfiable, $m_{opt} \lt m$ holds. For an arbitrary variable assignment $\vec{x}$ that satisfies $m_{\vec{x}}$ clauses, the approximation ratio is given as $m_{\vec{x}}/m_{opt}$. Currently, a lot of research in the field of quantum algorithms focuses on improving the approximation ratio for optimization problems such as MAX-3SAT using a quantum computer. One of the algorithms that are applied to achieve this goal is QAOA.

2.2. The QAOA

The QAOA is a variational quantum algorithm designed to solve combinatorial optimization problems and was first proposed as a quantum solution for the MAX-CUT problem [12]. This algorithm uses an ansatz that is modeled for the specific problem at hand. This allows it to also be extended to other problems, including some commonly known NP-complete problems [33].

At its core, QAOA aims to find the states with minimal eigenvalue of a given Hamiltonian HC , which encodes the cost function $C : \{0,1\}^n \rightarrow \mathbb{R}$ associated with a combinatorial optimization problem. For a solution candidate given by the binary vector $\vec{x} \in \{0,1\}^n$, HC encodes the cost of this solution in its eigenvalues as

Equation (3)

Therefore, the eigenvalues are minimal for optimal solutions with respect to $C(\vec{x})$. The ansatz consists of a circuit preparing an initial state, followed by p repetitions that alternately apply the phase-separation operator $U(H_C,\gamma_i) = e^{-i\gamma_i H_C}$ and the mixer circuit $U(H_B, \beta_i) = e^{-i \beta_i H_B}$. The phase-separation circuit introduces a phase $e^{-i \gamma_i C(\vec{x})} \vert \vec{x}\rangle$ that encodes the cost of each solution candidate $\vert \vec{x}\rangle$. Since the introduced coefficient is a complex number of unit length, it does not influence the measurement probability of the individual solution candidates. Thus, the mixer circuit is used to translate the introduced phase into an adjustment of the measurement probability of the solution candidates. The unitary operations $U(H_C,\gamma_i)$ and $U(H_B,\beta_i)$ are parameterized by the real-valued vectors $\vec{\gamma} = (\gamma_1, \dots, \gamma_p)$ and $\vec{\beta} = (\beta_1, \dots, \beta_p)$. Applying this procedure to the initial state $\vert +\rangle^{\otimes n}$ takes the quantum system to the parameterized state

Equation (4)

with the mixer Hamiltonian given as $H_B = \sum_{i = 1}^n X_i$, which is often referred to as the transverse-field mixer [19].

By executing the described quantum circuit, a set of binary vectors representing solution candidates to the optimization problem is sampled and their average cost is calculated. In the variational loop, a classical optimizer is used to find optimal parameters $\vec{\gamma}^*, \vec{\beta}^*$ such that the expected cost of the measured solutions is minimized. In other words, the algorithm computes

Equation (5)

Using the optimal parameters $\vec{\gamma}^*, \vec{\beta}^*$ that are found by the classical optimizer, a set of solutions that approximately minimizes the problem cost function $C(\vec{x})$ can be measured. Assuming that the number of repetitions p of $U(H_B, \beta_i)$ and $U(H_C, \gamma_i)$, is sufficiently large, such a set of solutions should be found [12]. However, although estimates of the algorithm's performance exist for some problem classes [12, 34], determining the required p for arbitrary problem instances is still an actively studied question. This value is also referred to as the $QAOA depth$ of the ansatz as it directly influences the circuit depth of the executed quantum circuit.

2.3. Amplitude amplification

Grover's algorithm [11], the first algorithm making use of the concept of amplitude amplification, performs unstructured search for a unique solution state identified by an oracle on a quantum computer. It speeds up this process relative to classical unstructured search by requiring $O(\sqrt{N})$ evaluations of the oracle as opposed to O(N) on a classical computer for a search space containing N elements [11]. It further was shown that this algorithm is optimal in its runtime complexity up to a constant factor for unstructured search problems [14]. The idea behind this process is generalized to problems with multiple solution states in the amplitude amplification algorithm [10].

Similar to the phase-separation operator in QAOA, amplitude amplification requires an oracle that manipulates the phase of a state based on its membership in the set of solutions. Given some Boolean indicator function $f: \{0,1\}^n \to \{0,1\}$, the Grover oracle, sometimes referred to as the phase-flip oracle, maps each candidate state $\vert \vec{x}\rangle$ to $(-1)^{f(\vec{x})}\vert \vec{x}\rangle$. To translate this change in phase into a measurable amplification of the amplitude of a solution state, the Grover diffusion operator $2\vert +\rangle\langle +\vert^{\otimes n} - I^{\otimes n}$ is used [35]. This process is repeatedly applied to the starting state $\vert +\rangle^{\otimes n}$, which represents the superposition of all solution candidates in an unconstrained search space. Depending on the size of the set of solutions and the size of the search space, a fixed limit can be specified for the number of applications of the oracle and the diffusion operator before the desired solution states are measured with certainty [10, 35].

Solution candidates for problems in NP, such as 3SAT, can be verified in polynomial time classically and therefore can also be verified using a polynomial-size quantum circuit [35]. Thus, a general unstructured search algorithm such as amplitude amplification is predestined to solve satisfiability problems. For the 3SAT problem, a solution candidate is a variable assignment represented by a bitstring $\vec{x} \in \{0,1\}^n$. The purpose of the phase oracle is then to mark assignments in the superposition of variable assignments if and only if they satisfy a given formula.

3. Motivation and research questions

The drawback of amplitude amplification algorithms for current NISQ devices is its requirement for deep quantum circuits. Due to QAOA's shallower quantum circuits, the potential of applying QAOA to the 3SAT problem is actively studied. However, since QAOA is an optimization algorithm, currently only the optimization variant of 3SAT called MAX-3SAT, is considered [8, 9]. For applying QAOA to MAX-3SAT, the cost function in equation (2) is encoded in a cost Hamiltonian Hφ . There are various formulations of this Hamiltonian [33, 3639], with some focusing on reducing the number of operations required when implementing this cost function in the phase-separation operator. The formulations generally describe the cost Hamiltonian as a sum of clause operators

Equation (6)

Each $H_{C_j}$ increases the eigenvalue of the variable assignments that do not satisfy the jth clause. These clause operators are expressed as

Equation (7)

In this equation, $p_{i,j}$ describes the polarity of the literal $l_{i,j}$ in the jth clause with $p_{i,j} = 1$ for positive literals and $p_{i,j} = -1$ for negative literals. Furthermore, the expression $Z_{a_{i,j}}$ describes that the Pauli operator Z is applied to the qubit representing the atom of literal $l_{i,j}$. Depending on the polarity of the literal $l_{i,j}$, the individual factors in equation (7) have eigenvalue 0 if the literal is satisfied by the variable assignment. The factors have eigenvalue 2 if the literal is not satisfied. Thus, if at least one literal in the disjunction is satisfied, the clause operator $H_{C_j}$ has eigenvalue 0 for this variable assignment. By using QAOA to find the states with minimal eigenvalue for the cost Hamiltonian Hφ , the algorithm will therefore find variable assignments that have eigenvalue 0 for as many clause operators $H_{C_j}$ as possible. Thus, this variable assignment maximizes the number of satisfied clauses, which solves the MAX-3SAT problem. For details on how this cost operator is implemented as a quantum circuit see appendix A.

To extend this algorithm for MAX-3SAT to solve the decision problem 3SAT, recent works focus on using the variable assignments that are obtained for MAX-3SAT and inferring whether they satisfy the given input [8, 9]. This is achieved by evaluating the formula classically using the sampled solutions.

Using experimental evaluations, it was found that QAOA exhibits a good approximation ratio for MAX-3SAT [9]. However, by reasoning from the approximated solution of the MAX-3SAT problem, incorrect solutions are often obtained for the 3SAT decision problem. Considering a satisfiable 3SAT formula in conjunctive normal form, a measured variable assignment satisfying 99% of the given clauses would be a respectable result for an algorithm approximating the MAX-3SAT problem. However, this would be evaluated to the wrong result of unsatifiable for the decision problem variant. Similar observations were made by Bennett and Wang [18]. In their work, they found that the quantum walk optimization algorithm (QWOA), a generalization of QAOA, tends to amplify suboptimal solutions to increase the approximation ratio as they are more numerous than optimal solutions. Thus, the standard QAOA implementation leaves room for improvement when applied to 3SAT.

Therefore, the objective of this work is to exploit the advantages of amplitude amplification to improve the success probability of the QAOA for 3SAT. Thus, we formulate the following research questions:

  • RQ1: can mechanisms found in amplitude amplification be used to improve the success probability of QAOA for the 3SAT problem?

  • RQ2: how does adapting the QAOA ansatz using concepts from amplitude amplification influence the computational complexity of the ansatz?

4. Amplitude amplification-inspired QAOA variants

To answer the research questions, we examine and experimentally compare three different variants of QAOA that make use of ideas employed in amplitude amplification to improve the success probability for the 3SAT problem. We present the adaptions as a gradual reformulation of QAOA until it almost matches the amplitude amplification algorithm. Figure 2 gives an overview of standard QAOA and the proposed adaptions we implement for the experiments in section 5:

  • Variant 1: an adaption of QAOA that optimizes using a binary cost function.
  • Variant 2: an extension of Variant 1, where the parameters $\vec{\gamma}$ are fixed to $\gamma_i = \pi$. The classical optimization step will only optimize the mixer parameters $\vec{\beta}$.
  • Variant 3: an extension of Variant 2, that employs the Grover mixer.

Figure 2.

Figure 2. A schematic overview of the three different variants of QAOA implemented in this work and the standard QAOA implementation for MAX-3SAT. The adaptions applied to the standard QAOA implementation for the MAX-3SAT problem are highlighted.

Standard image High-resolution image

In the following, these variants of QAOA are explained in detail.

4.1.  Variant 1: cost function and phase-separation operator

Variant 1 applies an adapted binary cost function. To guide the approximation algorithm away from amplifying suboptimal solutions, this function penalizes all but optimal solutions equally. Given some 3SAT formula φ, this objective function $\widetilde{C_{\phi}}(\vec{x})$ is given as

Equation (8)

where $\phi(\vec{x}) = 1$ represents that the formula φ evaluates to true given the variable assignment $\vec{x}$ and $\phi(\vec{x}) = 0$ represents that the formula evaluates to false. Similarly, the corresponding cost Hamiltonian $\widetilde{H_{\phi}}$ has eigenvalue 1 for quantum states $\vert \vec{x}\rangle$ representing unsatisfying assignments and eigenvalue 0 for satisfying assignments. The expected cost $\langle \vec{\gamma}, \vec{\beta}|\widetilde{H_{\phi}}|\vec{\gamma}, \vec{\beta}\rangle$ approximated by QAOA using this operator can therefore be seen as the proportion of unsatisfying assignments that are measured at the end of the circuit.

We implement the phase-separation operator for QAOA based on this cost function by reusing existing techniques for oracle synthesis [40]. We first present the general approach that is used to extend a bit-flip oracle to a phase-separation operator as it is used for our experiments. A general bit-flip oracle for a given function $f: \{0,1\}^n \to \{0,1\}$ is defined as

Equation (9)

Thus, it encodes the result $f(\vec{x})$ by negating an ancilla qubit. This qubit can further be used to manipulate the phase of the examined quantum state as it is required in QAOA.

We perform this extension by noting that the required phase-separation operator $U(H_C, \gamma)$ takes $\vert \vec{x}\rangle$ to $e^{-i\gamma C(\vec{x})} \vert \vec{x}\rangle$ for a given assignment of combinatorial variables $\vec{x}$ and an arbitrary objective function. Assuming the cost function is binary and given as $C(\vec{x}) \in \{0,1\}$, this exact operation can also be performed using a bit-flip oracle, by applying the phase gate $P(-\gamma)$ before uncomputing:

Equation (10)

For the 3SAT problem, the cost function $\widetilde{C_{\phi}}(\vec{x})$ in equation (8) is binary. We therefore perform the process in equation (10) using an oracle circuit Fφ that flips the ancilla qubit if the given formula is satisfied. To obtain a phase-separation operator that matches $U(\widetilde{H_\phi}, \gamma)$ and only introduces the phase if the formula is not satisfied, the ancilla qubit is negated before the oracle is applied.

4.2.  Variant 2: phase-flip oracle

With the adaption of Variant 1, first parts of amplitude amplification were incorporated into QAOA: the phase-separation operator based on a bit-flip oracle as presented above can be seen as a phase-flip oracle with an additional degree of freedom represented by the parameter γ. By fixing $\gamma = \pi$, the phase-flip oracle is obtained since $e^{-i \pi C(\vec{x})}\vert \vec{x}\rangle = (-1)^{C(\vec{x})}\vert \vec{x}\rangle$. Additionally, fixing this parameter simplifies the optimization loop, since then only the optimization over the mixer parameters $\vec{\beta}$ remains. We therefore evaluate the variant with the parameter γ fixed to $\gamma = \pi$ as Variant 2 in our experiments.

4.3.  Variant 3: mixer and grover diffusion

Similar to QAOA, amplitude amplification can be described as the repeated application of a gate that encodes a cost function (the phase-flip oracle) and a mixing gate (in the context of amplitude amplification referred to as the diffusion operator). The similarity between the phase-flip oracle and QAOA's phase-separation operator has already been sketched in section 4.2. In Variant 3, we further adapt QAOA by using the Grover mixer (GM-QAOA [16]), which closely resembles the diffusion operator in amplitude amplification.

Instead of the usual mixing Hamiltonian as presented in section 2.2, the general Grover mixer uses the Hamiltonian $H_F = \vert F\rangle\langle F\vert$, where F is a set of feasible solution states and $\vert F\rangle$ is the equally weighted superposition of these states [16]. Since for 3SAT, the objective function decides whether a solution is feasible, the set F is assumed to be all possible n qubit binary strings representing assignments of n Boolean variables. This implies $\vert F\rangle = \vert +\rangle^{\otimes n}$ and results in the mixing Hamiltonian $H_G = \vert +\rangle\langle +\vert^{\otimes n}$.

By applying the reformulation of the resulting mixing unitary as presented in [16], it is possible to show how this gate can be implemented as a quantum circuit. In the following equations, we omit the register size n to aid readability. Using the infinite sum for the matrix exponential, the mixing unitary is reformulated as

Equation (11a)

Equation (11b)

For k = 0, the matrix on the right-hand side reduces to $\left(\vert +\rangle\langle +\vert\right)^0 = I$. Furthermore since $\left(\vert +\rangle\langle +\vert\right)^2 = \vert +\rangle\langle +|+\rangle\langle +\vert = \vert +\rangle\langle +\vert$, this matrix is idempotent. Therefore, $\left(\vert +\rangle\langle +\vert\right)^k = \vert +\rangle\langle +\vert$ is used for k > 1 in equation (11b ) to give

Equation (12a)

Equation (12b)

Equation (12c)

Equation (12d)

Equation (12e)

where $\mathit{CP}_{n}(-\beta)$ is the phase-shift gate on the nth qubit, which is controlled by the other n − 1 qubits. Therefore, the Grover mixer can be built using two layers of Hadamard and X gates and a controlled phase shift gate, resulting in the quantum circuit in figure 3. Equation (12b ) further highlights the relationship between the Grover mixer and the diffusion operator. It shows that by setting $\beta = \pi$, the Grover mixer is equal to the diffusion operator $2\vert +\rangle\langle +\vert - I$ up to a global phase, which gives the justification for its name.

Figure 3.

Figure 3. The quantum circuit for the Grover mixer [16] with the mixing Hamiltonian $H_G = \vert +\rangle\langle +\vert^{\otimes n}$.

Standard image High-resolution image

5. Experiment setup

To answer RQ1, we implement the presented variants of QAOA using Qiskit and evaluate their success probability when solving 3SAT. For this evaluation, we use Qiskit's simulator to obtain noise-free results. This section describes both the inputs for these experiments and the evaluation of the results in detail. We further implement and execute this experiment for an unmodified 3SAT solver based on QAOA for the MAX-3SAT problem as described in section 3 as a baseline. To further evaluate how the QAOA depth influences the success probability of each variant, all experiments are executed for $p \in \{2,4,6,8,10\}$. For each variant and each selected QAOA depth, a set of 3SAT formulas is generated and the proportion of successful executions of the variants on these inputs is computed. There is a tradeoff between the used instance sizes and the computation time that is required for the simulation. We therefore keep the number of variables at n = 10. To be able to study the effect of the 3SAT phase transition on the success probability, we evaluate formulas of clause-to-variable ratio $1.5 \unicode{x2A7D} \alpha \unicode{x2A7D} 8$. This way, formulas on both sides of the phase transition region at α ≈ 4.2 are included. Thus, for each number of clauses m between m = 15 and m = 80, 400 3SAT instances are evaluated by executing the process shown in figure 4.

Figure 4.

Figure 4. Experiment setup to approximate success probability. This experiment is executed for Variant 1–3 as well as the baseline implementation.

Standard image High-resolution image

In Step 1 of the experiment, a 3SAT formula is randomly generated. Its clauses are composed by picking three of the n = 10 available atomic variables with repetition. The variables are added to the overall disjunction as positive or negative literals with equal probability. In Step 2 and Step 3, the quantum algorithm is executed. The parameters are initialized and then optimized in the variational loop. As the classical optimizer for this experiment, we choose the implementation of the linear approximation-based optimizer COBYLA, provided in SciPy [41]. This optimizer was found to be preferable in low-noise scenarios [42], which is preferrable since we simulate the quantum circuits without noise.

For Variant 1–3, the variational loop finds values for the parameters $\vec{\gamma}^*$ and $\vec{\beta}^*$ (or only $\vec{\beta}^*$ for Variant 2 and Variant 3 respectively) that minimize the expected value of the cost function $\widetilde{C_{\phi}}(\vec{x})$ from equation (8). For the baseline implementation, Step 3 minimizes $C_{\phi}(\vec{x})$ from equation (2). The ansatz is then executed again using these optimized parameters in Step 4 to measure a set of variable assignments in Step 5. From these measurements, the decision (satisfiable or unsatisfiable) for the 3SAT problem instance is obtained in Step 6. The input formula is deemed satisfiable if and only if

Equation (13)

In other words, if the measurement using the optimal parameters produces at least one satisfying assignment, the formula is satisfiable. It decides the contrary if no such solution is found. Finally, in Step 7 the exact decision for the given input is calculated classically. We use the classical solver PySAT [43] for this purpose. Based on this result, one execution of the algorithm is deemed successful in Step 8 if the decision of the studied variant matches the decision obtained by the classical 3SAT solver.

The presented variants of QAOA employ rather computationally expensive oracles and mixers. The number of operations in the quantum circuits is too large to be executed on current devices for n = 10. Thus, we perform the experiments using Qiskit's built-in simulation capabilities. The quantum ansatz circuits that are implemented for each variant are described in appendix B. For simplicity, these circuits use the classical function compiler in Qiskit, which makes use of tweedledum [40] to obtain the required bit-flip oracles for Variant 1–3. To obtain the measurements for the baseline implementation we use Qiskit's built-in QAOA implementation [44]. Although the baseline implementation optimizes with respect to the function Cφ , the final decision in Step 6 is still computed using $\widetilde{C_{\phi}}$ as for Variant 1–3. This allows us to compare the results using the same metric although different operators are optimized.

To further investigate the influence of the used optimizer on the success probability, we extend this evaluation by comparing different optimization procedures. We compare the optimizer that is used in this work (COBYLA) to different optimizers that are used in related works concerning variational quantum algorithms [9, 45, 46]: the limited memory BFGS method [47] and the simultaneous perturbation stochastic approximation (SPSA) algorithm [48]. For this comparison, we investigate the success probability of the baseline implementation and Variant 1–3 using formulas of clause-to-variable ratio α = 4.5. This value is chosen since our initial experiments found that formulas of this clause-to-variable ratio experience the lowest success probability for n = 10. Lastly, the initial set of parameters that are chosen for the optimization (see Step 2) might influence the success probability of the inspected variants. Therefore, we also investigate the case where the optimization procedure is repeated five times with different sets of initial parameters and the result with the lowest cost is selected.

6. Experiment results

The results of the conducted experiments were analyzed in order to answer the research questions of this paper. The experiments have shown that the adaptions of QAOA presented in this paper influence the success probability positively (RQ1), but also increase the complexity of the quantum circuits (RQ2). The results are presented in detail below.

6.1. Effect on the success probability

We first present the success probability of the different QAOA variants in our experiments. The implementations used for these experiments and the obtained experimental data are available online.

6.1.1. Comparison of QAOA variants

Figure 5 shows the average success probability of Variant 1–3 as well as the baseline implementation. These numbers were obtained by computing the proportion of successful executions of the process in figure 4 over the whole range $[1.5, 8.0]$ of examined clause-to-variable ratios. Figure 5 shows that the rewrite of the cost function to encode the decision problem in the phase-separation operator (Variant 1) alone only slightly improves the success probability for 3SAT when higher depth ansätze of p = 8 and p = 10 are used. Our experiments even suggest that the variational optimization of the parameters $\vec{\gamma}$ is not necessary: Variant 2 exhibits a higher success probability for p = 8 and p = 10 than both, Variant 1 and the baseline implementation. Finally, the introduction of the Grover mixer in Variant 3 has the most noticeable positive effect on the success probability as it improves the success probability to at least 0.94 even for the smallest studied depth p = 2. The error bars in figure 5 give an indication of the spread of the success probabilities when the clause-to-variable ratio is varied. The decrease in error for Variant 3 for all QAOA depths p indicates that, in addition to the increase in average success probability, also the results obtained for the hardest instances are improved.

Figure 5.

Figure 5. The success probability of the examined 3SAT solver variants for the examined QAOA depths p, over the range $[1.5, 8.0]$ of clause-to-variable ratios. The error bars show the standard deviation from the average success probability.

Standard image High-resolution image

This improvement is further highlighted in figure 6. This plot shows the obtained success probability of the presented variants for each examined clause-to-variable ratio of the inputs. Thus, it gives an indication of the dependence of the results on the satisfiability probability and its phase transition. The satisfiability probability of these inputs is computed classically and is shown as a dotted line in each subplot. For all variants, the plot shows that the hardest instances for QAOA concentrate near the phase transition region. The success probability decreases for problem instances between α = 4 and α = 5. However, figure 6(c) shows that Variant 3 is the least affected by this phenomenon. Even for the hardest instances in the phase transition region, the success probability only decreases to 0.8 for the shallowest circuits of QAOA depth p = 2.

Figure 6.

Figure 6. The success probability for the examined variants for n = 10 variables. The probability is shown for differing clause-to-variable ratio α and various depths p.

Standard image High-resolution image

6.1.2. Comparison of optimizers

The improvement obtained by Variant 2 suggests that the optimization procedure is a limiting factor in the performance of the algorithm. Because Variant 2 omits half of the variational parameters by using the phase-flip oracle from amplitude amplification, it overcomes this limitation to some extent. Using the ansatz from Variant 2, the optimizer needs to optimize a smaller set of parameters, which improves the success probability.

We further evaluate the possible dependence of these findings on the optimization procedure by comparing different optimizers. Figure 7 shows the average success probability for the COBYLA, BFGS, and SPSA optimizers for formulas with clause-to-variable ratio α = 4.5. Figures 7(b) and (c) show that the findings also hold up for different optimizers: For p > 2, the success probability for Variant 1–3 is higher than that of the baseline implementation. Furthermore, figure 7 shows that SPSA obtains a higher success probability than both COBYLA and BFGS for this experiment.

Figure 7.

Figure 7. The success probability for the examined variants for the optimizers COBYLA, BFGS and SPSA and for different QAOA depths p and 3SAT formulas with α = 4.5.

Standard image High-resolution image

Lastly, figure 8 compares the success probability of the different variants and of the baseline implementation when the optimization loop is repeated with different sets of randomly generated initial parameters. The baseline implementation even outperforms the examined variants for p = 2 and the COBYLA optimizer (see figure 8(a)). However, already for p = 4, its success probability decreases. This suggests that the ansatz that is used in the baseline implementation is expressible enough such that 3SAT can be solved with high success probability. However, the chance of finding parameters that minimize the cost function for the baseline implementation depends on the initial set of parameters. With five repetitions, as it is done in figure 8, the chance to choose initial parameters that simplify the optimization step increases.

Figure 8.

Figure 8. The success probability for the examined variants for 3SAT formulas with α = 4.5 when using five random initial points for optimization and selecting the best result.

Standard image High-resolution image

Although the success probability for $Variant 1-3$ also increases when multiple optimization rounds are used (figure 8), the success probability for Variant 1–3 is less affected by the initial set of parameters. It is already greater than 0.75 for the COBYLA optimizer and p = 8 even with only a single round of optimization (figure 7(a)).

6.2. Effect on ansatz complexity

Although the examined changes to QAOA improve the success probability for the 3SAT problem, some of these adaptions come with an increase in time complexity as measured by their circuit depth and with an increase in the number of required qubits. Compared to the used bit-flip oracles for the 3SAT problem in Variant 1–3, the phase-separation operator required for the baseline MAX-3SAT ansatz can be constructed with linear depth using rotations with at most three-qubit interactions (see appendix A for details). Overall, in conjunction with the constant depth transverse-field mixer circuit, this results in the circuit depth O(pm) for a formula with m clauses and QAOA depth p.

The ansatz circuits for Variant 1–3 are explained in appendix B and their complexity is analyzed in the following. The adapted phase-separation circuit that is used in Variant 1–3 makes use of a bit-flip oracle Fφ (see section 4.1). Apart from a single-qubit phase gate, Fφ is applied twice in the phase-separation circuit. Thus, the phase-separation circuit has circuit depth $O(D_{F_\phi}(m))$, where $D_{F_\phi}(m)$ refers to the circuit depth of the bit-flip oracle.

Since Variant 1 and Variant 2 use the constant depth transverse-field mixer, this results in ansatz depth $O(pD_{F_\phi}(m))$ for these variants. Variant 3 uses the Grover mixer $U(H_G, \beta)$ that is explained in section 4.3. This circuit is composed of two layers of Hadamard gates and X gates of constant depth and one n-qubit controlled phase gate. The controlled phase gate can be implemented in depth O(n) (see theorem 2 in [16]). Thus, the circuit depth of $Variant~3$ is in $O(p(D_{F_\phi}(m) + n))$.

Therefore, the circuit depth of the variants presented in this work depends on the circuit depth $D_{F_\phi}(m)$ of the synthesized bit-flip oracle. The most straightforward approach to obtaining a bit-flip oracle for the 3SAT problem is by using ancilla qubits to store the evaluation result of each clause. This result is obtained using single-qubit negation and controlled negation gates using three control qubits. The evaluation result for the overall formula is then obtained using another CNOT gate that is controlled by all m ancilla qubits. Barenco et al [49] show how such a gate can generally be constructed using a linear number of Toffoli gates and ancilla qubits. There are further implementations of this controlled negation that, although they use more operations in total, require no ancilla qubits and have the same asymptotic complexity [50]. Furthermore, there are more sophisticated approaches to constructing the bit-flip oracle for satisfiability problems using fewer ancilla qubits [5154], but they still require a nonconstant number of ancilla qubits.

To summarize, although the results show that the success probability can be improved, this improvement comes with the tradeoff of increased circuit complexity. However, the experiments suggest that the presented variants are nevertheless useful adaptions. Especially Variant 1 and Variant 2 increase the success probability using only the relatively cheap adaption for the phase-separation operator.

7. Related work

The performance of the baseline implementation of QAOA for MAX-3SAT, when applied to the 3SAT problem, was extensively studied by Zhang et al [9]. Their examination shows that the phase transition in the satisfiability probability impacts the success probability for the MAX-3SAT problem among other related problems. Their implementation contrasts the experiments performed in this paper since they make use of an incremental initialization strategy for the variational parameters and select the best result after multiple executions of the optimizer.

There are a number of works that adapt the QAOA ansatz to improve its solution quality for various problems. Among other things, these adaptions concern the preparation of the initial state, the phase separator, or the mixer. In the following, we present a selection of these variants of QAOA and table 1 gives an overview of the components that are adapted in the respective algorithms.

Table 1. Overview of adaptions to the ansatz circuit, relative to the standard QAOA ansatz, in the variants in this work and in the variants presented in this section 7.

MethodAdapts initial stateAdapts phase separatorAdapts mixer
Variant 1   
Variant 2   
Variant 3  
Transverse-field Grover search [19]  
MAOA [18]
ma-QAOA [55] 
GM-QAOA [16]  
Th-QAOA [17]  
GM-Th-QAOA [17] 
XY-QAOA [56] 
XQAOA [57]  
FAM-QAOA [58]  
RQAOA [59]  

The modified phase-separation operator in Variant 1 has also been employed in a similar way by Jiang et al [19]. They also use a cost Hamiltonian that solely distinguishes satisfying states from unsatisfying states. In contrast to our work, they use it to solve a problem more closely related to Grover's original formulation, where there is only one possible solution state that should be amplified. Furthermore, they make use of the transverse-field mixer and fix its parameter β to π.

To tackle the problem of variational quantum algorithms amplifying suboptimal solutions, Bennett and Wang [18] employ a similar adaption to Variant 1 to the more general framework of the QWOA. They present the maximum amplification optimization algorithm (MAOA) and apply it to combinatorial optimization problems. They use a similar distinction between good and bad solutions to classify the elements in the set of feasible solutions into ones meeting a certain threshold for the cost function and those that do not. They further show that the variational optimization process can be eliminated as the maximal amplification of the solutions state is obtained by a known set of parameters.

In contrast to the above adaptions that change how the problem is encoded as a cost Hamiltonian, there are other approaches that adapt how this Hamiltonian is translated into a quantum circuit. Instead of using one variational parameter to parameterize each application of the cost Hamiltonian, Herrman et al [55] use one parameter for each of the summands of this operator, i.e. each of the summands in equation (6). They find that this adaption can result in a reduction in the required ansatz depth.

In Variant 3, the Grover mixer is introduced, which closely follows the diffusion operator used in amplitude amplification. This operation is essential to the variational reformulation of the Grover search algorithm [8, 26] and is further used in [16], who study the application of QAOA using this mixer on a range of optimization problems. They, however, focus on using this mixer on constrained optimization problems, where the set of feasible states is only a subset of the set of all possible states that are examined in our experiments.

Another approach that is closely related to Variant 3 is Threshold QAOA (Th-QAOA) [17]. Herein, the objective function is replaced by a similar operator based on a threshold. It is applied to optimization problems and distinguishes states with a cost larger than the given threshold from states with less or equal cost. They further combine this phase-separation operator with the Grover mixer [16] (GM-Th-QAOA) and evaluate the approximation ratio for different optimization tasks. They show that their approach consistently outperforms the standard QAOA using the Grover mixer.

There are other variants of QAOA that extend or adapt the mixer. These include variants that incorporate restrictions on the feasible subset of solutions (such as XY-QAOA [56]), which further also adapt the initial state to reflect the feasible solutions. Other variants adapt the mixer to improve the optimization process and the solution quality. These include approaches that increase the number of variational parameters to aid the optimizer (e.g. ma-QAOA [55]) or that adapt the mixer Hamiltonian to increase the reachable solutions (e.g. X-QAOA [57], FAM-QAOA [58]).

The approaches listed here are usually presented in isolation, and proofs of their complexity are presented, or properties of their behavior are analyzed. Furthermore, many of the algorithms are proposed for optimization problems. This contrasts our work in that we aim to build upon these approaches by experimentally investigating the effects of these adaptions when applied to decision problems such as 3SAT specifically.

Lastly, the variants of QAOA we examined in this work are closely related to the process of Grover adaptive search [24, 25]. This algorithm repeatedly performs the Grover search to only amplify states that improve the cost relative to a currently found optimum, while simultaneously varying the number of iterations of the quantum circuit. As such, it is an adaption of Grover's algorithm to solve optimization problems.

8. Discussion

In contrast to existing approaches, where QAOA has only been used to solve the MAX-3SAT optimization problem and the approximated solution is used to infer the decision for 3SAT, we adapted QAOA to solve the decision problem itself to improve the success probability.

The results summarized in figure 5 show, that the success probability increases for all examined variants of QAOA compared to the baseline implementation. In addition to the slight improvement obtained by the adapted cost function in Variant 1 for larger p, presetting half of the required parameters as it is done in Variant 2 is a worthwhile adaption. Variant 2 both improves the success probability compared to Variant 1 and reduces the complexity of the variational optimization due to the decreased number of required parameters. Further investigations are needed to evaluate whether using these parameters not as a fixed point but as initial values for a warm-started [20, 21] version of this solver is beneficial. Furthermore, warm-starting the solver would also help to navigate possible barren plateaus that are introduced by the adapted cost function.

The adaption that improves the success probability the most is Variant 3, which uses the Grover mixer. This suggests that, although the adapted phase-separation operator treats all unsatisfying solutions equally, the satisfying solutions are not reached using the transverse-field mixer HB in Variant 1 and Variant 2. However, in combination with the adapted mixer HG (Variant 3), this source of errors is somewhat mitigated, as the experiments show. From the experiments conducted in this work, it is, however, not clear whether this improvement can be generalized to other decision problems, as the difference in their cost functions might influence this phenomenon.

Overall, one component of the algorithm that limits the performance is the classical optimization routine. This is especially notable for the results of the baseline implementation in figure 5. The success probability for the MAX-3SAT-based solver decreases with increasing QAOA depth. This is consistent with observations made by Truger et al [21] that the increased dimension of the parameter space negatively influences the optimizer performance. To improve the quality of solutions obtained by the baseline implementation, techniques such as incremental optimization of the parameters [21] can be used or different classical optimizers can be applied.

Our comparison in section 6.1.2 showed that although the success probability varies when other optimizers are used, Variant 3 still obtains the highest success probability for all optimizers. The examination of the success probability when multiple runs per formula are performed also gives an indication of why the presented variants outperform the MAX-3SAT-based solver: Variants 1–3 are less sensitive to the randomly chosen initial set of parameters for the optimization. Restarting the optimization procedure multiple times for the MAX-3SAT-based solver, increases the chances of obtaining starting parameters that minimize the cost function. This improves the success probability for n = 10. However, as instance sizes grow, the number of required variational parameters grows [8] and the chance to obtain such favorable starting parameters decreases. For this reason, the lower sensitivity to the quality of the initial parameters in $Variant~1-3$ is advantageous.

For practical usage of the algorithm, measuring only one satisfying assignment, as it is done in the presented experiments, suffices for proving that a given formula is satisfiable. Given the small instance size of n = 10, this could result in solutions that are found only by chance due to the relatively large number of circuit measurements conducted in the variational optimization.

To address the question of whether results from our experiments also hold for larger problem instances, we additionally examine the rate of amplification of satisfying assignments. To accomplish this, a threshold $0 \lt T \unicode{x2A7D} 1$ for the proportion of measured satisfying assignments before a formula is deemed satisfiable is introduced. We reevaluate the experiment results by assuming that a formula is satisfiable if and only if

Equation (14)

Figure 9 shows the comparison of the different variants using this threshold criteria for T = 0.10 and T = 0.25. The improvement from Variant 1 to Variant 2 becomes less pronounced as the threshold grows. However, it shows that the adaptations presented in this paper still improve the success probability for the 3SAT problem. Particularly, Variant 3 still shows the largest increase in success probability, even with increasing T. This suggests that the improvements were not observed solely because of the large number of circuit executions. This evaluation supports the finding that the presented adaptions of QAOA improve the algorithm even for larger problem instances.

Figure 9.

Figure 9. The success probability for the examined variants and the baseline implementation for a satisfiability threshold of (a) T = 0.10 and (b) T = 0.25. The error bars show the standard deviation from the average success probability.

Standard image High-resolution image

The results in figure 6 exhibit a similar dependency on the clause-to-variable ratio as has already been shown for other classical algorithms [2, 3, 28] as well as other quantum algorithms for the 3SAT problem [8, 9]. In the classical context, usually, the computational resources such as the number of steps required to solve 3SAT instances is studied. However, the decrease in success probability of the studied quantum algorithms exhibited in this work can be regarded as the same phenomenon: since a reduced success probability directly implies that a deeper QAOA ansatz needs to be used, it again results in an increase in needed resources. For a larger number of variables, the exact point of lowest success probability might deviate from the presented results. As figure 1 shows, the change in satisfiability probability in the phase transition region for randomly generated inputs becomes more and more pronounced with an increased number of variables. This results in the point of $50\%$ satisfiability probability being reached at a lower clause-to-variable ratio. Therefore, we suspect, that the position of minimal success probability might also be reached at a lower clause-to-variable ratio for increased instance sizes for the studied variants of QAOA.

To summarize, the presented experiments show that the success probability of QAOA for random 3SAT instances can be improved by employing adaptions from amplitude amplification algorithms as it is done in Variant 1–3. These improvements come with the cost of increased circuit depth. However, as Variant 1 and Variant 2 show, the success probability can be improved even with a moderate increase in circuit depth. Furthermore, the results are valid even when a more strict threshold is used, highlighting the usefulness of these adaptions for QAOA.

9. Summary and future work

In this work, we introduced three variants of QAOA that make use of concepts from amplitude amplification to improve the success probability for 3SAT. We showed that a binary cost function for the phase-separation operator as well as the application of the Grover mixer improves the results for randomly generated 3SAT instances. This improvement was also observed when different optimizers were compared. Furthermore, using these approaches, the number of parameters to be optimized is halved which reduces the complexity for the classical optimizers which in turn further improves the success probability. To investigate whether these findings also hold up for larger problem instances, we examined the rate of amplification of satisfying variable assignments by using a threshold for satisfiability in the samples obtained by the ansatz. The improvement in the success probability is still noticeable.

In future work, we propose to examine the effect these variants of QAOA have on the cost function landscape during optimization. In particular, theoretical results on how the optimization performance behaves with an increased ansatz depth enable a better understanding of how the presented adaptions perform for larger problem instances. Furthermore, the presence of noise might affect the solution quality of quantum algorithms. By introducing a noise model into the simulation procedures it can be further evaluated how the presented variants of QAOA perform on real devices.

Acknowledgments

This work was partially funded by the BMWK projects PlanQK (01MK20005N) and EniQmA (01MQ22007B).

Data availability statement

The data that support the findings of this study are openly available at the following URL: https://github.com/UST-QuAntiL/aa_inspired_qaoa [60].

Appendix A: Implementation of MAX-3SAT ansatz circuit

Figure A1 shows the ansatz circuit for the standard QAOA implementation. It consists of the preparation of the initial state using one layer of Hadamard gates followed by p layers that repeatedly apply the parameterized operators $U(H_{\phi}, \gamma)$ and $U(H_B, \beta)$. In the following, we will present how these operators are implemented.

Figure A1.

Figure A1. The quantum ansatz circuit for the standard QAOA implementation for MAX-3SAT.

Standard image High-resolution image

The phase-separation operator encodes the cost Hamiltonian Hφ as $U(H_{\phi}, \gamma) = e^{i\gamma H_{\phi}}$. The cost Hamiltonian for MAX-3SAT for a formula consisting of m clauses (see also the supplementary material of [9]) is given as

Equation (A.1)

In the following equations, we omit the polarity of the literals and assume $p_{i,j} = 1$, since this does not influence the upper bound on the number of gate operations that have to be performed per clause. The product for one clause can be expanded as

Equation (A.2)

Equation (A.3)

where we assume for simplicity, that the atomic variables a1, a2 and a3 participate in the clause. Therefore, one clause can be implemented as

Equation (A.4)

which results in three RZ rotations, three RZZ rotations and one three-qubit interaction resulting in an RZZZ gate [9]. Overall, this shows that the subcircuit for one clause is of constant depth, resulting in a linear-depth (O(m)) phase-separation operator.

Lastly, the transverse-field mixer $U(H_B, \beta)$ is implemented by reformulating the exponential of the Hamiltonian HB :

Equation (A.5)

Thus, $U(H_B, \beta)$ is implemented using one layer of rotation gates $RX(2\beta)$ as shown in figure A1.

Appendix B: Implementation of QAOA variants

Figure B1 shows the ansatz circuit for Variant 1 and 2, and figure B2 shows the ansatz circuit for Variant 3. These circuits are comprised of one layer of Hadamard gates, the initialization of the ancilla qubit using a negation (X), the adapted phase-separation operator $U(\widetilde{H_{\phi}}, \gamma)$, and the mixer circuits $U(H_B, \beta)$ (for Variant 1 and Variant 2) and $U(H_G, \beta)$ (for Variant 3).

Figure B1.

Figure B1. The quantum ansatz circuit for Variant 1 and Variant 2. It uses the quantum circuit for $U(\widetilde{H_{\phi}}, \gamma)$ shown in figure B3 using the lowermost qubit as an ancilla qubit. For Variant 2, the variational parameters γi for each layer $0 \unicode{x2A7D} i \unicode{x2A7D} p$ is set to $\gamma_i = \pi$.

Standard image High-resolution image
Figure B2.

Figure B2. The quantum ansatz circuit for Variant 3. This circuit uses the mixing circuit $U(H_G, \beta)$ shown in figure 3 as a subroutine.

Standard image High-resolution image

The adapted phase-separation operator that is used in all examined variants is implemented by using a bit-flip oracle Fφ as a subroutine as shown in figure B3 (see also section 4.1). The bit-flip oracle is obtained using the classical function compiler from Qiskit [40]. For an input formula φ, this compiler produces a quantum circuit that implements

Equation (B.1)

where $\phi(\vec{x})$ represents the 3SAT formula evaluation of the formula φ as in section 4.1. Apart from the phase gate on the ancilla qubit, the phase-separation operator applies this bit-flip oracle twice. The first application of Fφ computes the formula result in the ancilla qubit and the second application reverts the ancilla qubit to its initial state after the phase gate is applied.

Figure B3.

Figure B3. The quantum circuit that implements the phase-separation operator $U(\widetilde{H_{\phi}}, \gamma)$ from section 4.1. It makes use of a bit-flip oracle Fφ .

Standard image High-resolution image
Please wait… references are loading.