# Cutting-Edge Trajectory Optimization through Quantum Annealing
## 3 Transcription Procedure
Thus, the main goal of the article is not to add complexity to the underlying mathematics, but rather to test QA with entirely new challenges, such as trajectory optimization for space applications. Consequently, this work aims to take the initial step in exploring QA with an entirely novel method, and the first results are definitely promising. By leveraging the polynomial approximations, the state vector and its derivatives can be explicitly written as a linear function of the free coefficient parameter:  
\[ \begin{split}\mathbf{s}(t)&=\boldsymbol{\alpha}_{m }t^{m}+\sum_{i=0}^{m-1}\boldsymbol{\alpha}_{i}t^{i},\\ \frac{d^{k}\mathbf{s}(t)}{dt^{k}}&=\prod_{j=0}^{k-1 }(m-j)\cdot\boldsymbol{\alpha}_{m}t^{(m-k)}+\sum_{i=1}^{m-1}(\prod_{j=0}^{k-1 }(i-j))\cdot\boldsymbol{\alpha}_{i}t^{(i-k)}.\end{split}  \tag{9}\]  
Vector \(\boldsymbol{\alpha}_{i}=[\alpha_{i_{x}},\alpha_{iy},\alpha_{iz}]^{T}\) corresponds to the \(i\)-th set of fixed polynomial coefficients, while \(\boldsymbol{\alpha}_{m}=[\alpha_{m_{x}},\alpha_{my},\alpha_{m_{z}}]^{T}\) represents the vector containing three independent parameters that influence the trajectory's components. By imposing the boundary conditions in Equation (9), we can obtain a system of \(m\) equations, where \(\boldsymbol{\alpha}_{i}\) are considered unknowns and \(\boldsymbol{\alpha}_{m}\) is considered a free parameter. As a consequence, all \(\boldsymbol{\alpha}_{i}\) can be expressed as a linear function of \(\boldsymbol{\alpha}_{m}\) and boundary conditions. By substituting the obtained expression \(\boldsymbol{\alpha}_{i}\) in Equation (9), it becomes possible to obtain a linear expression as the one in Equation (10), where \(\boldsymbol{\alpha}_{m}\) is isolated, and \(M(t)\) and \(N(t)\) are the expressions of two generic matrices as a function of time. \[ \begin{split}\mathbf{s}(t,\mathbf{\alpha}_{m})&=M(t)\mathbf{ \alpha}_{m}+N(t),\\ \frac{d^{k}\mathbf{s}(t,\mathbf{\alpha}_{m})}{dt^{k}}&= \frac{d^{k}M(t)}{dt^{k}}\mathbf{\alpha}_{m}+\frac{d^{k}N(t)}{dt^{k}}.\end{split}  \tag{10}\]  
By using the general expression linear dynamical in Equation (8), it becomes feasible to derive control input \(\mathbf{u}(t)\):  
\[\dot{\mathbf{x}}(t)= \begin{bmatrix}\dot{\mathbf{s}}\\ \dot{\mathbf{s}}\end{bmatrix} = \begin{bmatrix}\mathbf{0}&\mathbf{I}\\ \Lambda&H\end{bmatrix}\begin{bmatrix}\mathbf{s}\\ \dot{\mathbf{s}}\end{bmatrix} + \begin{bmatrix}\mathbf{0}\\ \mathbf{I}\end{bmatrix} \mathbf{u}. \tag{11}\]  
Control vector \(\mathbf{u}(t)\) appears only in the second term of Equation (11), where \(\mathbf{I}\) represents the identity matrix, while \(\Lambda\) and \(H\) are constant matrices. These matrices are typically specific to the dynamics of the problem at hand, but in the current discussion, they are considered as generic expressions without specific values or definitions. The explicit expression of \(\mathbf{u}(t)\) can be formulated as follows:  
\[\mathbf{u}(t)=(\bar{\mathbf{s}}-H\dot{\mathbf{s}}-\Lambda\mathbf{s}). \tag{12}\]  
Then, by substituting Equation (10) in Equation (12), control input \(\mathbf{u}(t)\) is expressed as a linear function of \(\mathbf{\alpha}_{m}\). However, from this point on, variable \(\mathbf{\alpha}_{m}\) is represented with symbol \(\mathbf{\alpha}\) to simplify the notation. \[ \begin{split}\mathbf{u}(t)=P\mathbf{\alpha}+R,\\ \text{where:}\quad\begin{cases}P=(\hat{M}(t)-H\hat{M}(t)- \Lambda M(t))\\ R=(\hat{N}(t)-H\hat{N}(t)-\Lambda N(t)),\end{cases}\end{split}  \tag{13}\]  
where \(P\) and \(R\) are functions of variables \(M\), \(N\), \(L\), and \(H\), and their expressions depend on both the system's dynamics and the specific polynomial chosen to approximate the trajectory. As of now, they are represented in a general form, but in practical applications, these variables are given explicit expressions tailored to the specific problem at hand. Let us suppose now that our cost function aims to minimize control, and we discretize the trajectory by generating vector of \(d\) time points \(t=(t_{0},t_{1},\ldots,t_{i},\ldots,t_{d-1},t_{d})\).