# Improving the Solving of Optimization Problems:
## 5 Quantum Circuit Model-Based Solvers
### Vqe  
The Variational Quantum Eigensolver (VQE), introduced in [55; 62], was originally conceived for finding the lowest eigenvalue of any type of Hamiltonian, in particular focusing on quantum chemistry applications, but it is also applicable for optimization problems in general. It exploits a parametric guess quantum circuit (ansatz), whose parameters can be classically optimized, to make the state converge toward an upper bound of the ground state of an input Hamiltonian thanks to the variational principle (Figure 3). The variational principle states that the smallest expectation value of an observable \(A\), which is hence described by a Hermitian operator (for which \(A^{\dagger}=A\)), is always found at an eigenvector of the observable [55]. The expectation value of an Hermitian operator \(A\) in a state \(|\psi\rangle\) is given by the following:  
\[\langle A\rangle_{\psi}=\sum_{j,k}|\langle\lambda_{j}^{k}|\psi\rangle|^{2} \lambda_{j}=\langle\psi|A|\psi\rangle, \tag{18}\]  
where \(\lambda_{j}\) is an eigenvalue of the operator \(A\), and \(|\lambda_{j}^{k}\rangle\) is the \(k\)th eigenvector associated with the eigenvalue \(\lambda_{j}\), as multiple eigenvectors can correspond to the same eigenvalue. Supposing that \(\lambda_{0}\) is the smallest among the eigenvectors of \(A\), then  
\[\langle A\rangle_{\psi}=\sum_{j,k}|\langle\lambda_{j}^{k}|\psi\rangle|^{2} \lambda_{j}\geq\sum_{j,k}|\langle\lambda_{j}^{k}|\psi\rangle|^{2}\lambda_{0}= \lambda_{0}. \tag{19}\]  
Figure 2: Example of the quantum operator realizing the \(3s_{0}s_{1}\dots s_{n-1}\) higher-order Ising term. This expectation value, which is the smallest of the observable \(A\), can be achieved in a state that is either one of the eigenvectors associated with \(\lambda_{0}\) or a normalized linear combination of these eigenvectors. Indeed, from the definition of eigenvalue, the following is obtained:  
\[\langle\lambda_{0}^{k}|A|\lambda_{0}^{k}\rangle=\lambda_{0}\langle\lambda_{0}^{ k}|\lambda_{0}^{k}\rangle=\lambda_{0}. \tag{20}\]  
Therefore, minimizing the expectation value means finding the lowest eigenvalue. In the case of an Ising Hamiltonian--which is a diagonal operator and hence its eigenvectors are the computational basis states--this also coincides to identifying the lowest energy state since  
\[\langle\psi|H|\psi\rangle=\sum_{x}|a_{x}|^{2}f(x), \tag{21}\]  
where \(|a_{x}|^{2}\) represents the probability of observing the input configuration \(|x\rangle\) when \(|\psi\rangle\) is measured in the computational basis. However, a general Hamiltonian cannot be assumed to be diagonal. For any operator with eigenvectors different from the computational basis, computing the minimum of its expectation value on a quantum computer requires measuring in the basis defined by its eigenvectors. In a quantum circuit, it is always possible to apply a change of basis so that measurement in the computational basis becomes equivalent to measurement in the eigenvector basis. After the introduction of the principle and objectives of VQE, we can now examine each step of the algorithm, which are listed below:  
1. An ansatz and an initial set of values for the parameters are chosen. 2. The quantum state is prepared by the parametric circuit. 3. The quantum state is measured, so the expectation value, namely the energy of the Hamiltonian, is estimated. 4. A classical optimizer is used to determine the parameter values for the next iteration to decrease the estimated expectation value. 5. Repeat from step 2 until the algorithm's stop condition--e.g., a selected number of iterations or the convergence of the classical optimizer--is met. From the algorithm steps, a remarkable similarity with QAOA can be noticed. In fact, QAOA can be regarded as a special case of VQE, employing a specific ansatz based on the Ising Hamiltonian. The ansatz is a parametric quantum circuit with a structure chosen to produce a trial wavefunction to be measured, which, after optimizing the ansatz's parameters, should approximate the Hamiltonian minimum expectation value.