Next Article in Journal
Quantum Chaos in the Dynamics of Molecules
Next Article in Special Issue
Infidelity Analysis of Digital Counter-Diabatic Driving in Simple Two-Qubit System
Previous Article in Journal
Quantum Multi-Round Resonant Transition Algorithm
Previous Article in Special Issue
Tuning the Quantum Properties of ZnO Devices by Modulating Bulk Length and Doping
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Quantum-Solving Algorithm for d’Alembert Solutions of the Wave Equation

1
Center on Frontiers of Computing Studies and School of Computer Science, Peking University, Beijing 100871, China
2
State Key Laboratory of Low-Dimensional Quantum Physics and Department of Physics, Tsinghua University, Beijing 100084, China
Entropy 2023, 25(1), 62; https://doi.org/10.3390/e25010062
Submission received: 4 November 2022 / Revised: 19 December 2022 / Accepted: 20 December 2022 / Published: 29 December 2022
(This article belongs to the Special Issue Quantum Computing for Complex Dynamics)

Abstract

:
When faced with a quantum-solving problem for partial differential equations, people usually transform such problems into Hamiltonian simulation problems or quantum-solving problems for linear equation systems. In this paper, we propose a third approach to solving partial differential equations that differs from the two approaches. By using the duality quantum algorithm, we construct a quantum-solving algorithm for solving the first-order wave equation, which represents a typical class of partial differential equations. Numerical results of the quantum circuit have high precision consistency with the theoretical d’Alembert solution. Then the routine is applied to the wave equation with either a dissipation or dispersion term. As shown by complexity analysis for all these cases of the wave equation, our algorithm has a quadratic acceleration for each iteration compared to the classical algorithm.

1. Introduction

Most scientific problems can be solved by studying the laws governing the evolution of physical quantities in space and time. Therefore, partial differential equations undoubtedly play an extremely important role in the field of natural sciences. However, the problem of solving partial differential equations is extremely difficult. While if quantum algorithms are introduced and the problems of partial differential equations are solved on a quantum computer, it can achieve accelerated characteristics compared to classical algorithms.
The usual quantum algorithm for solving partial differential equations proceeds as follows. First, discretize the space so that the function f x , t becomes a vector f t and map its normalized components to the quantum state components, i.e., | x ( t ) = i f i ( t ) | x i , where f i ( t ) is the i-th component of the vector f t after normalization. Next, the vectors encoded onto the quantum states are mapped onto a fixed model. Most quantum algorithms for solving partial differential equations rely on Hamiltonian simulations [1,2,3,4] or a linear equation system-solving algorithm (HHL algorithm) [5].
In the following, the main ideas of the above two solution methods will be briefly reviewed with examples. The solution method based on Hamiltonian simulation [6,7,8] that maps partial differential equations to the Schrödinger equation will be introduced first. This method maps equations with a similar structure to the Schrödinger equation to the Schrödinger equation and transforms the equation solving problem into a Hamiltonian simulation problem. For example, solving the Black–Scholes equation [9]
f t = a f + b f x c 2 f x 2 .
The equation can be written in the following form
f t = A f .
It is obvious that the equation is formally similar to the Schrödinger equation. Thus the A operator can be mapped to the Hamiltonian in Schrödinger’s equation in such a way that A = i b p ^ + a I + c p ^ 2 , p ^ = i x . One can split A into Hermitian and anti-Hermitian parts, i.e., A = A H + A a H , where
A a H = i b p ^ , A H = a I + c p ^ 2 .
The vector f t , obtained by discretizing the function, is encoded onto the state vector | x ( ϵ ) , using the Trotter product formula
| x ( ϵ ) = e A ϵ | x 0 e A H ϵ e A a H ϵ | x 0 .
The problem of solving the partial differential equation is transformed into the problem of a Hamiltonian simulation. The process of simulating the action of the above Hamiltonian, i.e., the quantum state | x 0 , evolves under the designed Hamiltonian to obtain the final state. The solution of the original equation at different moments can be obtained by measuring the final state for different iterations.
In fact, it is efficient to use a Hamiltonian simulation to construct quantum algorithms for solving partial differential equations, which can solve first-order partial differential equations (requiring that the Hermitian and anti-Hermitian parts of the matrix A decomposition commute with each other) and second-order partial differential equations such as the wave equation. However, not all partial differential equations have the algebraic structure of Schrödinger’s equation. The quantum algorithm [7,10,11,12] for solving partial differential equations is presented below using the HHL algorithm. For the partial differential equation with the following structure after spatial discretization
x ˙ = A x + b .
Using Euler’s method to discretize time gives
x t j + 1 x t j h A x t j + b .
Let x j = x t j , the partial differential equation can be transformed into the following linear equation system; as an example, only the result of j 2 is given here,
I 0 0 ( I + A h ) I 0 0 ( I + A h ) I x 0 x 1 x 2 = x in b h b h .
This system of equations is then solved using the HHL algorithm to obtain the following quantum states
| x = j = 0 N t t j x j .
The quantum state contains the solution of the partial differential equation t 0 to t j moments. Therefore, are there any other efficient algorithms for solving partial differential equations besides the above two methods? In this article, a third method different from the above two, the duality quantum algorithm [13,14,15,16] with amplitude amplification [17,18,19,20], is used to construct a quantum algorithm for solving the partial differential equation. The duality quantum algorithm also brings a speed-up effect compared to the classical algorithm [21,22,23].
This paper is organized as follows. First of all, the duality quantum algorithm will be used to solve the first-order wave equation with the d’Alembert solution. In the second and third parts of this paper, we will use the duality quantum algorithm to construct a solution algorithm to the wave equations with dissipation and dispersion terms. In these three parts of the paper, for these three problems, we use numerical simulations and present the results of the quantum algorithm solutions in the form of pictures for comparison with the theoretical values. At the end of this paper, we will analyze the complexity of our algorithm for solving the wave equations.

