# Cutting-Edge Trajectory Optimization through Quantum Annealing
## 4 Lunar Landing and Rendezvous Applications  
The main objective of both of these mission applications is to navigate the spacecraft in such a way that it can be safely and accurately landed or docked at a specified predetermined location. In achieving this goal, it is crucial that the spacecraft reaches this final position with specific attributes simultaneously satisfied. These attributes include having both zero relative velocity and zero relative acceleration. This ensures a controlled and precise touchdown or a docking operation, minimizing the potential for any sudden or undesirable movements during the final phases of the mission. This objective can be cast in the form of a boundary condition problem. Notably, a total of five boundary conditions (\(m=5\)) prove sufficient to comprehensively define the entirety of this problem:  
\[\begin{split}\mathbf{s}(t_{0})=\mathbf{s}_{0}&\dot{ \mathbf{s}}(t_{0})=\dot{\mathbf{s}}_{0}\\ \mathbf{s}(t_{f})=\mathbf{s}_{f}&\dot{\mathbf{s}}(t_{f})=0 \quad\dot{\mathbf{s}}(t_{f})=0\end{split}. \tag{19}\]  
Consequently, the trajectory can be approximated by a fifth-degree polynomial (as elaborated in Section 3).  
\[\mathbf{s}(t)=\boldsymbol{\alpha}_{0}+\boldsymbol{\alpha}_{1}t+\boldsymbol{ \alpha}_{2}t^{2}+\boldsymbol{\alpha}_{3}t^{3}+\boldsymbol{\alpha}_{4}t^{4}+ \boldsymbol{\alpha}_{5}t^{5}. \tag{20}\]  
In (20), five coefficients of each component are explicitly determined, while one coefficient (for each component) remains unconstrained and serves as the adjustable parameter (in this instance, \(\boldsymbol{\alpha}_{2}=[\alpha_{2_{x}},\alpha_{2_{y}},\alpha_{2_{z}}]\)), representing the variable to be optimized through QA. By including Equation (19) in Equation (20), the coefficient values can be expressed as a function of boundary conditions and the free parameters:\[\begin{cases}\mathbf{\alpha}_{0}=\mathbf{s}_{0}\\ \mathbf{\alpha}_{1}=\mathbf{\dot{s}}_{0}\\ \mathbf{\alpha}_{3}=\left(10\Delta\mathbf{s}-6\mathbf{s}_{0}t_{f}-3\mathbf{\alpha}_{2}t_{f}^{2} \right)\,/\,t_{f}^{3}\\ \mathbf{\alpha}_{4}=\left(-15\Delta\mathbf{s}+88_{0}t_{f}+3\mathbf{\alpha}_{2}t_{f}^{2} \right)\,/\,t_{f}^{4}\\ \mathbf{\alpha}_{5}=\left(6\Delta\mathbf{s}-3\delta_{0}t_{f}-\mathbf{\alpha}_{2}t_{f}^{2} \right)\,/\,t_{f}^{5}\end{cases}, \tag{21}\]  
where \(\Delta\mathbf{s}=\mathbf{s}_{f}-\mathbf{s}_{0}\) represents the difference between the terminal and initial vector positions of the trajectory. By including Equation (21) into Equation (20), the spacecraft's trajectory can be explicitly represented as a function of \(\mathbf{\alpha}_{2}\).  
\[\mathbf{s}(t,\mathbf{\alpha}_{2})=M\mathbf{\alpha}_{2}+\hat{N}^{T}T=M\mathbf{ \alpha}_{2}+N,\] (22) where: \[\begin{cases}M=\begin{bmatrix}D^{T}T&0&0\\ 0&D^{T}T&0\\ 0&0&D^{T}T\end{bmatrix}\\ T=\begin{bmatrix}1&t&t^{2}&t^{3}&t^{4}&t^{5}\end{bmatrix}^{T}\\ D=\begin{bmatrix}0&0&1&-\frac{3}{t_{f}}&\frac{3}{t_{f}^{2}}&-\frac{1}{t_{f}^{2} }\end{bmatrix}^{T}\\ \bar{N}=\begin{bmatrix}\mathbf{s}_{0}&\dot{\mathbf{s}}_{0}&0&\frac{10\Delta\mathbf{s}-6 \mathbf{s}_{0}t_{f}}{t_{f}^{3}}&\frac{-15\Delta\mathbf{s}+8\mathbf{s}_{0}t_{f}}{t_{f}^{4}}& \frac{6\Delta\mathbf{s}-3\mathbf{s}_{0}t_{f}}{t_{f}^{3}}\end{bmatrix}^{T}\end{cases}.\]