# An Early Investigation of the HHL Quantum Linear Solver for Scientific Applications
## 3 Simulator and Resource Estimation Tool  
The statevector simulator carries the simulations in the experiments, SV-Sim [57], in Northwest Quantum Circuit Simulation Environment (NWQSim)(V2.5.0) [44]. As shown in [57], compared to simulators in Aer from Qiskit [58] and qsim from Cirq [59], NWQSim provides specialized computation for a wide range of supported basis gates and archi \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Linear System**} & \multirow{2}{*}{**Problem Dimension**} & \multirow{2}{*}{**Method**} & \# of & \multirow{2}{*}{**\# of**} & \multirow{2}{*}{**\# of \(\text{U}_{3}\)1**} \\  & & & & & \\ \hline \multirow{2}{*}{Section 5.1 Iter. 1} & \multirow{2}{*}{\(5\times 5\)} & QSD & 4 & 100 & 208 \\  & & FABLE & 7 & 73 & 70 \\ \hline \multirow{2}{*}{Section 5.2 Three-point} & \multirow{2}{*}{\(9\times 9\)} & QSD & 4 & 100 & 208 \\  & & FABLE & 9 & 268 & 264 \\ \hline \multirow{2}{*}{Section 5.2 Five-point} & \multirow{2}{*}{\(25\times 25\)} & QSD & 5 & 444 & 904 \\  & & FABLE & 11 & 1039 & 1034 \\ \hline \hline \end{tabular}  
* \(U_{3}\) gate is the \(1\)-qubit rotation gates with \(3\) Euler angles.  
\end{table} 
Table 1: Resource costs of using FABLE [47] to block-encode \(A\) and QSD to synthesize \(e^{2 itA}\). tectures of CPUs and GPUs, such as gate fusion. In Table 2 and later in Section 5, we demonstrate that the gate fusion strategy in NWQSim can reduce about 80% of gates in the circuits without sacrificing error rates. On the other hand, NWQSim utilizes a communication model called \"PGAS-based SHMEM\" that significantly reduces communication latency for intra-node CPUs/GPUs and inter-node CPU/GPU clusters. In this case, SV-Sim has an exceptional performance over other simulators in deep-circuit simulation [57]. Figure 2 shows the running time of the HHL circuit in the size of \(11\) qubits to \(17\) qubits on SV-Sim on four different GPUs. The resource estimator in [42; 43] from Microsoft Azure Quantum establishes a systematic framework to access and model the resources necessary for implementing quantum algorithms on a user-specified fault-tolerant scenario. This tool enables detailed estimation of various computational resources, such as the number of physical qubits, the runtime, and other QEC-related properties to achieve a quantum advantage for certain applications. Specifically, the tool accepts a wide range of qubit and quantum error correction code specifications and an error budget that allows different error rates to simulate a described fault-tolerant environment. The tool is compatible with circuits generated from a high-level quantum computing language or package, including Qiskit and Q#. After a circuit is given, the input is compiled into Quantum Intermediate Representation through a unified processing program, and the estimator can examine the code and record qubit allocation, qubit release, gate operation, and measurement operation. Then, logical-level resources are estimated and used to compute the required physical-level resources further. The tool returns a thorough report on resources demanded to perform the given algorithm on fault-tolerant quantum computers, including the explanation and related mathematical equations of those estimates. A selected list of estimates is described in Section 4, and their values in conducted experiments are displayed in Section 5. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multicolumn{2}{c}{**No. of Qubits**} & \multirow{2}{*}{**CX Gates**} & \multirow{2}{*}{**Depth**} & \multicolumn{2}{c}{**Total No. of Gates**} \\ \(\boldsymbol{n_{d}}\) & & & & **Before Fusion** & **After Fusion** \\ \hline
4 & 6 & 116,535 & 248,084 & 325,189 & 70,804 \\
5 & 7 & 1,111,178 & 2,373,842 & 3,106,244 & 665,921 \\
6 & 8 & 9,335,345 & 19,969,964 & 26,117,061 & 5,557,777 \\
7 & 9 & 78,420,632 & 167,816,254 & 219,386,270 & 46,631,320 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: HHL circuit properties for four random examples. Figure 2: NWQSim performance on different GPUs.