2. Duality Quantum Algorithm for Solving the First-Order Wave Equation

When talking about the wave equation, people must first think of the second-order linear hyperbolic type equation
2 u t 2 + k 2 2 u x 2 = 0 .
The general solution can be written as u x , t = f x k t + g x + k t , where f, g are two arbitrary functions. f x k t and g x + k t represent waves passing along the x-axis with constant velocity to the right and to the left. Since Equation (9) is a linear homogeneous equations, its solutions are superposed. Therefore, f and g are two traveling waves that propagate independently without interfering with each other. If one focuses on only one of these two waves, Equation (9) degenerates to a linear hyperbolic equation of the first-order
u t + k u x = 0 .
In this paper, we discretize the continuous independent variable x into N points, i.e., x = x 0 , x 1 , , x N 1 . Then the spatial part of the function u x , t j at the moment t j is discretized into the vector
u x , t j = u x 0 , t j , u x 1 , t j , , u x N 1 , t j ,
encode it onto the computational basis and define the quantum state | ψ j as
| ψ j = i = 0 N 1 u x i , t j | i i = 0 N 1 u 2 x i , t j .
In the following, we will give the quantum algorithm for solving Equation (10) based on the non-unitary evolution of the quantum system. First, the Taylor expansion for each order partial differential term of Equation (10) is
u t = u x , t + τ u x , t τ + o τ , u x = u x + h , t u x , t h + o h .
Pluging Equation (13) into Equation (10), the difference equation form of Equation (10) is obtained as
u x i , t j + 1 u x i , t j τ + k u x i + 1 , t j u x i , t j h = 0 .
Its local truncation error is o ( τ + h ) . When τ , h 0 , Equation (14) approximates the original Equation (10). Organizing Equation (14) leads to
u x i , t j + 1 = τ k u x i , t j u x i + 1 , t j h + u x i , t j
Let Δ = τ h , then the following iterative relation can be obtained from Equation (15).
u x i , t j + 1 = 1 + Δ k u x i , t j Δ k u x i + 1 , t j
Taking the periodic boundary condition that u x N , t = x 0 , t , the equation describing the whole system can be written in the following form
u x 0 , t j + 1 u x 1 , t j + 1 u x N 1 , t j + 1 = A u x 0 , t j u x 1 , t j u x N 1 , t j
where
A = 1 + Δ k Δ k 0 0 0 1 + Δ k Δ k 0 0 Δ k 0 0 1 + Δ k
Then the state | ψ j + 1 of the system at the next moment, i.e., the moment t j + 1 , can be expressed as A | ψ j . It is obvious that the A-matrix is not an unitary matrix, so there is no way to achieve it directly by the product of quantum logic gates. Instead, the A-matrix has to be split into linear combinations of the unitary operators by the duality model of quantum computation, i.e., A = ( 1 + Δ k ) A 0 Δ k A 1 , where A 0 is a unitary matrix of order N and
A 1 = 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 N N .
By introducing an auxiliary qubit, the operation of the linear combination of unitary operators can be realized and thus equivalently the non-unitary evolution, i.e., A | ψ j . Its quantum circuit is shown in Figure 1.
Where the matrix A 1 can be decomposed into C n X gates as well as X gates with O log 2 N . The specific quantum circuit that implements the A 1 operation is shown in Figure 2.
According to Lemma 5.5 and Lemma 7.1 in article [24], a total of 4 N 5 log 2 N 4 CNOT gates and single-qubit rotating gates are needed if the A 1 operation continues to be disassembled. The following will explain the duality quantum algorithm for the solution of the first-order wave equation according to Figure 1, where first the auxiliary qubit passes through the W 0 gate, which has the following effect
W 0 : | 0 1 + Δ k | 0 Δ k | 1 1 + Δ k 2 + Δ k 2 .
Next, after two controlled quantum gates | 0 0 | A 0 and | 1 1 | A 1 , the quantum state evolves as
1 + Δ k | 0 A 0 | ψ j Δ k | 1 A 1 | ψ j 1 + Δ k 2 + Δ k 2 .
Then the quantum state after the Hadamard transformation is
1 2 | 0 1 + Δ k A 0 | ψ j Δ k A 1 | ψ j 1 + Δ k 2 + Δ k 2 + 1 2 | 1 1 + Δ k A 0 | ψ j + Δ k A 1 | ψ j 1 + Δ k 2 + Δ k 2 .
Finally, after the measurement to select the state of the auxiliary qubit as 0, the state of the working qubits at this time is | ψ j + 1 , that is
1 + Δ k A 0 | ψ j Δ k A 1 | ψ j 1 + Δ k 2 + Δ k 2 .
Define the coefficients C j as
i = 0 N 1 u 2 x i , t j 1 + Δ k 2 + Δ k 2 .
The amplitude under the computational basis of the quantum state | ψ j + 1 is enlarged by a factor of C j to obtain the column vector u ( x i , t j + 1 ) , which is the state of the system at the moment t j + 1 . The analysis yields that the computational complexity of this algorithm is O N per iteration, while the complexity of the classical algorithm is O N 2 . The specific calculation of the complexity is presented at the end of this paper.
The following equation will be used as an example
u t + 2 u x = 0 u x , 0 = sin 2 π x + sin   4 π x 2 sin   6 π x 3
to show the duality quantum algorithm for the solution of the first-order wave equation. First of all, one period of the function, i.e., [ 0 , 1 ] , is chosen, and this interval is discretized into 32 points, i.e., h = 0.03125 in Equation (15). Thus, the function value of 32 discrete points can be encoded using 5 qubits. Choose Δ = 0.1 in Equation (16). Then τ = 0.003125 , which represents the time interval for each iteration of the system evolution. According to Equation (20), the effect of the action of W 0 can be determined as
W 0 : | 0 6 37 37 | 0 37 37 | 1
This gives W 0 as R y ( 0.33 ) . Thus far, the quantum circuit for each iteration of the solution to Equation (25) can be given in Figure 3.
Numerical simulation of the first 10 iterations of this quantum circuit, whose results are shown in Figure 4. Where the orange curve represents the theoretical value. The blue points represent the results given by the numerical simulation of the quantum solution algorithm.

