# A Quantum Approach for Exploring the Numerical Results of the Heat Equation
## 2 Methodology
### Quantum Circuit  
To implement a quantum circuit that models temperature propagation, one begins by initializing a quantum state \(\mid\ T\left(0\right)\rangle\), representing the initial temperature distribution. Next, the Trotter-Suzuki expansion is used to approximate the time evolution operator \(U=e^{-iH\Delta t}\) for a small time step \(\Delta t\). The Hamiltonian \(H\) is decomposed into parts \(H_{i}\), which are easier to implement using quantum gates. The gates for interaction between adjacent qubits are implemented through CNOT gates and single-qubit rotations, while self-interaction terms are implemented through Z-rotations \(Rz(\theta)\) on each qubit. For each time step, the quantum circuit involves applying these gates sequentially to all decomposed components of the Hamiltonian. Finally, measuring the final state of the system gives the temperature distribution at the next point in time. Repeating these steps allows us to simulate the evolution of the thermal field over time. A quantum circuit for heat propagation is illustrated in Figure 2.  
The level of obtaining a quantum circuit opens up the possibility of its execution both on a quantum computer and on a simulator. The result of this process is a probability distribution of outcomes. To evaluate the performance of a given circuit, an evaluation function is used, which allows us to quantify how well the circuit solves a given problem. The formula for the scoring function can be written as the standard deviation between the actual probability distribution of the qubit states obtained from the simulation and the desired probability distribution, which is the expected temperature distribution in the system. Let \(p_{i}\) be the probability of state \(i\) and \(N\) be the total number of states; then, the formula will look like this:  
\[Relative\ error=\sqrt{\frac{1}{N}\sum_{i=1}^{N}(p_{i}-Desired\ Probability_{i})^{2}}, \tag{11}\]  
where the desired probability is the expected probability of state i in the desired distribution.  
Figure 2: A quantum circuit for heat propagation.  
This formula calculates the standard deviation between the actual and expected probabilities of all states, which allows one to evaluate how close the simulation results are to the expected values. The desired probability depends on what temperature distribution can be obtained in the final system. If the temperature is uniformly distributed throughout the system, then each state should have the same probability.  
For a system with \(N\) qubits, where each qubit can be in the \(\mid 0\rangle\) or \(\mid 1\rangle\) state, there will be a total of \(2^{N}\) different states. If we want a uniform distribution, then the desired probability of each state will be \(\frac{1}{(2^{N})}\).  
Thus, the desired probability for each state \(i\) will be:  
\[Desired\ Probability_{i}=\frac{1}{2^{N}}. \tag{12}\]  
By using the relative error and the desired probability distribution, the effectiveness of the quantum circuit for solving the thermal conductivity problem can be estimated. The smaller the relative error value, the closer the actual probability distribution is to the desired one and the more efficient the scheme. In this case, the relative error is based on the standard deviation, and the desired probability distribution corresponds to a uniform temperature distribution.