**1. Introduction**

In recent years, the field of quantum computing [1] has developed into an active and diverse field of research, and significant progress has been made in a number of important areas. For a relatively small number of applications, quantum algorithms have been developed that provide a significant speedup relative to classical methods. Shor's algorithm for factoring composite integers and Grover's algorithm for quantum search were key developments in establishing quantum computing. More recently, significant progress has been made in the area of quantum chemistry and quantum physics. Beyond those two fields, only recently have quantum computing applications appeared in other areas of science and engineering, e.g., work in computational electromagnetics [2, 3], mixing in turbulent flow [4], and computational fluid dynamics [5]. More general applications have been developed which take advantage of the unique capabilities of quantum computing platforms, e.g., methods for the solution of linear systems of equations [6] and Poisson equation [7].

In recent years significant progress has been made in designing and constructing quantum computers. Currently available quantum computers are relatively small-scale and have become known as noisy intermediate-scale quantum (NISQ ) computers. These machines have a limited number of qubits (expected to increase to 50–100 in coming years), a limited connectivity between these qubits, a small set of available quantum gates, and typically very little or no quantum error correction.

This chapter describes results of a recent investigation aiming to assess the potential of quantum computing and suitably designed algorithms for future computational fluid dynamics application, particularly for NISQ-type quantum hardware. In this work, the quantum circuit model is used for a "universal" or "digital" quantum computer, i.e., work on adiabatic quantum computing is not considered here. In the absence of the required quantum hardware, large-scale parallel simulations on parallel classical computers are required in developing such algorithms. In this work the recently developed quantum simulator [5] included in the MΦC multi-physics CFD framework is used [8, 9].

In the near future, the most likely scenario for the introduction of quantum computing hardware is through the quantum coprocessor model, i.e., where a quantum processing unit (QPU) is loosely coupled to a classical computer with one or more CPUs [10]. In current designs, the quantum processor requires storage at low temperatures in a cryostat leading to a distinct physical separation between the classical and quantum hardware. Coupling takes place by exchanging classical information. In application of this hybrid quantum/classical approach, the quantum processor acts like a coprocessor with the quantum processor dealing with selected computationally demanding tasks. The quantum processor receives information from the CPU, and this is used to initialize the quantum state in the quantum processor. During the quantum simulation, the quantum state is transformed by application of quantum gates in quantum circuits. Then measurement operations are used to extract classical information from this quantum state, and this is subsequently passed to the CPU. Since in quantum mechanics a measurement leads to the (partial) collapse of the quantum state, in the hybrid classical/quantum approach, typically multiple realizations of the quantum state are needed to obtain classical information with acceptable levels of noise and uncertainty. It is important to recognize that, since initializing a particular quantum state in quantum computer can be a significant challenge, this hybrid approach can only be expected to lead to significant computational speedups in case the quantum simulation is significantly faster for the selected problem than conventional solution methods.

As an example of this hybrid classical/quantum approach, the author introduced a quantum computing application in which the vortex-in-cell method was used to solve the incompressible-flow Navier-Stokes equations in a regular domain [5]. In this algorithm, the Poisson solvers dominating CPU time requirements are based on the quantum computing equivalent of the fast Fourier transform, i.e., the quantum Fourier transform. In this chapter, this algorithm and its application to example flow problems are investigated further. Specifically, the effect of applying an approximate QFT instead of the full QFT is analyzed for different levels of approximation or truncating of rotation gates in the quantum circuit implementation.

The second part of this chapter describes a more recent investigation into the development of quantum algorithms relevant for computational aerodynamics based on modeling at the kinetic level. The key innovation in these developments is the design targeting execution of the algorithm fully on the quantum processor. In particular, at the start of the simulation, multiple quantum states in the quantum processor would be initialized. Then, the quantum algorithms would perform a series of unitary transformations. Only at the end of the simulation would

**33**

is required.

equals one.

qubit implementations.

state vector.

*Quantum Algorithms for Fluid Simulations DOI: http://dx.doi.org/10.5772/intechopen.86685*

measurements be performed to extract the required classical. A key question this

The fundamental unit of quantum computation is the qubit [1]. Whereas a classical bit is confined to existing in either the 0 or 1 state, a qubit can be in a state of superposition, i.e., it exists in both states simultaneously. Upon measuring the qubit, the quantum state collapses to either of these two states, and the qubit is no longer in a state of superposition. The state of a qubit is defined through a pair of complex numbers [1]. A collection of *nq* qubits in a coherent state is termed a quantum register of size *nq* here. Its quantum state is defined by the wave function |Ψ> resulting from the tensor product of the quantum states of each qubit in the coherent register. The superposition in this coherent register then creates 2nq different states that can be found upon measurement of the quantum state. In simulating this quantum state on a classical computer, a storage space of 2nq complex numbers

In the present work, the quantum circuit model of quantum computing is used. In this case, the unitary operations on a quantum state allowed by quantum mechanics are represented by a series of quantum (logic) gates acting on the quantum state. A quantum logic gate is an elementary quantum computing device that performs a fixed unitary operation on selected qubits in a fixed period of time. Written in a matrix form, unitary means that the determinant of the transformation

**2.1 Mapping a computational problem onto the quantum state vector**

