# An Early Investigation of the HHL Quantum Linear Solver for Scientific Applications
## 6 Discussion  
This paper evaluates and analyzes the performance and resources required for the HHL algorithm in various scientific and engineering problems. There are still multiple points we need to address in future work. The foremost limitation in this work is the data-loading module in the HHL circuit generation. While the data-loading algorithm in [55] can encode an arbitrary vector into a quantum circuit, the circuit depth of this module is exponential in the number of qubits. Thus, this first part of the circuit severely damages the potential quantum speedup from HHL. We mitigate this drawback by comparing  
Figure 8: The number of (**a**) logical cycles for the algorithm, (**b**) \(T\) states, (**c**) physical qubits for the algorithm after layout, and (**d**) physical qubits for the \(T\) factories as functions of the number of clock qubits in QPE, respectively. The estimated circuits are HHL circuits for the heat transfer problem. Both qubit parameter sets (ns, \(10^{-4}\)) and (us, \(10^{-4}\)) have the same values under the same error budget for all four factors in the plots. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \begin{tabular}{c} **Error** \\ **Budget** \\ \end{tabular} & \begin{tabular}{c} **(\(n_{d}\), \(n_{c}\))** \\ \end{tabular} & \begin{tabular}{c} **Physical Qubits** \\ **After Layout** \\ \end{tabular} & \begin{tabular}{c} **Logical Qubits** \\ **Pre- and After Layout** \\ \end{tabular} & \
\begin{tabular}{c} **Min. Logical Qubit** \\ **Error Rate** \\ \end{tabular} &
\begin{tabular}{c} **Min. \(T\) State** \\ **Error Rate** \\ \end{tabular} \\ \hline \multirow{4}{*}{0.01} & (4, 3) & 31,850 & 8 to 25 & \(1.01\times 10^{-9}\) & \(2.22\times 10^{-8}\) \\  & (4, 4) & 32,144 & 9 to 28 & \(3.97\times 10^{-10}\) & \(9.81\times 10^{-9}\) \\  & (4, 5) & 28,380 & 10 to 30 & \(1.80\times 10^{-10}\) & \(4.77\times 10^{-9}\) \\  & (4, 6) & 28,866 & 11 to 33 & \(7.69\times 10^{-11}\) & \(2.23\times 10^{-9}\) \\  & (5, 3) & 28,056 & 9 to 28 & \(2.05\times 10^{-10}\) & \(5.11\times 10^{-9}\) \\  & (5, 4) & 28,380 & 10 to 30 & \(8.53\times 10^{-11}\) & \(2.27\times 10^{-9}\) \\ \hline \multirow{4}{*}{0.1} & (4, 3) & 13450 & 8 to 25 & \(1.12\times 10^{-8}\) & \(2.50\times 10^{-7}\) \\  & (4, 4) & 32,144 & 9 to 28 & \(4.40\times 10^{-9}\) & \(1.10\times 10^{-7}\) \\ \cline{1-1}  & (4, 5) & 32,340 & 10 to 30 & \(2.00\times 10^{-9}\) & \(5.33\times 10^{-8}\) \\ \cline{1-1}  & (4, 6) & 32,634 & 11 to 33 & \(8.47\times 10^{-10}\) & \(2.48\times 10^{-8}\) \\ \cline{1-1}  & (5, 3) & 32,144 & 9 to 28 & \(2.27\times 10^{-9}\) & \(5.70\times 10^{-8}\) \\ \cline{1-1}  & (5, 4) & 32,340 & 10 to 30 & \(9.39\times 10^{-10}\) & \(2.52\times 10^{-8}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Factors of interest for fault-tolerant HHL circuits in heat transfer problems. the outcomes from problems of different sizes to isolate the influence of the data-loading module. An important future direction is incorporating an efficient data-loading scheme into our analysis framework, like block-encoding in [8]. A different data-loading method could have a different accuracy, so it is necessary to investigate how data-loading accuracy and condition number of coefficient matrices collectively affect the solution accuracy. This future direction illustrates the second drawback of this study. That is, our tested coefficient matrices are all well-conditioned. Because our experiments do not utilize randomly generated test cases, we have less control over the matrix properties, including condition number and sparsity. A potential source of ill-conditioned test cases is the methods that naturally have ill-conditioned matrices, such as the Newton systems produced by the interior-point method in optimization problems [13]. Thus, to solve those systems, iterative refinement with the HHL algorithm [9] and a variant of the HHL algorithm in [15], accompanied by the sparse approximate inverse preconditioner, is in our outlook.