WorksPhysics and Astronomy
Quantum Carleman Linearization of the Lattice Boltzmann Equation with Boundary Conditions
Abstract
The Lattice Boltzmann Method (LBM) is widely recognized as an efficient algorithm for simulating fluid flows in both single-phase and multi-phase scenarios. In this research, a quantum Carleman Linearization formulation of the Lattice Boltzmann equation is described, employing the Bhatnagar Gross and Krook equilibrium function. Our approach addresses the treatment of boundary conditions with the commonly used bounce back scheme. The accuracy of the proposed algorithm is demonstrated by simulating flow past a rectangular prism, achieving agreement with respect to fluid velocity In comparison to classical LBM simulations. This improved formulation showcases the potential to provide computational speed-ups in a wide range of fluid flow applications. Additionally, we provide details on read in and read out techniques.
Introduction
Fluid flow simulations have myriad applications across engineering and scientific domains. One notably significant application pertains to fluid flow in porous media, which holds relevance for scenarios such as bone marrow circulation, hydrocarbon extraction from reservoirs, and filtration processes [1]. However, the simulation of porous media poses challenges, such as the characterization of pore-space geometry and the integration of fluid-solid interfacial phenomena [1][2].
One possible technique to address these computational bottlenecks, the Lattice Boltzmann Method (LBM), has emerged as a promising contender for addressing flow through porous media in view of its ability to handle complex boundary conditions and efficiently simulate fluid/fluid interfaces [1]. However, computational efficiency remains a concern, particularly when simulating large-scale porous structures, as these simulations have significant memory demands [1], thereby motivating a quantum formulation of the LBM.
Several approaches have been established for a quantum Lattice Boltzmann (QLB) formulation, including the treatment of QLB as a quantum walk [3] and the implementation of the LBM with quantum Carleman Linearization [4][5]. While the Carleman Linearization technique applied to the LBM has showcased the potential for exponential quantum advantage in fluid dynamics simulations, the treatment of boundary conditions remains unaddressed [5]. Thus, an improvement of the Quantum Carleman Linearization of the Lattice Boltzmann model (QCL-LBM) is necessary to treat boundary conditions.
This study introduces a QCL-LBM approach aimed at enhancing the capabilities of fluid flow simulations in quantum computing. The collision operator of the LBM is formulated similarly to previous methodologies employing the Bhatnagar Gross and Krook (BGK) equilibrium function, however, adaptations are made to the propagation step [6]. This adapted step yields enhanced simulation accuracy and allows for treatment of boundary conditions using the widely adopted bounce back scheme [7].
The objective of this paper is to demonstrate the precision and potential applications of the improved QCL-LBM, as well as describe read-in and read-out methods for a complete quantum circuit. To achieve this objective, the proposed formulation is benchmarked against a classical LBM simulation. As a means of validation, the flow around a rectangular prism is considered, a classical benchmark scenario in the realm of fluid flow simulations [8].
Lattice Boltzmann Method
The LBM is a powerful numerical technique used to simulate fluid flows. Originating from the kinetic theory of gases, the LBM has gained popularity due to its simplicity, efficiency, and ability to handle complex geometries [9].
At the core of the LBM lies the Lattice Boltzmann Equation (LBE), which provides a discrete, mesoscopic representation of the fluid dynamics governed by the Boltzmann equation [10]. The LBE describes the evolution of particle distribution functions, denoted as , encoding the probability of finding particles with velocities at a lattice node and time . A lattice is constructed from a spatial discretization, commonly done uniformly.
The evolution of these distribution functions over the lattice occurs through two fundamental steps: the collision step, where particles interact and redistribute their populations, and the streaming step, where particles propagate to neighboring lattice nodes based on their discrete velocities [7].
Collision and Propagation
The collision step is given by:
where is the time step size and is the collision operator representing the interactions between particles. A common implementation of the collision operator is the BGK model which describes the fluid as relaxing towards equilibrium with collisions between the fluid molecules.
The equation for the BGK model is:
where is the characteristic time scale and is the equilibrium density calculated as follows:
where is a weighting coefficient dependent upon the velocity scheme, is the velocity direction vector associated with particle , $\rho(\mathbf{x},t)=
is the fluid density at lattice point , is the macroscopic fluid velocity at point , and is the number of discrete velocity directions, discussed below.
The propagation step is given by:
In this step, the particle distribution functions are propagated towards nearby lattice points based upon their velocity.
Common Velocity Schemes
In the LBM, velocity is discretized into a fixed number of directions. The dimension the simulation is performed in and the number of velocity directions governs the velocity scheme, represented as . Two widely used velocity schemes are D2Q9 and D3Q19, operating in two and three dimensions, respectively [11]. D2Q9, shown in Figure 1, employs nine discrete velocities in a two-dimensional simulation, and is used in this paper.

