A method for hydrodynamic simulation of a multi-physics modular quantum circuit
By using multiphysics modular quantum circuits, the shortcomings of the quantum computing lattice Boltzmann method in simulating nonlinear collision terms and low Reynolds number flows are addressed, achieving efficient and stable fluid dynamics simulation and improving the computational power for complex fluid problems.
Patent Information
- Application Number
- CN202511187536.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-08-25
AI Technical Summary
Existing quantum computing lattice Boltzmann methods struggle to solve nonlinear collision problems and are limited to simple one-dimensional and two-dimensional low Reynolds number flow simulations, failing to effectively handle complex fluid problems.
A multiphysics modular quantum circuit is adopted. By initializing the quantum register and auxiliary register, a quantum transfer circuit is designed. The quantum transfer gate is constructed using the quantum walk method. Combined with the distribution function evolution and quantum superposition operation in the lattice Boltzmann method, fluid dynamics simulation is realized.
It improves computational efficiency, enhances adaptability to complex boundaries, improves the scalability of the algorithm in multiphysics modeling and parallel computing environments, and provides an efficient and stable numerical computation method.
Smart Images

Figure CN120688408B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of quantum computing, and in particular to a fluid dynamics simulation method of a multi-physical field modular quantum circuit. BACKGROUND
[0002] With the rapid development of computer science and fluid dynamics, the traditional numerical simulation method encounters significant bottlenecks in solving fluid dynamics problems. Especially in the scene of high-dimensional complex fluid system, turbulent phenomenon, large-scale calculation and long-time simulation, the existing classical calculation methods such as finite difference method (FDM), finite volume method (FVM) and finite element method (FEM) have serious limitations in calculation amount and calculation efficiency. To solve these problems, scholars have proposed a numerical fluid simulation method based on the lattice Boltzmann method (Lattice Boltzmann Method, LBM). LBM can more simply simulate the behavior of complex fluids through a discrete velocity space and local update rule, and has better flexibility and efficiency in complex fluid problems with multi-scale and multi-physical field coupling.
[0003] However, although LBM performs well on traditional computers, the computing power and memory resources of classical computers are still insufficient when facing larger-scale fluid dynamics problems, especially when dealing with multi-body, nonlinear or high-dimensional fluid problems, the time and cost of calculation are greatly increased. In order to overcome these challenges, quantum computing as a revolutionary emerging computing method has gradually become a powerful tool for solving large-scale and complex computing problems.
[0004] Quantum computing uses quantum superposition and entanglement to achieve efficiency beyond classical computing through quantum algorithms on certain problems (such as Shor's algorithm for integer factorization). Quantum computing has proven to have an advantage in quantum algorithms for certain problems (such as integer factorization, quantum simulation, and partial linear algebra tasks). However, for large-scale fluid dynamics problems, there is currently no known quantum algorithm that can achieve exponential speedup, and related research is still in the early exploratory stage. Therefore, combining quantum computing with fluid dynamics simulation methods provides a new possibility for solving the bottlenecks of traditional methods. SUMMARY
[0005] The technical problem to be solved by the embodiments of the present application is to provide a fluid dynamics simulation method of a multi-physical field modular quantum circuit, which can solve the current quantum computing lattice Boltzmann method numerical simulation technology, which is difficult to solve the problem of nonlinear collision term, and is limited to simple one-dimensional and two-dimensional low Reynolds number flow simulation analysis status.
[0006] To solve the above technical problems, the embodiment of the present application provides a fluid dynamics simulation method of a multi-physical field modular quantum circuit, comprising the following steps:
[0007] S1: selecting a discrete velocity model DmQn according to a phenomenon to be solved, setting a grid size, calculating required quantum bits, and initializing a quantum circuit containing the required quantum bits;
[0008] S2: initializing required quantum registers and auxiliary quantum registers, lattice Boltzmann equations, distribution functions, and boundary conditions, and evolving the distribution function corresponding to the collision step in the lattice Boltzmann method into a linear combination of unitary matrices;
[0009] S3: designing a quantum migration circuit: using a quantum walk method to construct a quantum migration gate, setting a right shift gate circuit and a left shift gate circuit for each discrete velocity direction according to the velocity direction in the DmQn model of the LBM method selected in step S1, or setting the migration of the right shift gate circuit and the left shift gate circuit according to the velocity direction combination of the diagonal migration to simulate the migration step in the lattice Boltzmann method;
[0010] S4: introducing an H gate in the quantum velocity register, and obtaining macroscopic quantities by measuring the amplitude on the all-0 state after the H gate
[0011] In the S1, the spatial position register and the velocity direction register , and the auxiliary register manage quantum bits, wherein the spatial position register and each contains quantum bits, wherein M represents the number of grid points in each spatial dimension, the velocity direction register contains quantum bits, and Q represents the number of discrete velocity directions.
[0012] In the S2, the evolution step of the distribution function is defined as an Adiag diagonal matrix by using the diagonal instruction provided in the qiskit library, and the Adiag diagonal matrix is reconstructed into a linear combination of unitary matrices according to the requirement of quantum calculation on unitary matrices by using the LCU method, and the formula is:
[0013]
[0014] wherein C A is a Hermitian matrix, C1 and C2 are unitary matrix components constructed by using CA.
[0015] The superposition operation in the S4 comprises:
[0016] By each quantum register Each qubit on the qubit is treated with a Hadamard gate, after which there is The sum is stored in The state, the difference is stored in The state is determined by measuring only the state when all qubits in the speed register are in a 0 state. To derive the sum of the distribution functions, the measurement objective is to extract the prior... The distribution function and values of each grid point are used to obtain the macroscopic quantity distribution of the fluid.
[0017] In S4, a normalization factor is introduced for each distribution function during the Hadamard gate operation, and a normalization factor is introduced during post-processing. .
[0018] Implementing the embodiments of this invention has the following beneficial effects: This invention improves computational efficiency, enhances adaptability to complex boundaries, and improves the scalability of the algorithm in multiphysics modeling and parallel computing environments. By employing a local update mechanism for the distribution function, this invention avoids solving global equations; boundary handling is simple and flexible, possessing better engineering application potential and physical consistency, thus providing an efficient, stable, and scalable numerical computation method for complex flow problems. Attached Figure Description
[0019] Figure 1 A schematic diagram of a quantum circuit used for QCLBM collisions;
[0020] Figure 2 This is a diagram of a right-sliding door and a left-sliding door;
[0021] Figure 3 yes Example of direction migration;
[0022] Figure 4 yes Directional migration example
[0023] Figure 5 This is a complete schematic diagram of the density circuit and speed circuit modules. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings.
[0025] A method for simulating the fluid dynamics of a multiphysics modular quantum circuit according to an embodiment of the present invention is implemented through the following steps.
[0026] S1: In order to simulate fluid phenomena, based on the phenomena to be solved, 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 velocity, Reynolds number, number of qubits n, relaxation parameters, and number of grids M, etc.
[0027] Then, based on the discrete lattice model DmQn and other parameters such as the lattice size in the selected lattice Boltzmann method, the total number of qubits required is calculated. In a quantum circuit, it can be divided into four groups of quantum registers, each group used to store and manage qubits to achieve a specific function. Spatial location registers... and Each contains The velocity direction register contains qubits, where M represents the number of grid points in each spatial dimension. The number of qubits is Q, which represents the number of discrete velocity directions. For example, in the D2Q9 model, Q=9, so 4 qubits are needed. Finally, register a_0 represents auxiliary qubits used to assist in various circuit operations.
[0028] In the total number of qubits required for the calculation, if the grid is set to 16*16 and the model used is the D2Q9 model, with 16 grid points in each of the x and y directions, then the number of qx and qy is log216, which is 4 qubits; the velocity direction register qd requires a carry-over of log29 when Q=9, which is 4 qubits, and there is also an auxiliary bit qa, which is used to assist in the calculation and is always equal to 1.
[0029] The total number of qubits required is qx + qy + qd + qa = 4 + 4 + 4 + 1 = 13.
[0030] To reduce the computational depth of a single quantum circuit, the lattice Boltzmann method of this invention allows a single circuit to be split into multiple quantum circuits by keeping other qubit registers unchanged and splitting only the velocity qubit register, such as the D2Q9 model, a 16x16 grid, into a combination of D2Q5 and D2Q4.
[0031] Since the computational results of quantum circuits are macroscopic quantities, and the macroscopic quantity calculations in the LBM method are based on formula density:
[0032] The calculation of macroscopic quantities in the LBM method is mostly the summation of distribution functions in various discrete directions, which can be applied to the D2Q9 model:
[0033]
[0034] Disassembled into:
[0035] RHO=rho1+rho2rho1= f0+f1+f2+f3+f4
[0036] rho2 = f5 + f6 + f7 + f8
[0037] Therefore, the calculation can be performed by splitting the circuit into two separate circuits, and the results can be summed to obtain the same quantity as before the circuit was not split.
[0038] The specific splitting method is to keep the number of other quantum bit registers unchanged. Originally, four speed bit registers were needed in the case of D2Q9. When splitting into D2Q4 and D2Q5, two and three speed registers are needed respectively. Two quantum circuits are constructed, and the construction method of other parts of the quantum circuits is the same as the original steps.
[0039] S2: Initialize the required quantum registers and auxiliary quantum registers, lattice Boltzmann equations, distribution functions, and boundary conditions.
[0040] The equilibrium distribution function of the defined lattice Boltzmann method is: ,
[0041] in For lattice speed of sound ( For temperature, (where the gas constant is...) These are the weighting coefficients. and These represent macroscopic density and macroscopic velocity, respectively, f i eq This represents the equilibrium state of the distribution function. The zeroth and first-order macroscopic momentum can be obtained through... and calculate.
[0042] The probability distribution function can be expressed as the sum of the equilibrium distribution function and the non-equilibrium distribution function:
[0043] ,
[0044] .
[0045] in It is a non-equilibrium distribution function. These are the partial derivatives in the x and y directions. It involves taking the partial derivative with respect to the discrete velocity.
[0046] The lattice Boltzmann equation is rewritten as follows:
[0047] ,
[0048] in
[0049] .
[0050] After initialization, based on the LBM method, a collision step is required to implement the evolution of the distribution function according to the lattice Boltzmann equation. Since all operations in quantum computing must be unitary (a unitary matrix multiplied by itself and its transpose equals the identity matrix), non-unitary matrices need to be transformed into unitary matrices. By employing the Linear Combining Unit (LCU) method, the non-unitary matrix CA is decomposed into two unitary matrices, C1 and C2, ensuring that the collision step in the LBM method can be simulated during quantum computing.
[0051]
[0052] The above formula is used to construct a unitary matrix from a Hermitian matrix CA.
[0053] C1 and C2 are the unitary matrix components constructed using CA, satisfying...
[0054] .
[0055] The number of qubits, set according to the size of the data to be stored, is used to simulate and act as registers in classical computers.
[0056] In quantum computing, amplitude is a core concept of quantum states. It 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 probability of measurement can only be obtained by squaring (taking the square modulo). This amplitude requirement is met, which ensures that the sum of the measurement probabilities of the quantum state is 1, thus satisfying the amplitude normalization condition.
[0057] Normalization of the amplitude of matrix CA is a core theoretical foundation for ensuring that the sum of measurement probabilities is 1 in quantum computing. In this problem, by dividing matrix A into two unitary matrices C1 and C2, the properties of unitary matrices are implicitly satisfied, and traditional non-unitary matrix inputs cannot be used for quantum computing.
[0058] C1 and C2 are two unitary matrices. Figure 1 This is a schematic diagram of a quantum circuit used for QCLBM collisions.
[0059] S3: Quantum Transfer Circuit Design: A quantum transfer gate is constructed using the quantum walk method. Based on the velocity direction in the DmQn model of the LBM method selected in step S1, a quantum transfer gate is constructed based on the principle of quantum walk in order to realize the transfer step in QCLBM.
[0060] In the quantum computing lattice Boltzmann method, the system state It is the tensor product of the position and orientation states, used to express the mathematical representation of the gate's action on the quantum state in quantum computing operations:
[0061] ,
[0062] Where CX represents the CNOT gate, and its formula for acting on the quantum state is:
[0063] ,
[0064] It controls the state of the bits. It is the state of the target bit. This represents modulo 2 addition (XOR operation), where... It is a positional state. It is a directional state (such as "left" (L) or "right" (R)).
[0065] Design left and right migration gates based on directional states, such as Figure 2 As shown, the matrix operations corresponding to its lines are as follows:
[0066] , .
[0067] Where R is the right-moving-gate matrix and L is the left-moving-gate matrix.
[0068] The two matrices mentioned above are transposes of each other, representing the positive and negative migrations along the x and y axes in the DmQn matrix, respectively. To achieve 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 according to the corresponding lattice direction, and its state is encoded using a binary string. By setting control gates at its state positions, the effect of migration in the corresponding direction is achieved. The control bit for the velocity 1 direction is encoded as 001 in binary, and this indexing method controls the migration in different velocity directions.
[0069] Similar to vectors, to write the diagonal direction (1,1), it is necessary to migrate both the x and y directions to achieve the effect of diagonal migration.
[0070] The state encoding for each direction of the D2Q5 and D2Q9 models is as follows:
[0071]
[0072] in, Example of directional migration Figure 3 As shown, Example of directional migration Figure 4 As shown.
[0073] After adding collision gates to the quantum circuits, corresponding migration circuits are added based on the corresponding velocity model and mesh size.
[0074] S4: Macroscopic quantity output measurement and reading.
[0075] After initialization, collision, and migration processes are completed, in order to extract macroscopic quantities (such as density) from the distribution functions in each link direction, the PDFs in each link direction need to be superimposed. This operation can be achieved by introducing a Hadamard gate into the quantum circuit.
[0076] Each link direction refers to a concept in the LBM method. In the LBM method, the distribution function can be divided into multiple velocity directions, which is reflected in the formula. f i In the d2q9 model, i has distribution functions for nine velocity directions, from f1 to f9.
[0077] Superposition is achieved by applying an H-gate to each qubit in each quantum register qd, resulting in H... .
[0078] In the above equation, α and β represent the amplitudes in state 0 and state 1, respectively. After passing a qubit through an H-gate, the amplitude in state 0 becomes the sum of the amplitudes in state 1 and state 0. In the above, the distribution function f is encoded using amplitude encoding. i Defined on amplitude.
[0079] Based on this principle, in the d2q5 method, by referencing the bits in the velocity bit register, one can obtain the state when all the qubits in the velocity register are in a 0 state. That is, the superposition of distribution functions in each link direction.
[0080] In the lattice Boltzmann method, the macroscopic quantity density at each lattice point is equal to the sum of the distribution functions in all directions at that lattice point. = f0+f1+f2+f3+f4
[0081] By applying a Hadamard gate to each qubit in each quantum register qd, the following is obtained:
[0082] H .
[0083] At this point, the sum is stored in The state, the difference is stored in Therefore, it can be determined by measuring only the state when all qubits in the speed register are in the 0 state. This is used to derive the sum of the distribution functions. To ensure the accuracy of measurements in the quantum circuit, the Hadamard gate operation introduces a normalization factor for each distribution function, which introduces a [normalization factor] during post-processing. The goal of the measurement is to extract the pre-extraction material. The distribution function and values of each grid point are used to obtain the macroscopic quantity distribution of the fluid.
[0084] Complete density circuit and speed circuit module design, such as Figure 5 As shown.
[0085] After applying the H-gate to the quantum state, we have:
[0086] H .
[0087] As can be seen, an H-gate introduces a denominator of √2. In this method, an H-gate must be applied to each qubit in the velocity register before solving for the macroscopic quantity. However, what we ultimately want is only the sum of the amplitudes in the numerator, so we multiply by √2. , This refers to the number of H gates used in the speed register.
[0088] The above description is merely a preferred embodiment of the present invention and should not be construed as limiting the scope of the invention. Therefore, any equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.
Claims
1. A method for simulating the fluid dynamics of multiphysics modular quantum circuits, characterized in that, Includes the following steps: S1: Select the discrete velocity model DmQn based on the phenomenon to be solved, set the grid size, calculate the required qubits, initialize a quantum circuit containing the required qubits, and use a spatial location register. and Velocity Direction Register Auxiliary registers Managing qubits, wherein the spatial location register and Each contains The velocity direction register contains qubits, where M represents the number of grid points in each spatial dimension. Include 1 qubit, where Q represents the number of discrete velocity directions; S2: Initialize the required quantum registers and auxiliary quantum registers, lattice Boltzmann equations, distribution functions, and boundary conditions. Evolve the distribution function of the collision step in the corresponding lattice Boltzmann method into a linear combination of unitary matrices, including the following steps: The equilibrium distribution function of the defined lattice Boltzmann method is: , in For the speed of sound in a grid, For temperature, The gas constant is... These are the weighting coefficients. and These represent macroscopic density and macroscopic velocity, respectively, f i eq For the equilibrium state of the distribution function, the zeroth and first order macroscopic momentum can be obtained through... and calculate; The probability distribution function can be expressed as the sum of the equilibrium distribution function and the non-equilibrium distribution function: , ; in It is a non-equilibrium distribution function. It is the partial derivative over all spatial directions. It involves taking the partial derivative with respect to the discrete velocity; The lattice Boltzmann equation is rewritten as follows: , in ; S3: Design quantum migration circuit: Construct quantum migration gates using the quantum walk method. Based on the velocity direction in the DmQn model of the LBM method selected in step S1, set up right and left sliding gate lines for each discrete velocity direction, or set up the migration of right and left sliding gate lines based on the combination of diagonal migration velocity directions to simulate the migration steps in the lattice Boltzmann method. S4: By introducing a Hadamard gate into the quantum velocity register, and measuring the amplitude in the all-zero state after the Hadamard gate, macroscopic quantities are obtained; by measuring the amplitude in each quantum register... Each qubit on the array is given a Hadamard gate, which results in: Where α and β are the amplitudes in state 0 and state 1, respectively, and the sum is stored in The state, the difference is stored in The state is determined by measuring only the state when all qubits in the speed register are in a 0 state. To derive the sum of the distribution functions, the measurement objective is to extract the prior... The distribution function and values of each grid point are used to obtain the macroscopic quantity distribution of the fluid.
2. The method for hydrodynamic simulation of multiphysics modular quantum circuits according to claim 1, characterized in that, In step S2, the evolution step of the distribution function is defined as an Adiag diagonal matrix using the diagonal instruction provided in the qiskit library. The Adiag diagonal matrix is then reconstructed into a linear combination of unitary matrices using the LCU method, based on the requirements of quantum computing for unitary matrices. The formula is as follows: Among them, C A C1 and C2 are Hermitian matrices, and C1 and C2 are the unitary matrix components constructed using CA.
3. The method for hydrodynamic simulation of multiphysics modular quantum circuits according to claim 1, characterized in that, In S4, a normalization factor is introduced for each distribution function during the Hadamard gate operation, and a normalization factor is introduced during post-processing. .
Citation Information
Patent Citations
Quantum calculation fluid dynamics simulation method based on lattice Boltzmann method
CN119476128A