# Tailored Quantum Alternating Operator Ansatzes for Circuit Fault Diagnostics
## 2 Constrained Evolution in Quantum Alternating Operator Ansatzes  
For combinatorial optimization problems, there have been recent advances in the research of applying quantum algorithms to solve such problems that are centered around the quantum approximate optimization algorithm (QAOA1) [4], which is a very general protocol to approximately (or exactly) solve combinatorial optimization problems, such as the Max Cut problem [4; 5; 6; 7]. However, further generalizations of this concept, such as the RQAOA [8] and quantum alternating operator ansatz (QAOA) [1; 5; 9], have been developed in the hope to better tailor protocols to particular problems and thereby exploit their specific structures. For the purpose of this paper, we focus on using QAOA protocols to find optimal solutions to a combinatorial optimization problem. For example, the authors of [5] demonstrated a near-optimal quantum unstructured search algorithm based on using coherent phase-separation operators in the QAOA setting. Under reasonable complexity-theoretic assumptions, the QAOA cannot be efficiently simulated by any classical computer [10]. For a small number of qubits, this has been realized on an NISQ [11] device [12]. Given a general binary optimization problem with \(N\) bits, the quantum computer works with \(N\) qubits over a space \(\mathbb{C}^{2^{N}}\). The wavefunction of the system \(\ket{\psi}\) is a normalized, complex-valued vector in this space, and potential actions on this state (i.e., algorithmic steps) are represented by unitary operators. The QAOA works by starting the quantum system in a prepared state and then applying a series of angle-parameterized unitaries to evolve the system into a state that is then measured over a predetermined basis. The result can then be interpreted as a bit-string solution to the optimization problem. The QAOA divides the task of evolving the system into \(P\) rounds, each involving the application of two sets of operators. The first is a set of mixing operators, which are discussed in greater detail later. The second is a diagonal unitary operator associated with a classical cost function that acts to essentially evaluate the quality of different configurations. Given a classical cost function \(C(x)\), in both the QAOA and QAOA1, Hamiltonian form phase separation operators are used such that \(U_{c}(\alpha)=\sum_{x\in\{0,1\}^{N}}e^{i\alpha\cdot C(x)}\ket{x}\bra{x}\), where \(\ket{x}\) are the orthonormal computational basis states in \(\mathbb{C}^{2^{N}}\). Any such state \(\ket{x}\) (a ket-state) can be written as an outerproduct state of individual qubit states \(\ket{x}=\ket{x_{1},\ldots,x_{N}}=\ket{x_{1}}\ldots\ket{x_{N}}\) with \(x\in\{0,1\}^{N}\), \(\ket{x_{i}}\in\mathbb{C}^{2}\) and \(x_{i}\in\{0,1\}\). As such, the classical cost function is interpreted as a classical Hamiltonian \(H_{c}=\sum_{x\in\{0,1\}^{n}}C(x)\ket{x}\bra{x}\) (a real-valued diagonal matrix in \(\mathbb{C}^{2^{N}}\)). The complex exponentiation of a Hermitian operator is a unitary operator, and so \(U_{c}(\alpha)\) is a diagonal unitary operator. For example, a marked state cost function associated with a single solution state \(x^{*}=(1,\ldots,1)\) could be \(C(x)=-\prod_{i=1}^{n}x_{i}\). Then, \(U_{c}(\alpha)=\mathbb{1}-(1-e^{-i\alpha})\ket{x^{*}}\bra{x^{*}}\). The wave function associated with the quantum system \(\ket{\psi}=\sum_{x\in\{0,1\}^{n}}a_{x}\ket{x}\) will therefore evolve to \(\ket{\psi}=a_{x^{*}}e^{-i\alpha}\ket{x^{*}}+\sum_{x\in\{0,1\}^{n}/\{x^{*}\}}a_ {x}\ket{x}\), and so the behavior of \(U_{c}(\alpha)\) is to add the same phases to computational basis states that have the same energy evaluations according to the cost function \(C(x)\). QAOA1 is a type of QAOA approach with a specific mixing operator and a fixed starting state. Both of these conditions are replaced with a more general condition in the QAOA.