# Cutting-Edge Trajectory Optimization through Quantum Annealing
## 2 Quantum Annealing Optimization  
The fundamental principle behind QA is to encode the optimization problem into the energy states of a quantum system. For this purpose, let us briefly recall some fundamental concepts of quantum physics: a quantum system can have discrete levels of energy, among which the one with minimum energy is called the ground state. The energy of a quantum system is represented by its Hamiltonian operator \(H\), which is closely related to the time evolution of the system through the famous Schrodinger Equation [33]. It is also possible to write a so-called eigenvalues problem of the Hamiltonian, as shown in Equation (1); this equation is sometimes called the Time Independent Schrodinger Equation. \(|\psi_{n}\rangle\) (written here in the Dirac notation \(|\cdot\rangle\), used to indicate quantum states) are called eigenvectors (or eigenstates) of \(H\), and \(E_{n}\) are the eigenvalues that correspond to the energy values that the system can assume for \(n=\{0,1,2,\ldots\}\). Therefore, an optimization problem encoded into the Hamiltonian of a quantum system has the possible values of the cost function corresponding to the energy values \(E_{n}\) of the Hamiltonian, with \(E_{0}\), the ground state, being the global minimum of the cost function. \[H|\psi_{n}\rangle=E_{n}|\psi_{n}\rangle. \tag{1}\]  
Quantum annealers are typically represented by a network of qubits, for which the Hamiltonian assumes the form of a matrix. Qubits are the quantum equivalent of classical bits, but unlike classical bits, which can only represent zero or one, qubits can exist in the superposition of both states simultaneously. This allows QA exploration of multiple possible solutions to the optimization problem simultaneously. The optimization process in QA involves the adiabatic theorem from quantum mechanics, which states that a system in the ground state, whose Hamiltonian is slowly time-varying, remains in the ground state of the instantaneous Hamiltonian. Therefore, for every instant of time \(t\) from zero to annealing time \(T\), the following equation holds:  
\[H(t)|\psi_{0}(t)\rangle=E_{0}(t)|\psi_{0}(t)\rangle. \tag{2}\]  
The optimization procedure starts by preparing the system in the ground state of a simple Hamiltonian, called driver Hamiltonian (\(H_{D}\)); the optimization problem is instead encoded in the energy eigenvalues of a problem Hamiltonian, \(H_{P}\); then, the system is evolved adiabatically from \(H_{D}\) to \(H_{P}\)[30] in such a way that the system state at the end of the evolution is the ground state of the problem Hamiltonian. At this point, to obtain the solution, we need to only operate a measurement of the qubits [34]. Equation (3) shows a generic transition between the Driver and Problem Hamiltonian, where \(A(t/T)\) and \(B(t/T)\) are arbitrary functions such that \(A(0)=1\), \(B(0)=0\) and \(A(1)=0\), \(B(1)=1\). In Equation (4), the state of the system is shown by the eigenvalues equation at the start and at the end of the annealing process, where \(\psi_{0,D}\) stands for the ground state of the Driver Hamiltonian and \(\psi_{0,P}\) is the ground state of the Problem Hamiltonian, the solution of the optimization problem. \[H(t)=A(t/T)H_{D}+B(t/T)H_{P}, \tag{3}\]\[H_{D}|\psi_{0,D}\rangle=E_{0,D}|\psi_{0,D}\rangle\xrightarrow{t=[0,T]}H_{P}|\psi_{0,P}\rangle=E_{0,P}|\psi_{0,P}\rangle. \tag{4}\]  
To be solved by QA, an optimization problem must have a precise structure given by the Ising or QUBO formulations [35], which are described below. * _Ising Formulation_ revolves around determining the minimum energy configuration of a system of interacting spins. Let us consider an Ising model with n spins denoted as \(\sigma=(\sigma_{1},\sigma_{2},\ldots,\sigma_{n})\), where each spin can be in one of two states: +1 (up) or \(-1\) (down).