# Quantum Circuit Implementation of Multi-Dimensional Non-Linear Lattice Models
## 9 Summary of Methodology and Algorithms
### Algorithm for the Modified D1Q3 Model  
At the start of the simulation, it is assumed that velocity \(u\) represented in the floating-point format is known (e.g., for a specific example or from a previous step in a hybrid quantum/classical simulation approach) so that \(|eu2|eu1|eu0\rangle\) and \(|mu2|mu1|mu0\rangle\) are defined (for examples with \(N_{M}=4\) and \(N_{E}=3\)). For positive \(u\), \(|su\rangle=|0\rangle\). The methodology for circuit evaluation involves the following steps:  
1. Initialization of initial state of the qubit register \(|\psi\rangle_{init}\). Using the qubit arrangement shown in Figures 3 and 4, for each of the four directions defined by qubits \(|dv1|dv0\rangle\), a single amplitude of \(|\psi\rangle_{init}\) is set to \(1/2\) (to define a normalized state vector). The indices of the non-zero amplitude for each of the four directions are: \[|dv1|dv0\rangle=|00\rangle : (00|eu2|eu1|eu1|0|mu2|mu1|mu0|\ldots|0)_{2}\] \[|dv1|dv0\rangle=|01\rangle : (01|eu2|eu1|eu1|0|mu2|mu1|mu0|\ldots|0)_{2}\] \[|dv1|dv0\rangle=|10\rangle : (10|eu2|eu1|eu1|0|mu2|mu1|mu0|\ldots|0)_{2}\] \[|dv1|dv0\rangle=|11\rangle : (11|eu2|eu1|eu1|0|mu2|mu1|mu0|\ldots|0)_{2}\] where dots refer to further qubits in state \(|0\rangle\);  
\begin{table}
\begin{tabular}{c c c} \hline \(|eu2|eu1|eu0\rangle\) & **Minimum** & **Maximum** \\ \hline \(|001\rangle\) & \((8/128)^{2}\rightarrow|000|000\rangle\) & \(2\times(15/128)^{2}\rightarrow|000|011\rangle\) \\ \(|010\rangle\) & \((8/64)^{2}\rightarrow|000|010\rangle\) & \(2\times(15/64)^{2}\rightarrow|001|110\rangle\) \\ \(|011\rangle\) & \((8/32)^{2}\rightarrow|001|000\rangle\) & \(2\times(15/32)^2. Evolution of the quantum state of qubit register by performing the quantum gate operations outlined in the quantum circuits shown in Figures 3 and 4. After completion, the output quantum state \(|\psi\rangle_{out}\) will have four non-zero amplitudes equal to \(1/2\). For non-zero \(u\), the indices of these are different from those in the initial state to reflect the computational work performed;
3. Obtaining output. Assuming that in the output state, the indices of non-zero amplitudes are defined by: \[\begin{array}{l}(00|eu2|eu1|eu1|0|mu2|mu1|mu0|eg2|eg1|eg0|sg2|mg2|mg1|mg0|\ldots| 0)_{2}\\ (01|eu2|eu1|eu1|0|mu2|mu1|mu0|eg2|eg1|eg0|sg2|mg1|mg0|\ldots|0)_{2}\\ (10|eu2|eu1|eu1|0|mu2|mu1|mu0|eg2|eg1|eg0|sg2|mg2|mg1|mg0|\ldots|0)_{2}\\ (11|eu2|eu1|eu1|0|mu2|mu1|mu0|eg2|eg1|eg0|sg2|mg1|mg0|\ldots|0)_{2}\end{array}\] (1) the state of the qubits \(|eg2|eg1|eg0\rangle\), \(|sg\rangle\) and \(|mg2|mg1|mg0\rangle\) (for \(N_{M}=4\) and \(N_{E}=3\)) defining the equilibrium distribution function for each of the four directions can be obtained;  
Using the presented methodology for circuit verification, the final step would involve checking the obtained shift in indices of non-zero amplitudes with those for the intended output state. For hybrid quantum/classical approaches, the output obtained for the equilibrium distribution function components is used to evaluate the collision term in the 'classical' part of the algorithm. Once the non-equilibrium distribution function and velocity \(u\) have been updated in the classical part of the hybrid approach, the steps outlined above can be repeated, starting again from step 1.