Figure 1. D2Q9 velocity scheme for LBM with numbers corresponding to index
Carleman Linearization of the LBE
In Carleman Linearization, a nonlinear dynamical system is transformed into an infinite dimensional linear system [12]. The linear system solution is constructed from Kronecker products of the solution vector as such:
and placed into a linear system:
where is derived from the nonlinear system associated with solution . As approaches infinity, the solution to this system gives the exact solution of the nonlinear system:
Scheme for D1Q3 model
For simplicity, we first consider the D1Q3 scheme for LBM depicted in Figure 2. For the D1Q3 scheme, the weighting coefficients are:

Figure 2. D1Q3 Grid with Two Lattice Points
From equation 1, we derive the time evolution of for the collision step as:
where
Since the distribution at index doesn’t change in propagation, this is the final equation for the time step of . To treat the prefactor, a first order Taylor approximation will be made as such:
where is the average fluid density. This approximation results in error, which is acceptable since the LBE approximates the Navier-Stokes Equations (NSE) to an error of [5].
For , however, propagation must be taken into account. In a single time step, the particle population will be replaced by a collision adjusted population coming from lattice point .
Specifically, will be propagated into its place. This can be represented as:
This is formulated differently than the previous QCL-LBM, with the populations being subtracted fully and replaced with propagated neighboring populations and the collision operator being dependent on that propagated population rather than the current population.
Carleman Linearization
Since third order terms appear in the derivative of the first order terms, a truncation of at least order 3 is required to recover the NSE using Carleman Linearization [5]. This can be represented as:
where
and denoting the streaming operator defined as:
Now, we may represent the collision and streaming operator in a Carleman Linearization matrix as such:
and
where
A larger truncation number may be used, but the resulting variable blowup would limit the number of nodes that are computationally tractable. The total number of variables associated with a truncation number can be represented as:
where is the number of fluid nodes and is the number of boundary condition nodes within simulation bounds. A forwards Euler approximation can now be made with and inserted into the linear system equation:
where
and
where is the solution at the -th time step, is the initial condition generated as:
Boundary Conditions
Treatment of the interaction of fluid with solid boundary conditions is important to the accuracy of the LBM. The bounce back scheme is commonly used to impose no-slip boundary conditions, particularly for solid walls [13]. In this method, when particles collide with a boundary, their velocities are reversed. This results in a modified propagation step, depicted in Figure 3.

Figure 3. Bounce back scheme for LBM
Using the bounce back scheme, boundary conditions can be implemented under this streaming operator construction. To demonstrate, the example from Figure 4 will be worked out. In a time step, populations that propagate into boundaries "bounce" back and adopt an opposing velocity. Imposing the bounce back scheme will result in the distribution reflecting back towards the population of . As such the time stepping equation can be written out as:

Figure 4. D1Q3 Grid with Two Lattice Points and Boundary Condition
To implement this, the and operators must be modified. To do so, a pre-streaming step is performed, determining the resulting location of various populations after a classical streaming step. The results of this step are then used to shift terms in with various swaps making the operator dependent upon the correct populations. This entails using the streaming step of the imaginary node outside the boundaries and replacing it with the reflected population. To create , a similar process is performed. Since the streaming operator defined in Equation (15) depends on itself regardless of streamed population, the identity matrix is adjusted with identical swaps to represent the term, and then added to a negative identity matrix, representing the term. This allows the population to be adjusted by subtracting the current population and adding the new streamed population. Modifying these two operators allows for the QCL-LBM to properly treat boundary conditions both within and on the bounds of the simulation.
Computational Results
To test the improved schema for the QCL-LBM, code was developed to process the collision and streaming matrices. These can then be placed into the large A matrix formulated in Equation (20). However, a complete quantum computer would be required to solve the linear system, thus to simulate, we iteratively step the solution through time. This was done with a D2Q9 formulation to test flow past a rectangular prism, although extending the method to 3 dimensions is trivial. The solution was then tested against a classical simulation of Lattice Boltzmann with respect to total fluid velocity to verify the effectiveness of the method.
This was done on a grid of size nodes with a Reynolds number of 50. An initial velocity was enforced by weighting the initial distributions of the nodes such that their fluid velocity acted towards the right:
The initial condition was applied to all nodes to mimic common flow past objects simulations [14].
No slip boundary conditions implemented using bounce back were placed on the direction walls of the grid, while periodic boundary conditions were placed on the direction walls to model flow towards the right. This was done over a timescale of 5 seconds and a step size of .00025, with results shown in Figure 5. A boundary condition was included at point , to model model a square object and an initial velocity of 0.0001 lattice units per time step was enforced in the positive direction. These simulations demonstrate the ability of the proposed QCL-LBM model to achieve agreement with a classical LBM simulation, despite sacrificing the exactness of streaming [4].