The quantum state |Ψ> for a register with *nq* coherent qubits is represented by a Hilbert space of dimension 2nq. In a quantum computer, different possibilities exist for the physical implementation of qubits, e.g., the "spin" of an electron (with the two possible states being "spin-up" and "spin-down") or the plane of polarization of linearly polarized photon has been used. The discrete energy levels in an atom excited by laser pulses present an alternative to electron-spin and photon-based

We will now describe how this quantum state can be used to represent the storage space required for the computational problems of interest here, representing discretized partially differential equations. As a first step, consider a function *f* discretized on a (regular) mesh with *N* mesh points. It follows that log2*N* qubits would suffice to create the required number of degrees of freedom in the quantum

However, it is important to stress that the quantum state vector only represents the likelihood that upon measurement the quantum state collapses into a particular state [1]. In other words, with *nq* = log2*N*, we cannot extract the full information for all *N* degrees of freedom using a single realization of this quantum state. However, for as long as this classical information is not needed, the quantum state has the required number of degrees of freedom. This superposition-based principle for

This chapter is organized as follows. Section 2 describes key principles of quantum computing relevant to the quantum algorithms for fluid simulations described here. Section 3 describes the hybrid quantum/classical implementation of the vortex-in-cell method along with a number of example applications. The quantum discrete-velocity algorithm for kinetic flow modeling is described in Section 4.

study aims to answer is for which applications this approach is feasible.

Conclusions and future research directions are presented in Section 5.

**2. Elements of quantum computing relevant in current work**

#### *Quantum Algorithms for Fluid Simulations DOI: http://dx.doi.org/10.5772/intechopen.86685*

*Advances in Quantum Communication and Information*

multi-physics CFD framework is used [8, 9].

In recent years significant progress has been made in designing and constructing quantum computers. Currently available quantum computers are relatively small-scale and have become known as noisy intermediate-scale quantum (NISQ ) computers. These machines have a limited number of qubits (expected to increase to 50–100 in coming years), a limited connectivity between these qubits, a small set of available quantum gates, and typically very little or no quantum error correction. This chapter describes results of a recent investigation aiming to assess the potential of quantum computing and suitably designed algorithms for future computational fluid dynamics application, particularly for NISQ-type quantum hardware. In this work, the quantum circuit model is used for a "universal" or "digital" quantum computer, i.e., work on adiabatic quantum computing is not considered here. In the absence of the required quantum hardware, large-scale parallel simulations on parallel classical computers are required in developing such algorithms. In this work the recently developed quantum simulator [5] included in the MΦC

In the near future, the most likely scenario for the introduction of quantum computing hardware is through the quantum coprocessor model, i.e., where a quantum processing unit (QPU) is loosely coupled to a classical computer with one or more CPUs [10]. In current designs, the quantum processor requires storage at low temperatures in a cryostat leading to a distinct physical separation between the classical and quantum hardware. Coupling takes place by exchanging classical information. In application of this hybrid quantum/classical approach, the quantum processor acts like a coprocessor with the quantum processor dealing with selected computationally demanding tasks. The quantum processor receives information from the CPU, and this is used to initialize the quantum state in the quantum processor. During the quantum simulation, the quantum state is transformed by application of quantum gates in quantum circuits. Then measurement operations are used to extract classical information from this quantum state, and this is subsequently passed to the CPU. Since in quantum mechanics a measurement leads to the (partial) collapse of the quantum state, in the hybrid classical/quantum approach, typically multiple realizations of the quantum state are needed to obtain classical information with acceptable levels of noise and uncertainty. It is important to recognize that, since initializing a particular quantum state in quantum computer can be a significant challenge, this hybrid approach can only be expected to lead to significant computational speedups in case the quantum simulation is significantly

faster for the selected problem than conventional solution methods.

As an example of this hybrid classical/quantum approach, the author introduced a quantum computing application in which the vortex-in-cell method was used to solve the incompressible-flow Navier-Stokes equations in a regular domain [5]. In this algorithm, the Poisson solvers dominating CPU time requirements are based on the quantum computing equivalent of the fast Fourier transform, i.e., the quantum Fourier transform. In this chapter, this algorithm and its application to example flow problems are investigated further. Specifically, the effect of applying an approximate QFT instead of the full QFT is analyzed for different levels of approximation or truncating of rotation gates in the quantum circuit

The second part of this chapter describes a more recent investigation into the development of quantum algorithms relevant for computational aerodynamics based on modeling at the kinetic level. The key innovation in these developments is the design targeting execution of the algorithm fully on the quantum processor. In particular, at the start of the simulation, multiple quantum states in the quantum processor would be initialized. Then, the quantum algorithms would perform a series of unitary transformations. Only at the end of the simulation would

**32**

implementation.

measurements be performed to extract the required classical. A key question this study aims to answer is for which applications this approach is feasible.

This chapter is organized as follows. Section 2 describes key principles of quantum computing relevant to the quantum algorithms for fluid simulations described here. Section 3 describes the hybrid quantum/classical implementation of the vortex-in-cell method along with a number of example applications. The quantum discrete-velocity algorithm for kinetic flow modeling is described in Section 4. Conclusions and future research directions are presented in Section 5.
