# Tailored Quantum Alternating Operator Ansatzes for Circuit Fault Diagnostics
## 2 Constrained Evolution in Quantum Alternating Operator Ansatzes
In QAOA1, we begin in the uniform superposition state \(\ket{+}^{\otimes n}=\frac{1}{\sqrt{2^{n}}}\sum_{x\in\{0,1\}^{n}}\ket{x}\) so that every computational basis state \(\ket{x}\) has the same amplitude. The mixing operators are single local Pauli X operators:  
\[U_{d}(\beta)=\prod_{j=1}^{n}e^{-i\beta\sigma_{j}^{x}}.\]  
The action of \(\sigma_{j}^{x}\) on qubit \(j\) is to flip the bit, mapping \(\ket{1}\) to \(\ket{0}\) and vice versa. Any QAOA approach that utilizes \(U_{d}\) as mentioned above is considered a QAOA1 approach for the purpose of our descriptions. As such, QAOA1 proposes a very specific type of ansatz, in which the mixing operator takes this form for any problem. The QAOA will generalize this to allow for more structured ansatzes. Then, for a single round \(t_{i}\) of a QAOA (including QAOA1), we pick two degrees \(\alpha_{i}\) and \(\beta_{i}\) and evolve the wave function as \(\ket{\psi(t_{i})}=U_{d}(\beta_{i})U_{c}(\alpha_{i})\ket{\psi(t_{i-1})}\). \(U_{c}\) changes the phase of states based on their evaluation from the classical cost function in the computational basis, while \(U_{d}\) acts as a mixer, leading to interference between the states in the superposition and potentially leading to concentration on low-lying energy states based on the cost function \(C(x)\) after several rounds. Indeed, as the number of rounds \(P\) goes to infinity, one can select \(\alpha_{i}\) and \(\beta_{i}\) such that \(\ket{\psi(t_{P})}\) is guaranteed to minimize the cost function \(C(x)\)[4]. For a given finite value \(P\), there are \(2P\) angles to select for running the algorithm which can therefore be cast as an optimization task where one wishes to find the angles that lead to a minimization of the cost function \(C(x)\). QAOA1, as well as the QAOA, is a type of variational quantum algorithm (VQA) [13] for which finding the optimum parameters is typically an NP-hard problem [14]. The landscape of the final cost given by the quantum algorithm is known to suffer from a barren plateau [13, 15, 16, 17], and optimization with random starts can lead to convergence to the local minima [6, 13]. Nonetheless, the optimum or near-optimum solutions can follow similar patterns across instances [6, 18]. For a more detailed discussion, we refer the reader to [13]. The techniques utilized in this paper will be discussed Section 6. Once the algorithm has run for \(P\) rounds, the wave function of the system is measured in the computational basis \(\{\,\mid\,x\,\rangle\,\mid\,x\in\{0,1\}^{n}\}\) such that the wave function collapses to a single state in that basis according to the Born rule, where \(\Pr(x)=|\langle\,x\,\,\rvert\,\psi(t_{P})\rangle|^{2}\). For many classes of problems, including certain class of linear and quadratic constraint problems, it is possible to find alternative mixing operators that allow us to limit the evolution of the wave function to a feasible subspace of a collection of those constraints [1, 19, 20, 21, 22]. The general problem is NP-hard, but there is a simple polynomial algorithm for bounded operators [22]. In QAOA1, the mixing operator utilized can be associated with there being no constraint placed on the evolution, since every state is reachable under its action (although it is clearly not the only such mixing operator). The two essential requirements for the mixing operators are that they must take actions moving states in the constrained space to potentially any other state in that constrained space, but they cannot move such states outside of the constrained space. As such, the QAOA describes a more general approach than QAOA1, in which the mixing operator and phase-separating operators can be much more general. In particular, they are usually tailored to the specific type of symmetries of the underlying problem (such as the ansatz to the algorithm). Notice that the QAOA shares the same acronym as QAOA1 in the literature. For example, ref. [1] lists a compendium of mixing and phase-separating operators that can be utilized for different combinatorial optimization problems.