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

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 is required.

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 equals one.

#### **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 qubit implementations.

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 state vector.

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

**Figure 1.** *Quantum circuit for QFT on six-qubit register.*

storage of discrete data can be extended to multidimensional problems as well. For example, 24 qubits suffice to store a single discretized function on a 2563 regular mesh. In application in which multiple variables are to be stored in each mesh point, as in the discrete-velocity method discussed in the second part of this chapter, we add further qubits to the quantum register. Specifically, for each qubit added in the coherent register, the number of degrees of freedom is doubled. Once a mapping of the considered computational problem onto the quantum state vector has been designed, calculations are then performed through application of quantum gates as in the quantum circuit model.

### **2.2 Approximate quantum Fourier transform (AQFT)**

The ability to implement the quantum Fourier transform (QFT) efficiently on a quantum computer is of paramount importance for many quantum algorithms. **Figure 1** shows the "standard" quantum circuit implementation of the QFT for an example register with 6 qubits. In **Figure 1**, "H" represents the one-qubit Hadamard gate, and the "Rk" gates are controlled rotation gates over an angle defined by index "k," i.e., 2*π*/2*<sup>k</sup>* . In this circuit and all subsequent quantum circuits shown in this chapter, the qubit register is represented vertically, with the leftmost qubit in the register at the top. The horizontal direction determines the sequence of gates that are applied to the quantum state. In the QFT example shown, it can be seen that the qubit indices have been reversed in the output state (right-hand side) relative to the input, to represent that this standard QFT circuit returns the discrete Fourier transform in bit-reversed ordering.

A particular challenge is presented by the controlled rotation gates particularly those involving small angles. The QFT can be implemented approximately by removing all rotation gates with angles smaller than a certain threshold value, resulting in the approximate QFT (AQFT). In particular for fault-tolerant implementations, this is desirable as it greatly reduces the gate count. In the following, we define the approximation or "band-limiting" in the AQFT as follows. The rotation gates are eliminated above a limit value "k," i.e., for an angle smaller than 2*π*/2*<sup>k</sup>* , the rotation gate is not included in the quantum circuit.
