Non-auxiliary-bit quantum lattice Boltzmann method for solving convection-diffusion equation
By designing the Boltzmann method without auxiliary bits (AFQLBM), the problems of excessive computing resource consumption and low algorithm availability of existing quantum LBM algorithms are solved, and the effect of reducing computing resource consumption and improving algorithm availability is achieved.
Patent Information
- Application Number
- CN202510261452.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-06-27
AI Technical Summary
When simulating the convection-diffusion equation, existing quantum LBM algorithms consume too much computing resources and have low algorithm availability, especially when the number of grids is large and time steps are large.
A non-assisted bit quantum lattice Boltzmann method (AFQLBM) is designed to reduce computing resource consumption by encoding the initial variable into quantum states during the encoding stage, collide and flow operations between particles, and trace retention of quantum computing using the traceability of quantum computing, and partially measuring the macroscopic variables that collapse to the next time step.
It effectively reduces the consumption of computing resources, improves the availability of the algorithm, and can read the macro variables at the t-time without measuring the macro variables at the previous moment, improving the efficiency of the algorithm.
Smart Images

Figure CN120217934A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fluid mechanics, and particularly to a qubit-free quantum lattice Boltzmann method for solving the convection-diffusion equation. Background Art
[0002] The lattice Boltzmann method (LBM) is a mesoscopic-scale computational fluid dynamics method. Compared with other computational fluid dynamics methods, LBM has the characteristics of a mesoscopic model between microscopic molecular dynamics models and macroscopic continuous models, and is widely regarded as an effective means for describing fluid motion and dealing with engineering problems.
[0003] In recent years, quantum technology has developed rapidly, and quantum computing has entered the public eye because it is expected to achieve quantum advantage through quantum entanglement and quantum superposition states. Scholars have successively started the combination of quantum computing and computational fluid dynamics methods, including the combination of quantum computing and LBM.
[0004] Due to quantum parallelism, a quantum computer has far greater computing power than a classical computer. However, different from a classical computer, quantum computing requires two steps: encoding and reading. Encoding is to write the initial calculation content into a quantum state, which requires O(B) operations, where B represents the dimension of the data. When reading information, repeated measurements of the quantum state are required, and the number of measurements is inversely proportional to the accuracy of the read result. Generally speaking, to accurately read an n-qubit quantum state, the number of measurements to be performed is exponential in n. The computational resource consumption of encoding and reading is huge and easily destroys the advantage of quantum computing. Therefore, when designing a quantum algorithm, these two steps need to be fully considered.
[0005] Existing quantum LBM algorithms require quantum state tomography in each iteration. When the number of grids divided by the flow model is large and the number of time steps to be simulated is large, the computational resources occupied by quantum state tomography will exceed 50%, which greatly reduces the usability of the algorithm. In addition, when calculating the macroscopic variables at time t, existing algorithms need to sequentially read all the macroscopic variables at the previous time t - 1.
[0006] Therefore, there is a need for a qubit-free quantum lattice Boltzmann method for solving the convection-diffusion equation that can reduce computational resource consumption and has high algorithm usability. Summary of the Invention
[0007] The main object of the present invention is to provide a qubit-free quantum lattice Boltzmann method for solving the convection-diffusion equation to solve the problems of excessive computational resource consumption and low algorithm usability when solving the convection-diffusion equation in the prior art.
[0008] To achieve the above object, the present invention provides a non-aided bit quantum lattice Boltzmann method for solving the convection-diffusion equation, specifically including the following steps:
[0009] S1. In the encoding stage, encode the initial variable φ(x, 0) into the form of a quantum state in the registration set d.
[0010] S2. Particles collide with each other to calculate the collision operator.
[0011] S3. The components of the macroscopic variables flow along the corresponding directions to calculate the quantum state after the flow.
[0012] S4. After one cycle, that is, collision and flow, add the components in each direction to obtain the dependent variable at the next moment.
[0013] Further, encode the initial variable φ(x, 0) into the form of a quantum state in the registration set d:
[0014]
[0015] where M is the number of lattices, φ(i, 0) is the number of particles in the i-th lattice, |i> is the computational basis, and ||·|| is the Euclidean norm.
[0016] Further, step S2 specifically includes the following steps:
[0017] S2.1. During the collision process, denote the linear coefficient in each direction as
[0018]
[0019] where w α is the weight factor in the α direction, e α is the motion direction of the microscopic particle, c s is the speed of sound, and u is the macroscopic flow velocity.
[0020] S2.2. The equilibrium state after collision in each direction is |φ0> is the abbreviation of |φ0(x, 0)>; integrate the equilibrium states in each direction to obtain:
[0021]
[0022] where |φ1(x, 0)> is the quantum state obtained in the quantum circuit, is the Kronecker product.
[0023] S2.3. Use the R y gate with a specific rotation angle and the controlled R y rotation gate to perform local unitary operations in the registration set q:
[0024]
[0025] Among them, θ represents the rotation angle, C-R y (θ) is the controlled R y rotating gate.
[0026] Furthermore, for the D1Q3 model, step S2 further includes the following steps:
[0027] S2.4.1, the rotation angles of the D1Q3 model are A1 and A2 respectively:
[0028]
[0029] S2.4.2, the collision operator of the D1Q3 model is:
[0030]
[0031] Among them, C1 represents that the control bit is 1, I2 is the identity matrix, and the subscript 2 represents the dimension.
[0032] Furthermore, for the D2Q5 model, step S2 further includes the following steps:
[0033] S2.4.3, for the D2Q5 model, the required rotation angles are respectively:
[0034]
[0035]
[0036] S2.4.4, the collision operator of the D2Q5 model is:
[0037]
[0038] Among them, C0 represents that the control bit is 0.
[0039] Furthermore, for the D1Q3 model, step S3 includes the following steps:
[0040] S3.1.1, when performing the flow operation, apply the flow operators R and L to the quantum state after collision. The expressions of the flow operators R and L are:
[0041] R = ∑ k∈[0,M-1] |(k + 1) mod(M)><k|;
[0042] L = ∑ k∈[0,M-1] |k><(k + 1) mod(M)|;
[0043] Among them, mod() is the modulo function, and k is an integer between [0, M - 1].
[0044] S3.1.2, the flow operators R and L are respectively controlled by the phases and After the flow, the quantum state |φ2(x,0)> is:
[0045]
[0046] Among them, f t (x, 1) is the description of the particle distribution in the t direction after the flow, where t = 0, 1, 2.
[0047] Furthermore, for the D2Q5 model, step S3 includes the following steps:
[0048] S3.1.3, for the D2Q5 model, the form of the flow operator becomes:
[0049]
[0050] Among them, S i is the flow operator, which is respectively controlled by the phases where i = 1, 2, 3, 4, and I M is the identity matrix.
[0051] S3.1.4, the quantum state after the flow is obtained as:
[0052]
[0053] Furthermore, taking the D1Q3 model as an example, step S4 specifically includes the following steps:
[0054] S4.1, apply the Hadamard gate to the q register set:
[0055]
[0056] Among them, H represents the Hadamard gate, and |·> represents a meaningless linear combination of f0(x, 1), f1(x, 1), and f2(x, 1).
[0057] S4.2, measure the register set d. If the measurement result partially collapses to the quantum state |00>, then the quantum state in the register set d becomes |φ0(x, 1)> = N1[f0(x, 1) + f1(x, 1) + f2(x, 1)], where N1 is the normalization factor.
[0058] The present invention has the following beneficial effects:
[0059] The present invention designs an Ancilla Free Quantum Lattice Boltzmann Method (AFQLBM). Relying on the trace preservation property of quantum computing, the ancilla bits are removed, and the quantum state collapses to the macroscopic variables at the next time step through partial measurement. Finally, when reading the quantum state, an algorithm is proposed to bypass quantum state tomography, reducing the consumption of computing resources. Most importantly, AFQLBM can read the macroscopic variables at time t through partial collapse of the quantum state without measuring the macroscopic variables at the previous time step, which greatly improves the usability of the algorithm. Brief Description of the Drawings
[0060] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. In the drawings:
[0061] Figure 1 Shows the layout schematic diagram of the D1Q3 model.
[0062] Figure 2 Shows the layout schematic diagram of the D2Q5 model.
[0063] Figure 3 Shows the AFQLBM quantum circuit diagram of the D1Q3 model.
[0064] Figure 4 Shows the AFQLBM quantum circuit diagram of the D2Q5 model.
[0065] Figure 5 Shows the comparison diagram of the numerical simulation results of the classical LBM and AFQLBM of the D1Q3 model.
[0066] Figure 6 Shows the distribution diagram of the macroscopic variables of the D2Q5 model at t = 5.
[0067] Figure 7 Shows the distribution diagram of the macroscopic variables of the D2Q5 model at t = 10.
[0068] Figure 8 Shows the distribution diagram of the macroscopic variables of the D2Q5 model at t = 15.
[0069] Figure 9 Shows the distribution diagram of the macroscopic variables of the D2Q5 model at t = 20. Detailed Embodiments
[0070] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0071] An auxiliary-bit-free quantum lattice Boltzmann method for solving the convection-diffusion equation specifically includes the following steps:
[0072] S1. In the encoding stage, the initial variable φ(x, 0) is encoded into the form of a quantum state in the registration set d; the initial variable φ(x, 0) is the dependent variable of the convection-diffusion equation.
[0073] S2. Particles collide with each other to calculate the collision operator.
[0074] S3. The components of the macroscopic variables flow along the corresponding directions to calculate the quantum state after flow.
[0075] S4. After one cycle, that is, collision and flow, the components in each direction are added to obtain the dependent variable at the next moment.
[0076] The removal of the auxiliary bits reduces the number of required registration sets to one. The remaining registration set is divided into two according to functions, denoted as q and d respectively. The common terms used in the lattice Boltzmann method LBM to describe the problem dimension and the number of velocity directions are DnQm, where n = 1, 2, 3 represents the problem dimension, and m represents the number of particle motion directions. The layout diagrams of the D1Q3 model and the D2Q5 model are as Figure 1 and Figure 2 shown.
[0077] Specifically, the initial variable φ(x, 0) is encoded into the form of a quantum state in the registration set d:
[0078]
[0079] where M is the number of grids, φ(i, 0) is the number of particles in the i-th grid, |i> is the computational basis, ||·|| is the Euclidean norm, and |> is the Dirac symbol. Before the start of the iteration, the value of ||φ(x, 0)||1 = ∑ i φ(i, 0) needs to be recorded because this value is required in the reading stage.
[0080] Specifically, step S2 specifically includes the following steps:
[0081] S2.1. During the collision process, since the equilibrium state maintains a linear relationship with the initial quantum state, the linear coefficient in each direction is denoted as
[0082]
[0083] Among them, w α is the weight factor in the α direction, and e α is the motion direction of the microscopic particle, c s is the speed of sound, and u is the macroscopic flow velocity;
[0084] S2.2, the equilibrium state after collision in each direction is |φ0> is the abbreviation of |φ0(x,0)>; Integrating the equilibrium states in each direction, we get:
[0085]
[0086] Among them, |φ1(x,0)> is the quantum state obtained in the quantum circuit, is the Kronecker product;
[0087] S2.3, to obtain this quantum state in the quantum circuit, local unitary operations (LocalUnitary Operation, LUO) need to be performed on the register set q. The R y gate with a specific rotation angle and the controlled R y rotation gate are used to perform local unitary operations on the register set q:
[0088]
[0089] Among them, θ represents the rotation angle, and C-R y (θ) is the controlled R y rotation gate.
[0090] As Figure 3 and Figure 4 shown, the calculation steps of the LUO rotation angle and the layout of the quantum circuit diagram for the D1Q3 model and the D2Q5 model are given. The number of qubits required for the register set q is The number of qubits required for the D1Q3 model and the D2Q5 model are 2 and 3 respectively.
[0091] Specifically, for the D1Q3 model, step S2 further includes the following steps:
[0092] S2.4.1, the rotation angles of the D1Q3 model are A1 and A2:
[0093]
[0094] S2.4.2, the collision operator of the D1Q3 model is:
[0095]
[0096] Among them, C1-R y (A2) is a controlled R y rotation gate. C1 represents that the control bit is 1, and it acts on R y the gate to the target bit. I2 is the identity matrix, and the subscript 2 represents the dimension.
[0097] Specifically, for the D2Q5 model, step S2 further includes the following steps:
[0098] S2.4.3, for the D2Q5 model, the required rotation angles are respectively:
[0099]
[0100]
[0101] S2.4.4, the collision operator of the D2Q5 model is:
[0102]
[0103] Among them, C0 represents that the control bit is 0. CC-R y The gate represents R y has two control bits, taking C1C0-R y (A4) as an example, it means that when the two control bits are 1 and 0 respectively, R acts on the target bit y (A4) gate. In addition, no operation is required for the target bit.
[0104] Specifically, for the D1Q3 model, step S3 includes the following steps:
[0105] S3.1.1, when performing the flow operation, the flow operators R and L are applied to the quantum state after the collision. The expressions of the flow operators R and L are:
[0106] R = ∑ k∈[0,M-1] |(k + 1) mod (M)><k|;
[0107] L = ∑ k∈[0,M-1] |k><(k + 1) mod (M)|;
[0108] Among them, mod() is the modulo function, and k is an integer between [0, M - 1];
[0109] S3.1.2, the flow operators R and L are respectively controlled by the phases and The quantum state |φ2(x, 0)> after the flow is:
[0110]
[0111] Among them, f t(x, 1) is the description of the particle distribution in the t direction after the flow, where t = 0, 1, 2.
[0112] Specifically, for the D2Q5 model, step S3 includes the following steps:
[0113] S3.1.3, for the D2Q5 model, the form of the flow operator becomes:
[0114]
[0115] where S i is the flow operator, which is respectively controlled by the phase , where i = 1, 2, 3, 4, and I M is the identity matrix.
[0116] S3.1.4, the quantum state after the flow is obtained as:
[0117]
[0118] Specifically, taking the D1Q3 model as an example, step S4 specifically includes the following steps:
[0119] S4.1, finally, for the calculation of the macroscopic variables, the right - hand side of the formula in S3.1.4 needs to be added point - by - point. This operation can be achieved by applying the Hadamard gate to the q register set:
[0120]
[0121] where H represents the Hadamard gate, and |·> represents a meaningless linear combination of f0(x, 1), f1(x, 1), and f2(x, 1);
[0122] S4.2, measure the register set d. If the measurement result partially collapses to the quantum state |00>, then the quantum state in the register set d becomes |φ0(x, 1)> = N1[f0(x, 1)+f1(x, 1)+f2(x, 1)], where N1 is the normalization factor.
[0123] The D2Q5 model can use the same method to calculate the macroscopic variables at the next moment.
[0124] If the iteration continues, |φ0(x, 1)> can be used as the initial state for the next cycle. If it is necessary to read the macroscopic variables, then it is necessary to measure the register set q, and then use ||φ(x, 0)||1 to calculate the new macroscopic variables. We have given the corresponding process for the calculation of the macroscopic variables.
[0125]
[0126]
[0127] To verify the feasibility of the present invention, numerical simulations were respectively carried out on the D1Q3 model and the D2Q5 model. The comparison diagram of the numerical simulation results of the classical LBM ("-") and AFQLBM ("o") of the D1Q3 model is as Figure 5 shown, and the evolution process of the Gaussian mountain of the D2Q5 model is as Figures 6 - 9 shown.
[0128] The method proposed by the present invention has a very significant improvement in terms of computational complexity compared with the previous algorithms. Taking the number of Toffoli gates in quantum computing as the benchmark for measuring the circuit complexity, taking the D2Q5 model of M×M lattice points as a sample, only considering the number of Toffoli gates required for the two schemes to execute the streaming operator for comparison, because the streaming operator occupies the main body of the complexity in QLBM.
[0129] There are 3 qubits in the q register set and log2 M qubits in the d register set, where C n -NOT gates can be decomposed into 2n - 3 Toffoli gates. There are a total of 4 directions for which streaming operations need to be performed, and the number of control bits of the multi-control NOT gates required for each direction is 3, 4, …, log2 M + 2, which is converted into Toffoli gates as 3, 5, 7, …, 2log2 M + 1. Finally, the total number of Toffoli gates required can be calculated as And the number of Toffoli gates required for the previous algorithm can be calculated as Although the highest order of magnitude remains the same, the reduction of the O(log2 M) order of magnitude is a great improvement for current quantum devices and quantum simulators.
[0130] The method proposed by the present invention does not require quantum state tomography and precisely avoids this obstacle that iterative algorithms often encounter, so it has better application prospects. AFQLBM is not a quantization of classical LBM, but a practical quantum algorithm that can be implemented on a real quantum computer.
[0131] The present invention can not only be used to solve one-dimensional and two-dimensional convection-diffusion equations, but also can be extended to more complex LBM models such as D2Q9 and D3 models for convection-diffusion equations. In addition, it can also conduct research on convection-diffusion problems with non-periodic boundary conditions, molecular flow models around blunt bodies, two-dimensional lid-driven cavity flow, etc.
[0132] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by those skilled in the art within the essence of the present invention should also fall within the protection scope of the present invention.
Claims
1. An unassisted bit quantum lattice Boltzmann method for solving the convection-diffusion equation, characterized in that: The specific steps include: S1, in the encoding phase, encode the initial variable φ(x,0) into the form of quantum state in the registration set d; S2, particles collide with each other and calculate the collision operator; S3, the components of the macroscopic variables flow along the corresponding directions, and the quantum states after the flow are calculated; S4, after one cycle, i.e., collision and flow, the components in each direction are added together to obtain the dependent variable at the next moment.
2. The unassisted bit quantum lattice Boltzmann method for solving the convection-diffusion equation according to claim 1, characterized in that: In the registration set d, the initial variable φ(x,0) is encoded into the form of quantum state: Where M is the number of grids, φ(i,0) is the number of particles in the i-th grid, |i> is the calculation basis, and ‖·‖ is the Euclidean norm.
3. The unassisted bit quantum lattice Boltzmann method for solving the convection-diffusion equation according to claim 1, characterized in that: Step S2 specifically includes the following steps: S2.1, during the collision, the linear coefficient in each direction is recorded as Among them, w α is the weight factor in the α direction, e α is the direction of motion of the microscopic particles, c s is the speed of sound, u is the macroscopic flow velocity; S2.2, the equilibrium state after collision in each direction is |φ0> is an abbreviation of |φ0(x,0)>; integrating the equilibrium states in all directions, we get: Among them, |φ1(x,0)> is the quantum state obtained in the quantum circuit, is the Kronecker product; S2.3, using R with a specific rotation angle in the registration set q y Gate and controlled R y The revolving door performs a local unitary operation: Where θ represents the rotation angle, CR y (θ) is the controlled R y Revolving door.
4. The unassisted bit quantum lattice Boltzmann method for solving the convection-diffusion equation according to claim 3, characterized in that: For the D1Q3 model, step S2 also includes the following steps: S2.4.1, the rotation angles of the D1Q3 model are A1 and A2: S2.4.2, the collision operator of the D1Q3 model is: Among them, C1 indicates that the control bit is 1, I2 is the unit matrix, and the subscript 2 indicates the dimension.
5. The unassisted bit quantum lattice Boltzmann method for solving the convection-diffusion equation according to claim 3, characterized in that: For the D2Q5 model, step S2 also includes the following steps: S2.4.3, for the D2Q5 model, the required rotation angles are: S2.4.4, the collision operator of the D2Q5 model is: Among them, C0 indicates that the control bit is 0.
6. The unassisted bit quantum lattice Boltzmann method for solving the convection-diffusion equation according to claim 1, characterized in that: For the D1Q3 model, step S3 includes the following steps: S3.1.1, when performing flow operation, the flow operators R and L are applied to the quantum state after the collision. The expressions of the flow operators R and L are: R=∑ k∈[0,M-1] |(k+1)mod(M)><k|; L=∑ k∈[0,M-1] |k><(k+1)mod(M)|; Where mod() is the modulus function, and k is an integer between [0, M-1]; S3.1.2, the flow operators R and L are respectively and The quantum state |φ2(x,0)> after the flow is controlled by: Among them, f t (x,1) is the description of the particle distribution in the t direction after flow, t=0,1,2.
7. The unassisted bit quantum lattice Boltzmann method for solving the convection-diffusion equation according to claim 1, characterized in that: For the D2Q5 model, step S3 includes the following steps: S3.1.3, for the D2Q5 model, the form of the flow operator becomes: Among them, S i is the flow operator, respectively, controlled, i=1,2,3,4,I M is the identity matrix; S3.1.4, the quantum state after the flow is obtained:
8. The unassisted bit quantum lattice Boltzmann method for solving the convection-diffusion equation according to claim 1, characterized in that: Taking the D1Q3 model as an example, step S4 specifically includes the following steps: S4.1, apply the Hadamard gate to the q registration set: Here, H represents the Hadamard gate, and |·> represents the meaningless linear combination of f0(x,1), f1(x,1) and f2(x,1); S4.2, measure the registration set d. If the measurement result partially collapses to the quantum state |00>, the quantum state in the registration set d becomes |φ0(x,1)>=N1[f0(x,1)+f1(x,1)+f2(x,1)], where B1 is the normalization factor.