Fluid dynamics simulation method of multi-physics field modular quantum circuit
Through multi-physics modular quantum circuits, the limitations of the quantum computing lattice Boltzmann method in nonlinear collision terms and low Reynolds number flow simulations are overcome, efficient and stable complex fluid dynamics simulations are achieved, and computational efficiency and adaptability are improved.
Patent Information
- Application Number
- CN202511187536.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-08-25
AI Technical Summary
The existing quantum computing lattice Boltzmann method has difficulty solving nonlinear collision term problems and is limited to simple one-dimensional and two-dimensional low-Reynolds number flow simulations, and cannot effectively handle complex fluid dynamics problems.
A multi-physics modular quantum circuit is adopted. By initializing quantum registers and auxiliary registers, a quantum migration circuit is designed. The quantum walk method is used to construct a quantum migration gate. Combined with the lattice Boltzmann method, the Hadamard gate and normalization factor are introduced to achieve local update of the distribution function and avoid solving global equations.
It improves computational efficiency, enhances adaptability to complex boundaries, improves the scalability of the algorithm in multi-physics field modeling and parallel computing environments, and provides an efficient and stable numerical calculation method.
Smart Images

Figure CN120688408A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum computing, and in particular to a fluid dynamics simulation method for a multi-physics field modular quantum circuit. Background Art
[0002] With the rapid development of computer science and fluid dynamics, traditional numerical simulation methods have encountered significant bottlenecks in solving fluid dynamics problems. Existing classical computational methods, such as the finite difference method (FDM), finite volume method (FVM), and finite element method (FEM), are particularly limited in terms of computational effort and efficiency in high-dimensional complex fluid systems, turbulent phenomena, large-scale computations, and long simulation times. To address these issues, researchers have proposed a numerical fluid simulation method based on the lattice Boltzmann method (LBM). LBM, through its discretized velocity space and local update rules, can easily simulate the behavior of complex fluids and demonstrates excellent flexibility and efficiency in complex fluid problems involving multi-scale and multi-physics coupling.
[0003] However, despite the good performance of LBM on conventional computers, the computing power and memory resources of classical computers remain insufficient when faced with larger-scale fluid dynamics problems. This is especially true when dealing with multi-body, nonlinear, or high-dimensional fluid problems, where computational time and cost increase significantly. To overcome these challenges, quantum computing, as a revolutionary emerging computing method, is gradually becoming a powerful tool for solving large-scale and complex computational problems.
[0004] Quantum computing exploits properties such as quantum superposition and entanglement, enabling quantum algorithms to achieve efficiency exceeding that of classical computing for specific problems (e.g., Shor's algorithm exponentially speeds up integer factorization). Quantum computing has demonstrated advantages for specific problems, such as integer factorization, quantum simulation, and some linear algebra tasks. However, for large-scale fluid dynamics problems, no known quantum algorithms can achieve exponential speedups, and related research remains in the early stages of exploration. Therefore, combining quantum computing with fluid dynamics simulation methods offers new possibilities for overcoming the bottlenecks of traditional approaches. Summary of the Invention
[0005] The technical problem to be solved by the embodiments of the present invention is to provide a fluid dynamics simulation method for multi-physics field modular quantum circuits, which can solve the shortcomings of the current quantum computing lattice Boltzmann method numerical simulation technology, which is difficult to solve the problem of nonlinear collision terms and is limited to simple one-dimensional and two-dimensional low Reynolds number flow simulation analysis.
[0006] In order to solve the above technical problems, an embodiment of the present invention provides a fluid dynamics simulation method for a multi-physics field modular quantum circuit, comprising the following steps: S1: Select the discrete velocity model DmQn according to the phenomenon to be solved, set the grid size, calculate the required quantum bits and initialize a quantum circuit containing the required quantum bits; S2: Initialize the required quantum registers and auxiliary quantum registers, the lattice Boltzmann equation, the distribution function and the boundary conditions, and transform the distribution function of the collision step in the corresponding lattice Boltzmann method into a linear combination of unitary matrices; S3: Design quantum migration circuit: Use the quantum walk method to construct a quantum migration gate. According to the speed direction in the DmQn model of the LBM method selected in step S1, set the right-sliding gate circuit and the left-sliding gate circuit for each discrete speed direction, or set the migration of the right-sliding gate circuit and the left-sliding gate circuit according to the speed direction combination of the diagonal migration to simulate the migration step in the lattice Boltzmann method. S4: By introducing the H gate into the quantum speed register, and measuring the amplitude and the macroscopic quantity on the all-0 state after the H gate, Among them, the spatial location register is used in S1 and , speed direction register , auxiliary register Managing quantum bits, wherein the spatial position register and Contains qubits, where M represents the number of grid points in each spatial dimension, the velocity direction register Include quantum bits, Q represents the number of discrete velocity directions. In S2, the evolution step of the distribution function is defined as the Adiag diagonal matrix through the diagonal instruction provided in the qiskit library, and the Adiag diagonal matrix is reconstructed into a linear combination of unitary matrices through the LCU method based on the requirements of quantum computing for unitary matrices. The formula is:
[0007] Among them, C A is a Hermitian matrix, and C1 and C2 are the unitary matrix components constructed using CA.
[0008] The superposition operation in S4 includes: By , each quantum bit on the network is subjected to a Hadamard gate, and after application, , and the values are stored in The difference is stored in By only measuring the state when all the qubits on the speed register are in the 0 state To obtain the sum of the distribution functions, the measurement goal is to extract the previous The distribution function and value of each grid point are used to obtain the macroscopic quantity distribution of the fluid.
[0009] In S4, a normalization factor is introduced for each distribution function in the operation of the Hadamard gate, and a .
[0010] Implementing the embodiments of the present invention has the following beneficial effects: it improves computational efficiency, enhances adaptability to complex boundaries, and enhances the algorithm's scalability in multi-physics modeling and parallel computing environments. By employing a local update mechanism for distribution functions, the present invention avoids solving global equations. Boundary processing is simple and flexible, offering greater engineering application potential and physical consistency, thus providing an efficient, stable, and scalable numerical calculation method for complex flow problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 Schematic diagram of the quantum circuit used for QCLBM collision; Figure 2 It is a schematic diagram of right sliding door and left sliding door; Figure 3 yes Example of directional migration; Figure 4 yes Direction Migration Example Figure 5 This is a complete schematic diagram of the density circuit and speed circuit modules. DETAILED DESCRIPTION
[0012] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be described in further detail below with reference to the accompanying drawings.
[0013] A fluid dynamics simulation method for a multi-physics field modular quantum circuit according to an embodiment of the present invention is implemented by the following steps.
[0014] S1: In order to simulate fluid phenomena, it is necessary to define various initial conditions of the fluid, define the required parameters, and define the lattice model DmQn used, including the weight value wts, lattice sound speed, Reynolds number, number of quantum bits n, relaxation parameter and grid number M, etc., according to the phenomenon to be solved.
[0015] Then, based on the discrete lattice model DmQn and grid size parameters in the selected lattice Boltzmann method, the total number of required quantum bits is calculated. In a quantum circuit, it can be divided into four groups of quantum registers, each of which is used to store and manage quantum bits to achieve specific functions. Spatial position register and Contains qubits, where M represents the number of grid points in each spatial dimension. The velocity direction register contains The D2Q9 model has four qubits, where Q represents the number of discrete velocity directions. For example, if Q = 9, four qubits are required. Finally, register a_0 represents an auxiliary qubit, which is used to assist in various circuit operations.
[0016] Regarding the total number of qubits required for the calculation, if the grid is set to 16*16, the model used is the D2Q9 model, and the number of grid points in the x and y directions is 16 each, then the number of qx and qy is log216, or 4 qubits. The speed direction register qd requires log29 carry 1 bit, or 4 qubits, when Q=9. There is also an auxiliary bit qa, which is used to assist in the calculation and is always equal to 1.
[0017] The total number of quantum bits required is qx+qy+qd+qa=4+4+4+1=13.
[0018] To reduce the computational depth of a single quantum circuit, the lattice Boltzmann method of the present invention allows a single circuit to be split into multiple quantum circuits, by keeping other quantum bit registers unchanged and only splitting the speed bit register, such as the D2Q9 model, 16x16 grid, into a combination of D2Q5 and D2Q4.
[0019] Since the calculation result of the quantum circuit is a macroscopic quantity, and the calculation of macroscopic quantities in the LBM method is based on the formula density: RHO= = f0+f1+f2+f3+---fn-1 Based on the calculation of macroscopic quantities in the lbm method, the calculation is mostly the sum of distribution functions in various discrete directions, which can be used to transform the D2Q9 model into: RHO= =f0+f1+f2+f3+f4+f5+f6+f7+f8 Disassemble into: RHO=rho1+rho2rho1= f0+f1+f2+f3+f4 rho2= f5+f6+f7+f8 Therefore, it can be split into two separate circuits for calculation, and finally the results are added together to obtain the same quantity as in the original case.
[0020] The specific splitting method is that the number of other quantum bit registers remains unchanged. The original speed bit registers require 4 in the case of D2Q9. When split into D2Q4 and D2Q5, 2 and 3 speed registers are required respectively to construct two quantum circuits. The construction method of other parts of the quantum circuit is the same as the original steps.
[0021] S2: Initialize the required quantum registers and auxiliary quantum registers, lattice Boltzmann equation, distribution function and boundary conditions.
[0022] The equilibrium distribution function of the lattice Boltzmann method is defined as , in is the lattice sound speed ( is the temperature, is the gas constant), is the weight coefficient, and are the macroscopic density and macroscopic velocity respectively, and fieq is the equilibrium state of the distribution function. The zero-order and first-order macroscopic momentum can be obtained by and calculate.
[0023] The probability distribution function is expressed as the sum of the equilibrium distribution function and the non-equilibrium distribution function: , .
[0024] in is the non-equilibrium distribution function, are the partial derivatives corresponding to the x and y directions, is the partial derivative of the discrete velocity Rewriting the lattice Boltzmann equation as , in .
[0025] After initialization, the LBM method requires a collision step to implement the evolution of the distribution function according to the lattice Boltzmann equation. However, since all operations in quantum computing must be unitary (a unitary matrix multiplied by itself and its transposed matrix yields the identity matrix), non-unitary matrices must be converted to unitary matrices. Using the linear combination unit (LCU) method, the non-unitary matrix CA is split into two unitary matrices, C1 and C2, ensuring that the collision step in the LBM method can be simulated during quantum computing.
[0026]
[0027] The above formula is used to construct a unitary matrix from a Hermitian matrix CA.
[0028] C1 and C2 are the unitary matrix components constructed using CA, satisfying .
[0029] The number of quantum bits is set according to the size of the data to be stored, which is used to simulate and act as the register function in a classical computer. In quantum computing, amplitude is a core concept of quantum state, which reflects the complex value of the "probability" of a quantum system being measured in a specific state. Amplitude is closely related to the probability of a quantum state, but it is essentially a complex value. The measurement probability can only be obtained by squaring (modulo squaring), so This amplitude requirement is met. This condition ensures that the sum of the measurement probabilities of the quantum state is 1, satisfying the amplitude normalization condition.
[0030] Normalizing the amplitude of the matrix CA is the core theoretical foundation for ensuring that the sum of measurement probabilities is 1 in quantum computing. In this problem, by splitting the matrix A into two unitary matrices C1 and C2, the properties of unitary matrices are implicitly satisfied, making quantum computing impossible with traditional non-unitary matrix inputs.
[0031] Where C1 and C2 are two unitary matrices. Figure 1 Schematic diagram of the quantum circuit used for QCLBM collision.
[0032] S3: Quantum migration circuit design: Use the quantum walk method to construct a quantum migration gate. According to the velocity direction in the DmQn model of the LBM method selected in step S1, in order to realize the migration step in QCLBM, a quantum migration gate is constructed based on the principle of quantum walk.
[0033] In the quantum computing lattice Boltzmann method, the system state It is the tensor product of the position state and the direction state, and is used to express the mathematical expression of the gate acting on the quantum state in quantum computing operations: , Where CX represents the CNOT gate, and its formula for acting on the quantum state is: , is the state of the control bit, is the state of the target bit, represents modulo 2 addition (XOR operation), where is the position state, Is the direction (such as "left" (L) or "right" (R)).
[0034] Design left and right migration gates according to the direction state, such as Figure 2 As shown, the matrix operation corresponding to its circuit is as follows: , .
[0035] Among them, R is the right-sliding door matrix and L is the left-sliding door matrix.
[0036] The two matrices above are transposed, representing migrations along the positive and negative x- and y-axes, respectively, within the DmQn matrix. To implement diagonal migrations in the D2Q9 model, a combination of these two gates is required. The migration operation acts on the velocity-direction quantum register qd in the corresponding lattice direction, whose state is encoded using a binary string. By setting control gates at these state positions, migration in the corresponding direction is achieved. The control bits for velocity 1 are binary-coded 001. This indexing method controls migrations in different velocity directions.
[0037] Similar to vectors, to write in the diagonal direction (1, 1), both the x and y directions need to be migrated to achieve the diagonal migration effect.
[0038] The D2Q5 and D2Q9 models have the following directional state encodings:
[0039] in, An example of directional migration is Figure 3 As shown, An example of directional migration is Figure 4 shown.
[0040] After adding the collision gate to the quantum circuit, add the corresponding migration circuit according to the corresponding velocity model and grid size.
[0041] S4: Macro output measurement reading.
[0042] After completing the initialization, collision, and migration processes, in order to extract macroscopic quantities (such as density) from the distribution functions in each link direction, it is necessary to superimpose the PDFs in each link direction. This operation can be achieved by introducing a Hadamard gate into the quantum circuit.
[0043] Each link direction refers to a concept in the LBM method. The distribution function in the LBM method can be divided into multiple speed directions, which is reflected in the formula as follows: f i The i in the d2q9 model has distribution functions of 9 speed directions, f1-f9.
[0044] Superposition is achieved by applying a Hadamard gate to each qubit in each quantum register qd, and then H .
[0045] In the above formula, α and β are the amplitudes in the 0 state and the 1 state respectively. After a quantum bit passes through the H gate, the amplitude in the 0 state becomes the sum of the amplitudes in the 1 state and the 0 state. i Defined in terms of amplitude.
[0046] According to this principle, in the d2q5 method, by referencing the bit of the speed bit register, we can get the state when all the quantum bits on the speed register are in the 0 state. , that is, the superposition of the distribution functions in each link direction.
[0047] In the lattice Boltzmann method, the density of the macroscopic quantity at each grid point is equal to the sum of the distribution functions of all directions at each grid point, that is, = f0+f1+f2+f3+f4 By applying a Hadamard gate to each qubit on each quantum register qd, we have: H .
[0048] The sum is now stored in The difference is stored in state, so we can measure the state when all the qubits on the speed register are in the 0 state. To obtain the sum of the distribution functions. In order to ensure the correctness of the measurement results in the quantum circuit, the operation of the Hadamard gate introduces a normalization factor for each distribution function, which introduces a The measurement goal is to extract the The distribution function and value of each grid point are used to obtain the macroscopic quantity distribution of the fluid.
[0049] Complete density circuit and speed circuit module design such as Figure 5 shown.
[0050] After applying the H gate to the quantum state, we have: H .
[0051] It can be seen that an H gate introduces a denominator with a square root of 2. In this method, before solving the macroscopic quantity, an H gate must be applied to each quantum bit on the speed register. In the end, what we want is only the addition of the amplitudes on the numerator, so multiply by one , This is the number of H gates used on the speed register.
[0052] The above disclosure is only a preferred embodiment of the present invention and certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A fluid dynamics simulation method for multi-physics modular quantum circuits, characterized in that: The following steps are involved: S1: Select the discrete velocity model DmQn according to the phenomenon to be solved, set the grid size, calculate the required quantum bits and initialize a quantum circuit containing the required quantum bits; S2: Initialize the required quantum registers and auxiliary quantum registers, the lattice Boltzmann equation, the distribution function and the boundary conditions, and transform the distribution function of the collision step in the corresponding lattice Boltzmann method into a linear combination of unitary matrices; S3: Design quantum migration circuit: Use the quantum walk method to construct a quantum migration gate. According to the speed direction in the DmQn model of the LBM method selected in step S1, set the right-sliding gate circuit and the left-sliding gate circuit for each discrete speed direction, or set the migration of the right-sliding gate circuit and the left-sliding gate circuit according to the speed direction combination of the diagonal migration to simulate the migration step in the lattice Boltzmann method. S4: By introducing the H gate into the quantum speed register, and measuring the amplitude and the amplitude of the all-0 state after the H gate, the macroscopic quantity is obtained.
2. The fluid dynamics simulation method of multi-physics modular quantum circuit according to claim 1, characterized in that: The spatial location register used in S1 and , speed direction register , auxiliary register Managing quantum bits, wherein the spatial position register and Contains qubits, where M represents the number of grid points in each spatial dimension, the velocity direction register Include quantum bits, Q represents the number of discrete velocity directions.
3. The fluid dynamics simulation method of multi-physics modular quantum circuit according to claim 2, characterized in that: In S2, the evolution step of the distribution function is defined as an Adiag diagonal matrix through the diagonal instruction provided in the qiskit library, and the Adiag diagonal matrix is reconstructed into a linear combination of unitary matrices through the LCU method based on the requirements of quantum computing for unitary matrices. The formula is: Among them, C A is a Hermitian matrix, and C1 and C2 are the unitary matrix components constructed using CA.
4. The fluid dynamics simulation method of multi-physics modular quantum circuit according to claim 3, characterized in that: The superposition operation in S4 includes: By , each quantum bit on the network is subjected to a Hadamard gate, and after application, , and the values are stored in The difference is stored in By only measuring the state when all the qubits on the speed register are in the 0 state To obtain the sum of the distribution functions, the measurement goal is to extract the previous The distribution function and value of each grid point are used to obtain the macroscopic quantity distribution of the fluid.
5. The fluid dynamics simulation method of multi-physics modular quantum circuit according to claim 4, characterized in that: In S4, a normalization factor is introduced for each distribution function during the Hadamard gate operation, and a .
Citation Information
Patent Citations
Quantum flow simulation method and device based on LBM, medium and equipment
CN117408343A
Quantum calculation fluid dynamics simulation method based on lattice Boltzmann method
CN119476128A