Figure 5. Percent error of total fluid velocity for quantum simulation compared to classical simulation
Read Out
In order to run a useful quantum computation, the problems of read in and read out must be addressed. An initial condition can be applied to all lattice nodes creating the input vector algorithmically, and the matrix can be constructed as described above. The linear system can then be solved for the solution vector with
various quantum linear solvers [15][16]. However, decoding quantum states into a classical vector normally removes quantum advantage, requiring some extractable metric to remain efficient [17]. Hence, the extraction of a sub-exponential number of numerical quantities from the large solution vector is integral to maintain speedup. We propose the extraction of the drag coefficient, a commonly extracted measure for porous media simulation[18][19]. The drag coefficient can be calculated by[20]:
where is the inflow speed in lattice units, is the cross section area of the boundary condition in lattice units, and is the force acting on the boundary condition calculated with[20]:
where are the fluid lattice units which have solid neighbors, and the subscript is defined by .
The drag coefficient can be extracted from the resultant solution vector of the linear system solver, giving a useful read out value of the quantum simulation.
Conclusion
The presented improvement to the QCL-LBM framework, with a modified formulation to increase accuracy and account for boundary conditions, results in high accuracy fluid simulation and enables integration of boundary conditions. This broadens the utility of the quantum Lattice Boltzmann approach and addresses memory constraints inherent in complex porous media scenarios. Additionally, we introduced a state preparation and read out technique, facilitating the construction of a complete quantum circuit. Further research is necessary to explore diverse approaches for handling boundary conditions, thereby extending the method’s applicability even further.
References
- [8]Henk Kaarle Versteeg and Weeratunge Malalasekera. An introduction to computational fluid dynamics: the finite volume method. Pearson education, 2007.
- [9]Shiyi Chen and Gary D Doolen. Lattice boltzmann method for fluid flows. Annual review of fluid mechanics, 30(1):329–364, 1998.
- [10]Xiaoyi He and Gary Doolen. Lattice boltzmann method on curvilinear coordinates system: flow around a circular cylinder. Journal of Computational Physics, 134(2):306–315, 1997.DOI
- [11]Yue-Hong Qian, Dominique d’Humières, and Pierre Lallemand. Lattice bgk models for navier-stokes equation. Europhysics letters, 17(6):479, 1992.DOI
- [12]Arash Amini, Qiyu Sun, and Nader Motee. Error bounds for carleman linearization of general nonlinear systems. In 2021 Proceedings of the Conference on Control and its Applications, pages 1–8. SIAM, 2021.DOI
- [13]Anthony JC Ladd. Short-time motion of colloidal particles: Numerical simulation via a fluctuating lattice-boltzmann equation. Physical Review Letters, 70(9):1339, 1993.pubmed.ncbi.nlm.nih.gov/10054351
- [14]Yanbing Li, Richard Shock, Raoyang Zhang, and Hudong Chen. Numerical study of flow past an impulsively started cylinder by the lattice-boltzmann method. Journal of Fluid Mechanics, 519:273–300, 2004.DOI
- [16]Pedro CS Costa, Dong An, Yuval R Sanders, Yuan Su, Ryan Babbush, and Dominic W Berry. Optimal scaling quantum linear-systems solver via discrete adiabatic theorem. PRX Quantum, 3(4):040303, 2022.arxiv.org/abs/2111.08152
- [17]Kaining Zhang, Min-Hsiu Hsieh, Liu Liu, and Dacheng Tao. Quantum gram-schmidt processes and their application to efficient state readout for quantum algorithms. Physical Review Research, 3(4):043095, 2021.DOI
- [19]Øystein Patursson, M Robinson Swift, Igor