# Implementation of the HHL Algorithm for Solving the Poisson Equation on Quantum Simulators
## 3 Results
### Error Calculations in Different Quantum Simulators and in Different Qubits  
Then, the error is found in different qubits. To estimate the error of the solution of the Poisson equation, this algorithm uses the norm \(\left\|\mathrm{b}-\widetilde{\mathrm{b}}\right\|\) where \(\mathrm{b}\) is the original vector and \(\widetilde{\mathrm{b}}\) is the vector obtained by multiplying the matrix \(A\) by the estimate of the solution \(\widetilde{\mathrm{x}}\) (Figure 9). Figure 7: Quantum circuit after measuring the eigenvalues. The error estimation in the HHL algorithm is performed by comparing the initial vector b with the vector \(\widetilde{\text{b}}\) obtained by multiplying matrix \(A\) by the solution estimate \(\widetilde{\text{x}}\). The difference between these vectors is measured using the norm \(\left\|\text{b}-\widetilde{\text{b}}\right\|\). The error rate can be defined as the ratio of the norm of the difference \(\left\|\text{b}-\widetilde{\text{b}}\right\|\) to the norm of vector b. Thus, the results of applying the HHL algorithm to solve the Poisson equation in terms of error rate depend on several factors, including the number of repeated measurements (shots) and the approximation accuracy of the solution. Increasing the number of repeated measurements usually improves the accuracy of the results and reduces the error rate. However, limitations of quantum computing, such as quantum noise and errors in quantum operations, can limit the achievable solution accuracy and affect the error rate. The error estimate is presented in qubits and has a result of approximately 0.508. Considering the limitations of quantum computing, the result can be considered satisfactory. Now, let us consider the performance of the algorithm. The execution time of the quantum part of the algorithm depends on the number of qubits, and, in this case, \(N^{\star}N\) qubits are used. The execution time of the classical part of the algorithm depends on the number of iterations, and, in this case, eight iterations are performed. On a local simulator, the execution time of the quantum part of the algorithm is approximately 0.66 s, and the execution time of the classical part of the algorithm is approximately \(10^{-3}\) s. This value emerged when the matrix was of a small size. If it is possible to increase the size of the matrix, then quantum simulators freeze and cannot cope with this load. The execution time of the full code on different simulators is shown in Table 1.  
Figure 8: A number of quantum measurements for the HHL algorithm. Figure 9: Comparative plot of the error rate in different qubits. This quantum circuit was designed for N \(\times\) N matrices, allowing it to run on four-qubit systems. All calculations were carried out using quantum simulators, and this scheme can also be performed on real quantum computers from IBM. Below is a comparison table of computing times between quantum simulators and real quantum computers. Table 2 shows the execution time in quantum simulators and various quantum computers from IBM. The table results show that the quantum simulators are faster than the real quantum computers ibmq_quito and ibmq_belem for the HHL algorithm. This could have several explanations:  
* Problem size: The table shows that the HHL algorithm uses only 5 qubits on real quantum computers and 63 qubits on a quantum simulator. If the problem scales with increasing numbers of qubits, real quantum computers may begin to show their advantages. * Noise and decoherence: Real quantum computers are subject to noise and decoherence, which can slow down the execution of algorithms. Simulators can bypass this limitation because they do not encounter the real physics and noise associated with real quantum systems. If the matrix size is increased, the number of qubits may not be sufficient to run it on real quantum computers. Therefore, the results of work in quantum simulators are obtained faster than on real quantum computers. The execution time depends on the type of simulator and the size of matrix \(A\).