3. Duality Quantum Algorithm for the Solution of the Traveling Wave Dissipation Problem

By adding the dissipation term to Equation (10), the traveling wave equation with dissipation is obtained as
u t + k u x α 2 u x 2 = 0 .
The Taylor expansion for each term of Equation (27) is
u t = u x , t + τ u x , t τ + o τ , u x = u x + h , t u x , t h + o h , 2 u x 2 = u ( x h , t ) 2 u ( x , t ) + u ( x + h , t ) h 2 + o h 2 .
Differentiating Equation (27) yields
u x i , t j + 1 u x i , t j τ + k u x i + 1 , t j u x i , t j h α u x i 1 , t j 2 u x i , t j + u x i + 1 , t j h 2 = 0 .
The collation leads to
u x i , t j + 1 = τ k u x i , t j u x i + 1 , t j h + τ α u x i 1 , t j 2 u x i , t j + u x i + 1 , t j h 2 + u x i , t j .
Let Δ = τ h and Δ 1 = α Δ h , then the following iterative relation can be obtained
u x i , t j + 1 = Δ 1 u x i 1 , t j + k Δ 2 Δ 1 + 1 u x i , t j + Δ 1 k Δ u x i + 1 , t j .
Take the periodic boundary condition that u x N , t = u x 0 , t . Then, the equation describing the whole system can be written in the following form
u x 0 , t j + 1 u x 1 , t j + 1 u x N 1 , t j + 1 = A u x 0 , t j u x 1 , t j u x N 1 , t j .
In Equation (32)
A = a b 0 0 c c a b 0 0 0 0 c a b b 0 0 c a ,
in which
a = k Δ 2 Δ 1 + 1 , b = Δ 1 k Δ , c = Δ 1 .
Following the encoding method of Equation (12), then the state | ψ j + 1 of the system at the next moment, i.e., the moment t j + 1 , can be expressed as A | ψ j . The matrix A = k Δ 2 Δ 1 + 1 A 0 + Δ 1 k Δ A 1 + Δ 1 A 2 , where A 2 = A 1 . Thus the operation of a linear combination of unitary operators can be equivalently implemented by introducing two auxiliary qubits, whose quantum circuit is shown in Figure 5.
In the following, the duality quantum algorithm for solving the dissipation problem of the first-order wave equation is explained in conjunction with the quantum circuit (Figure 5), where the first the auxiliary qubits pass through the W 1 gate, which has the following effect
W 1 : | 00 k Δ 2 Δ 1 + 1 | 00 + Δ 1 k Δ | 01 + Δ 1 | 10 k Δ 2 Δ 1 + 1 2 + Δ 1 k Δ 2 + Δ 1 2 .
Next, after three controlled quantum gates | 00 00 | A 0 , | 01 01 | A 1 and | 10 10 | A 2 the quantum state evolves as
k Δ 2 Δ 1 + 1 | 00 A 0 | ψ j + Δ 1 k Δ | 01 A 1 | ψ j + Δ 1 | 10 A 2 | ψ j k Δ 2 Δ 1 + 1 2 + Δ 1 k Δ 2 + Δ 1 2 .
Then, the quantum state evolves after the Hadamard transformation of two auxiliary qubits as
1 2 | 00 k Δ 2 Δ 1 + 1 A 0 | ψ j + Δ 1 k Δ A 1 | ψ j + Δ 1 A 2 | ψ j k Δ 2 Δ 1 + 1 2 + Δ 1 k Δ 2 + Δ 1 2 + 1 2 | 01 k Δ 2 Δ 1 + 1 A 0 | ψ j Δ 1 k Δ A 1 | ψ j + Δ 1 A 2 | ψ j k Δ 2 Δ 1 + 1 2 + Δ 1 k Δ 2 + Δ 1 2 + 1 2 | 10 k Δ 2 Δ 1 + 1 A 0 | ψ j + Δ 1 k Δ A 1 | ψ j Δ 1 A 2 | ψ j k Δ 2 Δ 1 + 1 2 + Δ 1 k Δ 2 + Δ 1 2 + 1 2 | 11 k Δ 2 Δ 1 + 1 A 0 | ψ j Δ 1 k Δ A 1 | ψ j Δ 1 A 2 | ψ j k Δ 2 Δ 1 + 1 2 + Δ 1 k Δ 2 + Δ 1 2 .
Finally, the auxiliary qubits are measured to select the state of the auxiliary qubit as 00; then the state of the working qubit at this time is | ψ j + 1 , that is
k Δ 2 Δ 1 + 1 A 0 | ψ j + Δ 1 k Δ A 1 | ψ j + Δ 1 A 2 | ψ j k Δ 2 Δ 1 + 1 2 + Δ 1 k Δ 2 + Δ 1 2 .
Define the coefficient C j as
i = 0 N 1 u 2 x i , t j k Δ 2 Δ 1 + 1 2 + Δ 1 k Δ 2 + Δ 1 2 .
The column vector u ( x i , t j + 1 ) , which is the state of the system at t j + 1 moments, is obtained by amplifying the amplitude under the computational basis of the quantum state | ψ j + 1 by a factor of C j .
According to Lemma 5.5 and Lemma 7.1 in article [24] and combined with Figure 5, the computational complexity of this algorithm per iteration is O N , while the complexity of the classical algorithm is O N 2 . Thus, the present algorithm has the property of speeding up in each iteration compared to the classical algorithm. The specific calculation of the complexity is presented at the end of this paper.
The following equation will be used as an example
{ u t + 2 u x 0.1 2 u x 2 = 0 u ( x , 0 ) = sin   2 π x + sin   4 π x 2 sin   6 π x 3
to show the duality quantum algorithm for the solution of the dissipation problem of the first-order wave equation. First, one period of the function is chosen, i.e., [ 0 , 1 ] , and this interval is discretized into 32 points, i.e., h = 0.03125 in Equation (28). Thus, the function value of 32 discrete points can be encoded using 5 qubits. Choose Δ = 0.2 and Δ 1 = 1.28 in Equation (31). Then τ = 0.00625 , which represents the time interval for each iteration of system evolution. According to Equation (35), the effect of the action of W 1 can be determined as
W 1 : | 00 29 9 | 00 + 22 29 261 | 01 + 32 29 261 | 10 .
It is constructed as shown in Figure A1 with Equations (A1) and (A2). The revolving gate R n θ of the first auxiliary qubit is constructed according to Equation (A1), such that
R n θ | 00 5 1537 261 | 0 + 32 29 261 | 1 | 0 .
It is obtained that R n θ is R y 1.442 . According to Equation (A3), the controlled operator U 1 is to achieve the following action
U 1 | 0 29 53 265 | 0 + 22 53 265 | 1 .
The controlled operator U 1 can be obtained as R y 1.298 . At this point, we can give the quantum circuit for each iteration of the solution Equation (40), as shown in Figure 6
Numerical simulation of the first 10 iterations of this quantum circuit results in Figure 7. The orange curve represents the resolved theoretical value. The blue points represent the values solved by the numerical simulation of the quantum algorithm.

4. Duality Quantum Algorithm for Solving Traveling Wave Dispersion Problems

By adding the dispersion term to Equation (10), the traveling wave equation with dispersion is obtained as
u t + k u x + β 3 u x 3 = 0 .
Taylor expansion of the terms of Equation (44)
u t = u x , t + τ u x , t τ + o τ , u x = u x + h , t u x , t h + o h , 3 u x 3 = u ( x 2 h , t ) + 3 u ( x h , t ) 3 u ( x , t ) + u ( x + h , t ) h 3 + o h 3 .
Differentiating Equation (44) yields
u x i , t j + 1 u x i , t j τ + k u x i + 1 , t j u x i , t j h + β u x i 2 , t j + 3 u x i 1 , t j 3 u x i , t j + u x i + 1 , t j h 3 = 0 .
Let Δ = τ h , Δ 2 = β Δ h 2 , and the following iterative relation can be obtained
u x i , t j + 1 = Δ 2 u x i 2 , t j 3 Δ 2 u x i 1 , t j + k Δ + 3 Δ 2 + 1 u x i , t j k Δ + Δ 2 u x i + 1 , t j .
Take the periodic boundary condition that u x N , t = u x 0 , t . Then the equation describing the whole system can be written in the following form
u x 0 , t j + 1 u x 1 , t j + 1 u x N 1 , t j + 1 = A u x 0 , t j u x 1 , t j u x N 1 , t j ,
where
A = a b 0 0 d c c a b 0 0 d d c a b 0 0 0 d c a b 0 0 0 0 d c a b 0 0 0 d c a b b 0 0 d c a ,
in which
a = k Δ + 3 Δ 2 + 1 , b = k Δ + Δ 2 , c = 3 Δ 2 , d = Δ 2 .
It can be seen that A = k Δ + 3 Δ 2 + 1 A 0 k Δ + Δ 2 A 1 3 Δ 2 A 2 + Δ 2 A 3 , where
A 3 = 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 N N .
Therefore, the operation of the linear combination of unitary operators can be equivalently implemented by introducing two auxiliary qubits, whose quantum circuit is shown in Figure 8.
It is not difficult to find A 3 = A 2 2 , and the following will be combined with the quantum circuit (Figure 8) to explain the duality quantum algorithm for the solution of the dispersion problem of the first-order wave equation. First, the auxiliary qubits pass through the W 2 gate, the effect of which is as follows
W 2 : | 00 k Δ + 3 Δ 2 + 1 | 00 + k Δ + Δ 2 | 01 3 Δ 2 | 10 + Δ 2 | 11 k Δ + 3 Δ 2 + 1 2 + k Δ + Δ 2 2 + 10 Δ 2 2 .
Next, after four controlled quantum gates, | 00 00 | A 0 , | 01 01 | A 1 , | 10 10 | A 2 and | 11 11 | A 3 , the quantum state evolves as
k Δ + 3 Δ 2 + 1 | 00 A 0 | ψ j + k Δ + Δ 2 | 01 A 1 | ψ j 3 Δ 2 | 10 A 2 | ψ j + Δ 2 | 11 A 3 | ψ j k Δ + 3 Δ 2 + 1 2 + k Δ + Δ 2 2 + 10 Δ 2 2 .
Then, the Hadamard transform is performed for the two auxiliary qubits, and the quantum state evolves as
1 2 | 00 k Δ + 3 Δ 2 + 1 A 0 | ψ j + k Δ + Δ 2 A 1 | ψ j 3 Δ 2 A 2 | ψ j + Δ 2 A 3 | ψ j k Δ + 3 Δ 2 + 1 2 + k Δ + Δ 2 2 + 10 Δ 2 2 + 1 2 | 01 k Δ + 3 Δ 2 + 1 A 0 | ψ j k Δ + Δ 2 A 1 | ψ j 3 Δ 2 A 2 | ψ j Δ 2 A 3 | ψ j k Δ + 3 Δ 2 + 1 2 + k Δ + Δ 2 2 + 10 Δ 2 2 + 1 2 | 10 k Δ + 3 Δ 2 + 1 A 0 | ψ j + k Δ + Δ 2 A 1 | ψ j + 3 Δ 2 A 2 | ψ j Δ 2 A 3 | ψ j k Δ + 3 Δ 2 + 1 2 + k Δ + Δ 2 2 + 10 Δ 2 2 + 1 2 | 11 k Δ + 3 Δ 2 + 1 A 0 | ψ j k Δ + Δ 2 A 1 | ψ j + 3 Δ 2 A 2 | ψ j + Δ 2 A 3 | ψ j k Δ + 3 Δ 2 + 1 2 + k Δ + Δ 2 2 + 10 Δ 2 2 .
Finally, the state of the auxiliary qubit is selected as 00 after measurement, then the state of the working qubits at this time is | ψ j + 1 , that is
k Δ + 3 Δ 2 + 1 A 0 | ψ j + k Δ + Δ 2 A 1 | ψ j 3 Δ 2 A 2 | ψ j + Δ 2 A 3 | ψ j k Δ + 3 Δ 2 + 1 2 + k Δ + Δ 2 2 + 10 Δ 2 2 .
Define the coefficient C j as
i = 0 N 1 u 2 x i , t j k Δ + 3 Δ 2 + 1 2 + k Δ + Δ 2 2 + 10 Δ 2 2 .
The amplitude under the computational basis of the quantum state | ψ j + 1 is enlarged C j times to obtain the column vector u x i , t j + 1 , which is the state of the system at the moment t j + 1 . According to Lemma 5.5 and Lemma 7.1 in article [24], and combined with the analysis of Figure 8, we can obtain that the computational complexity of this algorithm for each iteration is O N , while the complexity of the classical algorithm is O N 2 . The specific calculation of the complexity is presented at the end of this paper.
The following equation will be used as an example
u t + 2 u x + 0.01 3 u x 3 = 0 u x , 0 = sin 2 π x + sin   4 π x 2 sin   6 π x 3
to show the duality quantum algorithm for the solution of the dispersion problem of the first-order wave equation. Firstly, one period of the function is chosen, i.e., [ 0 , 1 ] , and this interval is discretized into 32 points, i.e., h = 0.03125 in Equation (47). Thus, the function value of 32 discrete points can be encoded using 5 qubits. Choose Δ = 0.05 and Δ 2 = 0.512 in Equation (47). Then τ = 0.0015625 , which represents the time interval for each iteration of the system evolution. According to Equation (52), the effect of the action of W 2 can be determined as
W 2 : | 00 0.8359 | 00 + 0.1941 | 01 0.4871 | 10 + 0.1624 | 11 .
It is constructed as shown in Figure A1 with Equations (A1) and (A2). Construct the revolving gate R n θ of the first auxiliary qubit according to Equation (A1), such that
R n θ | 00 0.8581 | 0 + 0.5135 | 1 | 0 .
It is obtained that R n θ is R y 1.078 .
According to Equation (A3), two controlled operators U 1 , U 2 are to be realized as follows
U 1 | 0 0.9741 | 0 + 0.2262 | 1 , U 2 | 0 0.9486 | 0 + 0.3163 | 1 .
The controlled operator U 1 can be obtained as R y 0.4563 and U 2 as R y 5.639 . The quantum circuit for each iteration of the solution Equation (57) so far is given in Figure 9.
And the specific quantum circuit of the R-operation in Figure 9 is shown in Figure 10.
The result of numerically simulating the first 10 iterations of this quantum circuit is shown in Figure 11. The orange curve represents the theoretical value. The blue points represent the values solved by the numerical simulation quantum algorithm.

5. Discussion

For a quantum algorithm that solves a d-dimensional partial differential equation (meaning that there are d spatial variables) with a spatial discretization number of N, the output is an approximation C ( f ) of the function f with an error ϵ . In fact, for the problem of quantum algorithms solving partial differential equations, the number of discrete points N and the error ϵ are interrelated [12,25]. The correlations are as follows
N = O poly 1 ϵ d .
For the preparation of the initial state, its complexity is O poly log N . The complexity of each iteration of the algorithm in this paper will be given below. First, according to Lemma 5.5 and Lemma 7.1 in article [24], it can be obtained that the controlled gate C n 1 U for n qubits having n 1 control qubits can be split into CNOT gates and single-qubit gates for a total of 2 n + 1 5 , where n 3 . For the quantum circuit in Figure 1, the total number of elementary quantum gates required is
3 + O C 2 U + + O C n U = 2 n + 3 5 n 8 = 8 N 5 log 2 N 8 O ( N )
For the quantum circuit in Figure 5, the total number of elementary quantum gates required is
8 + 2 O C 2 U + + O C n + 1 U = 2 n + 5 10 n 24 = 32 N 10 log 2 N 24 O ( N )
For the quantum circuit in Figure 8, the total number of elementary quantum gates required is
8 + 4 O C 2 U + + O C n + 1 U = 2 n + 6 20 n 56 = 64 N 20 log 2 N 56 O ( N )
It can be found that the quantum-solving algorithm given in this paper has a quadratic acceleration for each iteration compared to the classical algorithm. However, the state of the auxiliary qubits needs to be selected after measurement at the end of each iteration. This result is probabilistic, and the overall success rate of the algorithm decreases exponentially as the number of iterations increases if the selection is made after each iteration. Therefore, ensuring an overall higher success rate requires the use of the quantum search algorithm [17,18,19,20] to amplify the amplitude of the target state before measurement. Under ideal conditions of the device, it is proved that the Grover–Long algorithm can achieve a 100% success rate in all cases [17,26,27]. Thus, using the Grover–Long algorithm under ideal conditions to amplify the amplitude, it is possible to obtain a 100% success rate every time. If the complexity of each iteration step is considered synthetically, then the complexity of each iteration step is O ( N ) + O ( M ) , where M is the dimension of the auxiliary qubits space.
In the future, our quantum algorithms are expected to be combined with finite element methods to solve complex practical problems, such as those related to fluid dynamics [28].

Funding

This research was funded by the National Natural Science Foundation of China under Grants No. 11974205, and No. 11774197; the National Key Research and Development Program of China (2017YFA0303700).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

The quantum circuit for the preparation of two-qubit arbitrary quantum states is as follows in Figure A1.
Figure A1. Preparation of two-qubit arbitrary quantum states.
Figure A1. Preparation of two-qubit arbitrary quantum states.
Entropy 25 00062 g0a1
First, the rotation operator R n ( θ ) is constructed, such that
| 00 c 0 2 + c 1 2 | 0 + c 2 2 + c 3 2 | 1 | 0 .
In the second step, construct the controlled quantum gates U 1 and U 2 , such that
c 0 2 + c 1 2 | 0 c 0 c 0 2 + c 1 2 | 0 + c 1 c 0 2 + c 1 2 | 1 + c 2 2 + c 3 2 | 1 c 2 c 2 2 + c 3 2 | 0 + c 3 c 2 2 + c 3 2 | 1 ,
where
U 1 | 0 c 0 c 0 2 + c 1 2 | 0 + c 1 c 0 2 + c 1 2 | 1 , U 2 | 0 c 2 c 2 2 + c 3 2 | 0 + c 3 c 2 2 + c 3 2 | 1 .

References

  1. Lloyd, S. Universal Quantum Simulators. Science 1996, 273, 1073–1078. [Google Scholar] [CrossRef] [PubMed]
  2. Aharonov, D.; Ta-Shma, A. Adiabatic quantum state generation and statistical zero knowledge. In Proceedings of the Thirty-Fifth Annual ACM Symposium on Theory of Computing, San Diego, CA, USA, 9–11 June 2003. [Google Scholar]
  3. Berry, D.W.; Childs, A.M.; Cleve, R.; Kothari, R.; Somma, R.D. Simulating Hamiltonian dynamics with a truncated Taylor series. Phys. Rev. Lett. 2015, 114, 090502. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  4. Low, G.H.; Chuang, I.L. Hamiltonian Simulation by Qubitization. Quantum 2019, 3, 163. [Google Scholar] [CrossRef] [Green Version]
  5. Harrow, A.W.; Hassidim, A.; Lloyd, S. Quantum algorithm for linear systems of equations. Phys. Rev. Lett. 2009, 103, 150502. [Google Scholar] [CrossRef] [PubMed]
  6. Leyton, S.K.; Osborne, T.J. A quantum algorithm to solve nonlinear differential equations. arXiv 2008, arXiv:0812.4423. [Google Scholar]
  7. Berry, D.W. High-order quantum algorithm for solving linear differential equations. J. Phys. A Math. Theor. 2014, 47, 105301. [Google Scholar] [CrossRef] [Green Version]
  8. Costa, P.C.S.; Jordan, S.P.; Ostrander, A. Quantum algorithm for simulating the wave equation. Phys. Rev. A 2019, 99, 012323. [Google Scholar] [CrossRef] [Green Version]
  9. Gonzalez-Conde, J.; Rodríguez-Rozas, Á.; Solano, E.; Sanz, M. Pricing financial derivatives with exponential quantum speedup. arXiv 2021, arXiv:2101.0402. [Google Scholar]
  10. Berry, D.W.; Childs, A.M.; Ostrander, A.; Wang, G. Quantum Algorithm for Linear Differential Equations with Exponentially Improved Dependence on Precision. Commun. Math. Phys. 2017, 356, 1057–1081. [Google Scholar] [CrossRef]
  11. Childs, A.M.; Liu, J.P. Quantum Spectral Methods for Differential Equations. Commun. Math. Phys. 2020, 375, 1427–1457. [Google Scholar] [CrossRef] [Green Version]
  12. Cao, Y.; Papageorgiou, A.; Petras, I.; Traub, J.F.; Kais, S. Quantum algorithm and circuit design solving the Poisson equation. New J. Phys. 2013, 15, 013021. [Google Scholar] [CrossRef] [Green Version]
  13. Gui-lu, L. General Quantum Interference Principle and Duality Computer. Commun. Theor. Phys. 2006, 45, 825–844. [Google Scholar] [CrossRef]
  14. Long, G.L.; Liu, Y. Duality quantum computing. Front. Comput. Sci. China 2008, 2, 167–178. [Google Scholar] [CrossRef]
  15. Gui-lu, L.; Yang, L.; Chuan, W. Allowable Generalized Quantum Gates. Commun. Theor. Phys. 2009, 51, 65–67. [Google Scholar] [CrossRef]
  16. Gudder, S.P. Mathematical Theory of Duality Quantum Computers. Quantum Inf. Process. 2007, 6, 37–48. [Google Scholar] [CrossRef]
  17. Long, G.L. Grover algorithm with zero theoretical failure rate. Phys. Rev. A 2001, 64, 022307. [Google Scholar] [CrossRef] [Green Version]
  18. Guilu, L.; Weilin, Z.; Yansong, L.; Li, N. Arbitrary phase rotation of the marked state cannot be used for Grover’s quantum search algorithm. Commun. Theor. Phys. 1999, 32, 335. [Google Scholar] [CrossRef] [Green Version]
  19. Long, G.L.; Li, Y.S.; Zhang, W.L.; Niu, L. Phase matching in quantum searching. Phys. Lett. A 1999, 262, 27–34. [Google Scholar] [CrossRef] [Green Version]
  20. Zhu, Y.; Wang, Z.; Yan, B.; Wei, S. Robust Quantum Search with Uncertain Number of Target States. Entropy 2021, 23, 1649. [Google Scholar] [CrossRef]
  21. Berry, D.W.; Childs, A.M.; Kothari, R. Hamiltonian Simulation with Nearly Optimal Dependence on all Parameters. In Proceedings of the 2015 IEEE 56th Annual Symposium on Foundations of Computer Science, Berkeley, CA, USA, 17–20 October 2015; pp. 792–809. [Google Scholar]
  22. Wei, S.; Ruan, D.; Long, G.L. Duality quantum algorithm efficiently simulates open quantum systems. Sci. Rep. 2016, 6, 30727. [Google Scholar] [CrossRef] [Green Version]
  23. Childs, A.M.; Kothari, R.; Somma, R.D. Quantum Algorithm for Systems of Linear Equations with Exponentially Improved Dependence on Precision. SIAM J. Comput. 2017, 46, 1920–1950. [Google Scholar] [CrossRef] [Green Version]
  24. Barenco, A.; Bennett, C.H.; Cleve, R.; DiVincenzo, D.P.; Margolus, N.; Shor, P.; Sleator, T.; Smolin, J.A.; Weinfurter, H. Elementary gates for quantum computation. Phys. Rev. A At. Mol. Opt. Phys. 1995, 52, 3457–3467. [Google Scholar] [CrossRef]
  25. Montanaro, A.; Pallister, S. Quantum algorithms and the finite element method. Phys. Rev. A 2016, 93, 032324. [Google Scholar] [CrossRef] [Green Version]
  26. Yoder, T.J.; Low, G.H.; Chuang, I.L. Fixed-point quantum search with an optimal number of queries. Phys. Rev. Lett. 2014, 113, 210501. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  27. Toyama, F.; Van Dijk, W.; Nogami, Y. Quantum search with certainty based on modified Grover algorithms: Optimum choice of parameters. Quantum Inf. Process. 2013, 12, 1897–1914. [Google Scholar] [CrossRef]
  28. Kondrashuk, I.; Notte-Cuello, E.A.; Poblete-Cantellano, M.; Rojas-Medar, M.A. On the time-dependent grade-two model for the magnetohydrodynamic flow: 2D case. arXiv 2015, arXiv:1506.00670. [Google Scholar]
Figure 1. Quantum circuit for solving the first-order wave equation.
Figure 1. Quantum circuit for solving the first-order wave equation.
Entropy 25 00062 g001
Figure 2. Quantum circuit for realization A 1 operation.
Figure 2. Quantum circuit for realization A 1 operation.
Entropy 25 00062 g002
Figure 3. Example of quantum circuit for solving the first-order wave equation, where θ 0 = 0.33 .
Figure 3. Example of quantum circuit for solving the first-order wave equation, where θ 0 = 0.33 .
Entropy 25 00062 g003
Figure 4. Numerical simulation of a quantum solution algorithm for the first-order wave equation.
Figure 4. Numerical simulation of a quantum solution algorithm for the first-order wave equation.
Entropy 25 00062 g004
Figure 5. Quantum circuit for solving the dissipation problem of the first-order wave equation.
Figure 5. Quantum circuit for solving the dissipation problem of the first-order wave equation.
Entropy 25 00062 g005
Figure 6. Example of a quantum circuit for solving the dissipation problem of the first-order wave equation, where θ 1 = 1.442 , θ 2 = 1.298 .
Figure 6. Example of a quantum circuit for solving the dissipation problem of the first-order wave equation, where θ 1 = 1.442 , θ 2 = 1.298 .
Entropy 25 00062 g006
Figure 7. Numerical simulation of the quantum solution algorithm for the traveling wave dissipation problem of the first-order wave equation.
Figure 7. Numerical simulation of the quantum solution algorithm for the traveling wave dissipation problem of the first-order wave equation.
Entropy 25 00062 g007
Figure 8. Quantum circuit for solving the dispersion problem of the first-order wave equation.
Figure 8. Quantum circuit for solving the dispersion problem of the first-order wave equation.
Entropy 25 00062 g008
Figure 9. Example of a quantum circuit for solving the dispersion problem of the first-order wave.
Figure 9. Example of a quantum circuit for solving the dispersion problem of the first-order wave.
Entropy 25 00062 g009
Figure 10. The specific quantum circuit of the R-operation, where θ 3 = 1.078 , θ 4 = 0.4563 , θ 5 = 5.639 .
Figure 10. The specific quantum circuit of the R-operation, where θ 3 = 1.078 , θ 4 = 0.4563 , θ 5 = 5.639 .
Entropy 25 00062 g010
Figure 11. Numerical simulation of a quantum solution algorithm for the dispersion problem of the first-order wave equation.
Figure 11. Numerical simulation of a quantum solution algorithm for the dispersion problem of the first-order wave equation.
Entropy 25 00062 g011
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhu, Y. Quantum-Solving Algorithm for d’Alembert Solutions of the Wave Equation. Entropy 2023, 25, 62. https://doi.org/10.3390/e25010062

AMA Style

Zhu Y. Quantum-Solving Algorithm for d’Alembert Solutions of the Wave Equation. Entropy. 2023; 25(1):62. https://doi.org/10.3390/e25010062

Chicago/Turabian Style

Zhu, Yuanye. 2023. "Quantum-Solving Algorithm for d’Alembert Solutions of the Wave Equation" Entropy 25, no. 1: 62. https://doi.org/10.3390/e25010062

APA Style

Zhu, Y. (2023). Quantum-Solving Algorithm for d’Alembert Solutions of the Wave Equation. Entropy, 25(1), 62. https://doi.org/10.3390/e25010062

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop