1 Introduction
Quantum computation is a novel computing model based on quantum mechanics. It has gained considerable attention over the past few decades since Benioff [
1,
2] proposed the concept of the quantum Turing machine in 1980. Subsequently, rapid progress has been made in quantum computation, so that numerous impressive quantum algorithms have been presented, such as Deutsch’s algorithm [
3], Deutsch−Jozsa (DJ) algorithm [
4], Bernstein-Vazirani (BV) algorithm [
5], Simon’s algorithm [
6], Shor’s algorithm [
7], Grover’s algorithm [
8], HHL algorithm [
9] and so on. For some specific problems, due to the unique properties of quantum superposition and quantum entanglement, quantum algorithms have shown incomparable advantages over classical algorithms.
Grover’s algorithm was proposed by Grover [
8] in 1996, which is a quantum search algorithm that solves the search problem in an unordered database with
elements. Specifically, let Boolean function
. For the
targets search problem, it aims to find out one target string
satisfying
, where
. Suppose we have a black box (Oracle) that can recognize the inputs, which means it will return
when
is a target string, and output
otherwise. The classical algorithms have to query Oracle
times, while Grover’s algorithm needs to query
times to figure out the target string with great probability, which has square acceleration compared with the classical algorithms.
Grover’s algorithm is widely regarded as one of the most prominent quantum algorithms. Furthermore, it is widely used in the minimum search problem [
10], string matching problem [
11], quantum dynamic programming [
12] and computational geometry problem [
13], etc. Subsequently, a generalization of Grover’s algorithm known as the quantum amplitude amplification and estimation algorithms [
14] were presented.
However, Grover’s algorithm is unable to search for the target state accurately, except in the case of
of the data in the database meet the search conditions, which has been strictly proved [
15]. In 2001, Long [
16] improved Grover’s algorithm and proposed the modified version, which will acquire the goal state with a probability of 100%. Its main idea is to extend Grover operator
to operator
. The adjustment is carried out by three steps: (i) substitute phase rotation for phase inversion; (ii) let the phase rotation angles of two reflections in
equal, which is called phase-matching condition; (iii) iterate
times for operator
, where
and
. Actually,
can be any integer equal to or greater than
.
In 2017, Preskill [
17] declared that quantum computation is entering the noisy intermediate-scale quantum (NISQ) era. To deploy quantum computers, various physical systems are taken into consideration, such as ions [
18], photons [
19], superconduction [
20], and other quantum systems [
21,
22]. Currently, small-qubit quantum computers are much easier to implement than large-scale universal quantum computers. Hence, researchers are considering how several small-scale devices might collaborate to accomplish a task on a large scale.
Distributed quantum computation, combining distributed computing and quantum computation, has gained extensive attention. In order to process a huge issue efficiently, it attempts to break it up into many subproblems that are distributed across several quantum computers. In this way, each component needs fewer qubits and has a shallower quantum circuit.
This research field has seen a significant amount of theoretical and experimental work [
23-
26]. Avron
et al. [
27] proposed a distributed method for constructing Oracle and then illustrated the advantage in the case of a Grover research. In their Grover’s algorithm experiment, however, they only acquired
qubits of the target state rather than the target state itself directly. The total number of qubits used in their scheme is
.
Qiu
et al. [
28] proposed two distributed Grover’s algorithms (parallel and serial) and these algorithms require fewer qubits and have shallower depth of circuits. Notably, the distributed algorithms by Qiu
et al. [
28] can solve the search problem with multiple targets. They divided a Boolean function
into
subfunctions, where
represents the number of computing nodes. By employing the quantum counting algorithm, the number of solutions in each subfunction can be determined, and then the solution for each subfunction can be obtained. Particularly, Qiu
et al. [
28] proposed an efficient algorithm of constructing quantum circuits for realizing the Oracle corresponding to any Boolean function with conjunctive normal form (CNF). The total number of qubits used in their parallel scheme is
.
Tan
et al. [
29] presented an interesting and novel distributed Simon’s algorithm, which improves essentially the number of qubits for inputs and the depth of circuits compared to the famous Simon’s algorithm. Recently, Xiao
et al. [
30] proposed a distributed Shor’s algorithm, which can separately estimate patrial bits of
for some
by two quantum computers during solving order-finding. Later, they extended this method to multiple nodes [
31]. Zhou
et al. [
32] designed a distributed BV algorithm (DBVA) with
nodes. Comparing with the original BV algorithms, their scheme is easier to verify in experiments. Li
et al. [
33] proposed a multi-node distributed exact quantum algorithm for solving the DJ problem with super-exponential speedup compared to distributed classical deterministic algorithms.
In this paper, we consider a search problem that includes only one target item in the unordered database (we still do not know how to solve it for the case of multiple targets). After that, we propose a distributed exact Grover’s algorithm (DEGA), which decomposes the original search problem into parts. Specifically, (i) our algorithm is as exact as the modified version of Grover’s algorithm by Long, which means the theoretical probability of finding the objective state is 100%; (ii) the actual depth of our circuit is , which is less than the circuit depths of the original and modified Grover’s algorithms, and , respectively. It only depends on the parity of , and it is not deepened as increases.
MindQuantum (a quantum software) [
34] is a general software library supporting the development of applications for quantum computation. Eventually, we provide particular situations of the DEGA on MindQuantum. These experiments will further demonstrate the correctness of the DEGA and explicate the specific steps of implement
-qubit DEGA, where
. After that, we will simulate a 5-qubit DEGA running in the depolarization channel and compare with the original and modified Grover’s algorithms. Since our circuit is shallower, it will be more resistant to the depolarization channel noise.
The rest of the paper is organized as follows. We will briefly review the original and modified Grover’s algorithms in Section 2 and primarily describe the DEGA in Section 3. Next, the analysis of our the algorithm will be presented in Section 4. After that, we will provide particular situations of the DEGA on MindQuantum in Section 5. Finally, we will give a brief conclusion in Section 6.
2 Preliminaries
In this section, we briefly review the original [
8] and modified [
16] Grover’s algorithms.
2.1 Grover’s algorithm [8]
Suppose that the search task is carried out in an unordered set (or database) with elements. We establish a one-to-one correspondence between the elements in the database and the indexes (integers from 0 to ). We focus on searching the indexes of these elements.
Let Boolean function . Define a function for the search problem as follows:
where and is the target index. In a quantum system, indexes are represented by quantum states (or ).
Without loss of generality, we consider a search problem that includes only one target item in the unordered database throughout this paper. Suppose we have a black box (Oracle , where ) that can recognize the inputs. The purpose of Grover’s algorithm is to find out with high probability.
Here, we briefly review Grover’s algorithm in Algorithm 1. The whole quantum circuit is shown in Fig.1.
Fig.1 Quantum circuit of Grover’s algorithm. |
Full size|PPT slide
Next, we analyse Grover’s algorithm.
Denote
Then we can write
where
Since and , we have
Therefore, the effect of one iteration of Grover operator is two successive reflections in the space spanned by , around and , respectively. In other words, one iteration of causes a rotation by an angle from the initial state to the target state (see Fig.2).
Fig.2 Visualization of Grover’s algorithm. In the two-dimensional plane space spanned by , one iteration of causes a rotation by an angle from the initial state to the target state . |
Full size|PPT slide
After iterations of , the state will be
The goal is to make
then
will suffice, so we should choose
Note that must be a positive integer.
Since we have assumed there is only one target item, then
so
is a suitable choice for Grover’s algorithm. The success probability is
2.2 The modified Grover’s algorithm by Long [16]
In 2001, Long improved Grover’s algorithm and proposed a modified version of Grover’s algorithm, which will acquire the goal state with a probability of 100%. Its main idea is to extend Grover operator to operator . The adjustment is carried out by three steps: (1) substitute phase rotation for phase inversion; (2) let the phase rotation angles of two reflections in equal, which is called phase-matching condition; (3) iterate times for operator , where and . Actually, can be any integer equal to or greater than .
Here, we briefly review the modified Grover’s algorithm by Long in Algorithm 2. The whole quantum circuit is shown in Fig.3.
Fig.3 Quantum circuit of the modified Grover’s algorithm. |
Full size|PPT slide
Obviously, the modified Grover’s algorithm is a Grover’s algorithm when .
Next, we analyse the modified Grover’s algorithm.
In Grover’s algorithm, iterate
or times of the Grover operator , so that and are close to , where . However, Grover’s algorithm is unable to search for the target state accurately, except in the case of of the data in the database meet the search conditions.
After substituting phase rotation and for phase inversion and , we have
where
and
and , , , represent the Pauli gates,
The equivalence of Eq. (15) and Eq. (16) will be detailed in Appendix A. It can be seen that the phase rotation angles of two reflections in are equal, which is called phase-matching condition. Furthermore, can be regarded as the three-dimensional rotation about the axis in the Bloch sphere spanned by and the rotation angel is , where
The initial state and the target state in the three-dimensional Bloch sphere can represent by the following vectors
Denote as the projections of and on axis ,
where
As shown in Fig.4, the desired rotation angle between and satisfies
Fig.4 Visualization of the modified Grover’s algorithm. In the three-dimensional Bloch sphere spanned by , the initial state rotate around axis , and then is obtained, where is the desired rotation angle. |
Full size|PPT slide
then we will have
Besides, in order to obtain the target state with certainty, angle ought to satisfy
after times iteration of operator . Combining Eq. (25) and Eq. (27), we can get
In other words, we have
3 Distributed exact Grover’s algorithm
In this section, we mainly describe the distributed exact Grover’s algorithm (DEGA), which decomposes the original search problem into parts.
3.1 Subfunctions
As mentioned in [
27], an
-qubit Boolean function
can be split into two subfunctions
,
where .
Furthermore, we can divide the original function into subfunctions :
where , , and is the binary representation of .
More generally, can be at any positions in of the original function . For instance, we can also obtain another subfunctions :
where , , and is the binary representation of .
Next, we need to describe our partitioning strategy for the original function before providing our algorithm. We will generate a total of subfunctions for our algorithm, where . The specific generation method is as follows.
When , we choose first and last bits in to divide , then we can get subfunctions :
where and is the binary representation of . Afterwards, we generate a new function through these subfunctions,
where . Besides,
where is the Hamming weight of (its number of 1’s). It means we have acquired subfunctions , where .
When , we choose first bits in to divide , then we can get subfunctions :
where and is the binary representation of . Afterwards, we also generate a new function by these subfunctions,
where . Specifically, when is an even number, we have
When is an odd number, we have
It means we have acquired the last subfunction , where .
3.2 Distributed exact Grover’s algorithm
So far, we have successfully generated a total of subfunctions according to the original function and , where . Additionally, we assume that obtaining the Oracle for each subfunction is simple. In other words, we can have Oracles
where , , and is the target string of such that .
For the last subfunctions , we first need to determine the parity of . If is an even number, we can also have the Oracle as in Eq. (41), where . Otherwise, we can have another Oracle
where , , is the target string of such that , , , and .
Next, we provide a detailed introduction to the DEGA in Algorithm 3. The whole quantum circuit is shown in Fig.5.
Fig.5 Quantum circuit of the distributed exact Grover’s algorithm (DEGA). |
Full size|PPT slide
The target index string will be successfully searched exactly after following the above algorithm steps. Therefore, the entire process of the DEGA is accomplished.
4 Analysis
In this section, we will first demonstrate the correctness of the DEGA. The original and modified Grover’s algorithms, and existing distributed Grover’s algorithms will next be compared to the approach.
4.1 Correctness
To verify the correctness of the DEGA, it is equivalent to proving that we can obtain the target index string by Algorithm 3 exactly. Firstly, we give the following theorem.
Theorem 1. Each subfunction [as in Eq. (35) and Eq. (38)] has its corresponding target string such that , which satisfies
where and is the target string of the original function .
Proof. Without losing generality, suppose the target string can be expressed as .
The proof is divided into two parts.
Part 1: For , we first prove .
As can be seen from Eq. (34), we can get subfunctions :
where and is the binary representation of . Thus, there exists , such that
where represents removes .
In other words, we have a subfunction :
where . For the remaining subfunctions :
where .
Afterwards, we generate a new function by these subfunctions,
where . Therefore, let . It is the target string of such that .
Part 1 has been proved.
Part 2: For , we prove that
The proof of Part 2 is similar to Part 1. As can be seen from Eq. (37), we can get subfunctions :
where and is the binary representation of .
Thus, there exists , such that
where represents removes .
In other words, we have a subfunction :
where . For the remaining subfunctions :
where .
Afterwards, we also generate a new function by these subfunctions,
where . Specifically, when is an even number, we have
When is an odd number, we have
Therefore, let
It is the target string of such that .
Part 2 has been proved.
Gather all subfunction target strings, then the target string of the original function is
□
So far, we have proved that the target string corresponding to each subfunction is , which satisfies , where .
In addition, only when
of the data in the database meet the search conditions, the success probability of Grover’s algorithm is 1, which has been strictly proved mathematically [
15]. In other words, a 2-qubit Grover’s algorithm of finding one in four is exact. The modified version of Grover’s algorithm [
16] searches a target state with full successful rate. In particular, a 3-qubit modified Grover’s algorithm is also exact when
.
Next, we demonstrate the correctness of Algorithm 3 by the following Theorem 2.
Theorem 2. (Correctness of DEGA) For an -qubit search problem that includes only one target index string, suppose that the goal can be expressed as of the original function . Then we can obtain by Algorithm 3 exactly, where is the target string of and satisfies
where
Proof. From Section 3.1, we have declared how to generate subfunctions as in Eq. (35) and Eq. (38) according to and , which decomposes the original search problem into parts, where .
Furthermore, suppose that the goal can be expressed as of the original function . Theorem 1 has already explained each subfunction has its corresponding target string such that , which satisfies
Last but not least, we will accurately obtain the solution of each part. For , by running the 2-qubit Grover’s algorithm, we can precisely determine . For , by running the 2-qubit Grover’s algorithm when is even or the 3-qubit modified Grover’s algorithm when is odd, we can exactly obtain
In conclusion, we can obtain through Algorithm 3 with a probability of 100%, where is the target string of , where .□
4.2 Comparison
In this subsection, the original and modified Grover’s algorithms, and existing distributed Grover’s algorithms will be compared to our approach.
Compared with the original Grover’s algorithm, the DEGA is as exact as the modified version of Grover’s algorithm by Long, which means the theoretical probability of finding the objective state is 100%.
In order to compare the circuit depth, we give the following definition.
Definition 1. (Depth of circuit) The depth of circuit is defined as the longest path from the input to the output, moving forward in time along qubit wires.
The depth of the circuit on the left, for example, is 1, whereas the right is 11 (see Fig.6).
Fig.6 Equivalent quantum circuit of Toffoli gate (or gate), where represent gate and represents the conjugate transpose of . |
Full size|PPT slide
Furthermore, the depth of the quantum circuit depends on the circuit composed of specific quantum gates. Then we need to clarify the construction circuit of the Oracle in the quantum search algorithms. Due to the method by Qiu
et al. [
28], we will introduce a construction for the Oracle in the original and modified Grover’s algorithms.
is employed in the Grover operator to flip the phase of the target state , where . Thus, the specific construction circuit of (see Fig.7) is as follows:
Fig.7 The quantum circuit corresponding to the Oracle . |
Full size|PPT slide
where will only flip the phase of ,
where . Besides, it should be noted that
where . In particular, the construction circuit of (see Fig.8) is
Fig.8 The quantum circuit corresponding to the Oracle . |
Full size|PPT slide
It can be found that the quantum circuit in Fig.7 or Fig.8 has a circuit depth of 3.
Similarly, we can also give the specific construction circuit of in the operator (see Fig.9) as follows:
Fig.9 The quantum circuit corresponding to the Oracle . |
Full size|PPT slide
where represents the rotation gate,
and will only rotate the phase of ,
where . In particular, the construction circuit of in operator (see Fig.10) is
Fig.10 The quantum circuit corresponding to the Oracle . |
Full size|PPT slide
Quantum circuit in Fig.9 or Fig.10 also has a circuit depth of 3.
If the target state is , then the depth of circuit is only 1. We ignore this special case. By the way, perhaps there are other better methods to construct the quantum circuits of Oracle, but we will not cover it here. Throughout this paper, we use the same methods described above to construct the Oracle circuits in the Grover operator and operator .
After identifying the specific quantum gates in the original and modified Grover’s algorithms, we might calculate the circuit depth of these two methods.
Theorem 3. The circuit depths for the original and modified Grover’s algorithms are and , respectively.
Proof. In Grover’s algorithm, Grover operator is executed with times, where and . Thus, the circuit depth of Grover’s algorithm is
Similarly, since operator is executed with times, where , , and , the circuit depth of the modified Grover’s algorithm is
□
It has been discovered that the circuit depths of the original and modified Grover’s algorithms deepen as increases.
Next, we give the circuit depth of the DEGA by the following theorem.
Theorem 4. The circuit depth of Algorithm 3 is .
Proof. When is an even number, the DEGA will run parts 2-qubit Grover’s algorithm, and each part only needs to iterate the Grover operator once, so the circuit depth is
When is an odd number, the DEGA will run parts 2-qubit Grover’s algorithm and 1 part 3-qubit modified Grover’s algorithm, and the last part needs to iterate the operator twice, so the circuit depth is
In other words, the actual depth of our circuit is
□
Besides, each portion of the DEGA only comprises two or three qubits, making physical experiment verification trivial.
Therefore, the actual circuit depth will be shallower comparing with the original and modified Grover’s algorithms. The circuit depth of the DEGA only depends on the parity of , and it is not deepened as increases.
Next, we will contrast the DEGA with the existing distributed Grover’s algorithms.
In Ref. [
27], they split the original
-qubit Boolean function
two subfunctions
as in Eq. (30) and Eq. (31), and then executed
-qubit Grover’s algorithm for each subfunction. After that, they will decide whether 0 or 1 to add to the
-th bit based on which subfunction can correctly run the result (0 for
and 1 for
). That is to say, they only acquired
qubits of the target state rather than the target state itself directly. The total number of qubits used in their scheme is
.
In Ref. [
28], they have solved the case of multiple targets, and presented the serial and parallel distributed Grover’s algorithms and divided the original function
into
subfunctions
as in Eq. (32), where
represents the number of computing nodes. The total number of qubits used in their parallel scheme is
.
Finally, we will analyse why DEGA is not suitable for solving multiple target strings. To begin with, when the target string is a single string, the final state is a direct product state, which may be thought of as the direct product of several quantum states. At this stage, each node can accurately search for some information of the initial target string, yielding the original target string. However, when the target string consists of multiple strings, the final state may be an entangled state, which cannot be decomposed into a direct product of multiple quantum states at this point. In other words, DEGA is not applicable when the target string includes several strings and its related quantum state is an entangled state. Therefore, how to design a distributed quantum algorithm to solve the exact search problem with the case of multiple targets is still an open problem. Perhaps additional quantum operations, such as performing quantum gates between nodes, are needed to enable entanglement of the final state.
5 Experiment
In this section, we will provide particular situations of the DEGA on MindQuantum (a quantum software). These experiments will further demonstrate the correctness of the DEGA and explicate the specific steps of implement -qubit DEGA, where . After that, we will simulate the 5-qubit DEGA running in the depolarization channel and compare with the original and modified Grover’s algorithms. Since our circuit is shallower, it will be more resistant to the depolarization channel noise.
5.1 The 2-qubit DEGA, the target string τ = 01
Let Boolean function . Suppose
where and is the target string. When , the DEGA is a 2-qubit Grover’s algorithm. Thus, we can build its circuit (see Fig.11).
Fig.11 Quantum circuit of the 2-qubit DEGA (target string ). |
Full size|PPT slide
By sampling the circuit in Fig.11 10 000 times, the sampling results can be found in Fig.12.
Fig.12 The sampling results of the 2-qubit DEGA (target string ). |
Full size|PPT slide
The sampling results demonstrate that is obtained exactly after measurement. Besides, the total number of quantum gates is 14 and the circuit depth is 9.
5.2 The 3-qubit DEGA, the target string τ = 101
Let Boolean function . Suppose
where and is the target string. When , the DEGA is a 3-qubit modified Grover’s algorithm. Thus, we can build its circuit (see Fig.13). Note that PhaseShift (called the PS gate) is a single-qubit gate, whose matric is as follows:
Fig.13 Quantum circuit of the 3-qubit DEGA (target string ). The parameter in the circuit is , where and . |
Full size|PPT slide
By sampling the circuit in Fig.13 10 000 times, the sampling results can be found in Fig.14.
Fig.14 The sampling results of the 3-qubit DEGA (target string ). |
Full size|PPT slide
The sampling results demonstrate that is obtained exactly after measurement. Besides, the total number of quantum gates is 35 and the circuit depth is 17.
5.3 The 4-qubit DEGA, the target string τ = 1001
Let Boolean function . Suppose
where and is the target string. When , we can decomposes the original search problem into parts. To be specific, we choose last 2 bits in to divide , then we can get subfunctions :
where and . Obviously, , and
where and is the target substring.
Afterwards, we generate a new function through above four subfunctions,
where .
Similarly, we choose first 2 bits in to divide , then we can get subfunctions :
where and . Obviously, , and
where and is the target substring.
Afterwards, we generate a new function through above four subfunctions,
where .
So far, we have successfully obtained the subfunctions of two parts, and . Next, we need to run the 2-qubit Grover’s algorithm for each part. Thus, we can build the completed circuit (see Fig.15). Note that since the reading order on MindQuantum is from right to left, which is the opposite of our reading order from left to right, the 2-qubit Grover’s algorithm corresponding to is located on the top of the circuit.
Fig.15 Quantum circuit of the 4-qubit DEGA (target string ). |
Full size|PPT slide
By sampling the circuit in Fig.15 10 000 times, the sampling results can be found in Fig.16.
Fig.16 The sampling results of the 4-qubit DEGA (target string ). |
Full size|PPT slide
The sampling results demonstrate that is obtained exactly after measurement. Besides, the total number of quantum gates is 28 and the circuit depth is 9.
If the original or modified Grover’s algorithm is employed to search 1001, we can build the completed circuits (see Fig.17 and Fig.18) respectively. By sampling the circuits in Fig.17 and Fig.18 10 000 times respectively, the sampling results can be found in Fig.19 and Fig.20.
Fig.17 Quantum circuit of the 4-qubit Grover’s algorithm (target string ). |
Full size|PPT slide
Fig.18 Quantum circuit of the 4-qubit modified Grover’s algorithm (target string ). The parameter in the circuit is , where and . |
Full size|PPT slide
Fig.19 The sampling results of the 4-qubit Grover’s algorithm (target string ). |
Full size|PPT slide
Fig.20 The sampling results of the 4-qubit modified Grover’s algorithm (target string ). |
Full size|PPT slide
It can be found that the probability of Grover’s algorithm acquiring target string is 0.9627, which is not exact, while the modified Grover’s algorithm can accurately obtain . The number of quantum gates required by two algorithms is 70, and the circuit depth is 25.
5.4 The 5-qubit DEGA, the target string τ = 01001
Let Boolean function . Suppose
where and is the target string. When , we can decomposes the original search problem into parts. To be specific, we choose last 2 bits in to divide , then we can get subfunctions :
where and . Obviously, , and
where and is the target substring.
Afterwards, we generate a new function through above four subfunctions,
where .
Similarly, we choose first bits in to divide , then we can get subfunctions :
where and . Obviously, =, and
where and is the target substring.
Afterwards, we generate a new function through above eight subfunctions,
where .
So far, we have successfully obtained the subfunctions of two parts, and . Next, we need to run the 3-qubit modified Grover’s algorithm for the part of subfunction , and the 2-qubit Grover’s algorithm for the part of subfunction . Thus, we can build the completed circuit (see Fig.21). Once again since the reading order on MindQuantum is from right to left, which is the opposite of our reading order from left to right, the 2-qubit Grover’s algorithm corresponding to is located on the top of the circuit.
Fig.21 Quantum circuit of the 5-qubit DEGA (target string ). The parameter in the circuit is , where and . |
Full size|PPT slide
By sampling the circuit in Fig.21 10 000 times, the sampling results can be found in Fig.22.
Fig.22 The sampling results of the 4-qubit DEGA (target string ). |
Full size|PPT slide
The sampling results demonstrate that is obtained exactly after measurement. Besides, the total number of quantum gates is 53 and the circuit depth is 17.
If the original or modified Grover’s algorithm is employed to search , we can build the completed circuits (see Fig.23 and Fig.24 respectively). By sampling the circuits in Fig.23 and Fig.24 10 000 times respectively, the sampling results can be found in Fig.25 and Fig.26.
Fig.23 Quantum circuit of the 5-qubit Grover’s algorithm (target string ). |
Full size|PPT slide
Fig.24 Quantum circuit of the 5-qubit modified Grover’s algorithm (target string ). The parameter in the circuit is , where and . |
Full size|PPT slide
Fig.25 The sampling results of the 5-qubit Grover’s algorithm (target string ). |
Full size|PPT slide
Fig.26 The sampling results of the 5-qubit modified Grover’s algorithm (target string ). |
Full size|PPT slide
It can be found that the probability of Grover’s algorithm acquiring target string is 0.9993, which is not exact, while the modified Grover’s algorithm can accurately obtain . The number of quantum gates required by two algorithms is 117, and the circuit depths are 33.
Through the above experiments, we can know the specific steps of implement -qubit DEGA, where . Besides, we found that the modified Grover’s algorithm and the DEGA can achieve exact search, while the Grover’s algorithm can obtain target strings with high probability (see Fig.27). In addition, the number of quantum gates and circuit depth required by the original and modified Grover’s algorithms are the same, which will deepen as increases. However, the DEGA requires fewer quantum gates (see Fig.28) and shallower circuit depth (Fig.29). The circuit depth of the DEGA only depends on the parity of , and it does not deepen as increases.
Fig.27 The probability of obtaining the target string by different algorithms. |
Full size|PPT slide
Fig.28 The number of quantum gates required by different algorithms. |
Full size|PPT slide
Fig.29 The depth of quantum circuit of different algorithms. |
Full size|PPT slide
5.5 The depolarization channel
In the above experiments, we ignore the influence of noise, which means that we can achieve theoretically exact or high probability search. However, due to the existence of noise, there are certain errors in the operation of each type of quantum gate on a real quantum computer.
In this subsection, we consider the depolarization channel that is a essential type of quantum noise. After that, we will simulate the 5-qubit DEGA running in the depolarization channel and compare with the original and modified Grover’s algorithms. Through such simulations, it shows the DEGA will be more resistant to the depolarization channel noise.
In the depolarization channel [
35], a single qubit will be replaced by the completely mixed state
with a probability of
and remain unaltered with a probability of
. It means the state of the quantum system has changed to
where represents the initial quantum state. For arbitrary state , we have
where and are Pauli operators. Inserting Eq. (108) into Eq. (107) gives
For simplicity, the depolarization channel is sometimes written as
which indicates the state will remain unaltered with the a probability of , and the Pauli operators will be applied with a probability of for each operators.
Furthermore, the depolarizing channel can be extended to a -dimensional () quantum system. Similarly, the depolarizing channel of a -dimensional quantum system replaces the completely mixed state with a probability of , and remains unaltered with a probability of . The corresponding quantum operation is
On MindQuantum, we simulate the quantum algorithms running in the depolarization channel by adding noise behind each quantum gate. That is, we can rebuild the quantum circuits of the original and modified Grover’s algorithms and the DEGA in the depolarization channel (see Fig.30 to Fig.32). In the process of simulation, we set the noise parameter and DC represents the depolarization channel.
Fig.30 Quantum circuit of the 5-qubit Grover’s algorithm (target string ) in the depolarizing channel. |
Full size|PPT slide
Fig.31 Quantum circuit of the 5-qubit modified Grover’s algorithm (target string ) in the depolarizing channel. The parameter in the circuit is , where and . |
Full size|PPT slide
Fig.32 Quantum circuit of the 5-qubit DEGA (target string ) in the depolarizing channel. The parameter in the circuit is , where and . |
Full size|PPT slide
By sampling the above three circuits 10 000 times, respectively. In order to better reproduce the experimental results, we set the random seeds of simulator and sampling both being 42. It is worth noting that modifying the random seed will alter the sampling outcome. In actuality, the random seed is a function to generate random number. The simulator will sample the quantum circuit according to the generated random number. As a result, various random numbers provide varied sampling outcomes in the simulator. Then, if we set the random seed to a fixed value (set the random seed being 42 in the full text), the experimental results in this paper can be reproduced when repeating the same experiment. At last, the sampling results can be found in Fig.33 to Fig.35, respectively.
Fig.33 The sampling results of the 5-qubit Grover’s algorithm in the depolarizing channel. The noise parameter . |
Full size|PPT slide
Fig.34 The sampling results of the 5-qubit modified Grover’s algorithm in the depolarizing channel. The noise parameter . |
Full size|PPT slide
Fig.35 The sampling results of the 5-qubit DEGA in the depolarizing channel. The noise parameter . |
Full size|PPT slide
It can be seen that due to the existence of noise, it will not achieve exact search. Compared with other states, can be obtained with a higher probability, which means that the target string can be successfully searched. The probability obtained by Grover’s algorithm is 0.3495, the probability by the modified Grover’s algorithm is 0.3501, and the probability by the DEGA is 0.6208. Obviously, the probability of the DEGA is higher.
Furthermore, we set the noise parameter as , and count the probability of obtaining in each sampling by different algorithms. The statistical chart as shown in Fig.36.
Fig.36 The probability of obtaining by different algorithms. |
Full size|PPT slide
With the increase of noise parameter , the probability of obtaining decreases. In addition, in the noisy environment, the probabilities of getting target string by the original and modified Grover’s algorithms are close. At the same time, under the premise of the same noise parameter, the probability of acquiring by the DEGA is higher than those of the original and modified Grover’s algorithms.
When , the sampling results can be found in Fig.37 to Fig.39, respectively. The probability of obtaining the target string are 0.0363, 0.0366 and 0.0899, respectively. The desired results were drown out by the channel noise in the original and modified Grover’s algorithms. However, can still be obtained with a higher probability than other states in the DEGA. Even if , the DEGA still works (see Fig.40 to Fig.42).
Fig.37 The sampling results of the 5-qubit Grover’s algorithm in the depolarizing channel. The noise parameter . |
Full size|PPT slide
Fig.38 The sampling results of the 5-qubit modified Grover’s algorithm in the depolarizing channel. The noise parameter . |
Full size|PPT slide
Fig.39 The sampling results of the 5-qubit DEGA in the depolarizing channel. The noise parameter . |
Full size|PPT slide
Fig.40 The sampling results of the 5-qubit Grover’s algorithm in the depolarizing channel. The noise parameter . |
Full size|PPT slide
Fig.41 The sampling results of the 5-qubit modified Grover’s algorithm in the depolarizing channel. The noise parameter . |
Full size|PPT slide
Fig.42 The sampling results of the 5-qubit DEGA in the depolarizing channel. The noise parameter . |
Full size|PPT slide
It can be found that although the number of qubits of the DEGA is the same as those of the original and modified Grover’s algorithms, our circuit depth is shallower, so that our scheme is more resistant to the depolarization channel noise. In other words, it further illustrates that distributed quantum algorithm has the superiority of resisting noise.
6 Conclusion
Quantum computation is entering the noisy intermediate-scale quantum (NISQ) era. Currently, small-qubit quantum computers are much easier to implement than large-scale universal quantum computers. Hence, researchers are considering how several small-scale devices might collaborate to accomplish a task on a large scale.
In this paper, we have focused on the combination of distributed computing and the exact Grover’s algorithm, and considered a search problem that includes only one target item in the unordered database. After that, we have proposed a distributed exact Grover’s algorithm (DEGA), which decomposes the original search problem into parts.
Specifically, (i) our algorithm is as exact as the modified version of Grover’s algorithm by Long, which means the theoretical probability of finding the objective state is 100%; (ii) the actual depth of our circuit is , which is less than the circuit depths of the original and modified Grover’s algorithms, and , respectively. It only depends on the parity of , and it does not deepen as increases; (iii) additional auxiliary qubits will not be employed. In our framework, the total number of qubits is rather than , where represents the number of computing nodes in the previous distributed method.
Eventually, we have provided particular situations of the DEGA on MindQuantum (a quantum software). It has further demonstrated the correctness of the DEGA and explicated the specific steps of implement -qubit DEGA, where . Through the experiments, we have found that the modified Grover’s algorithm and the DEGA can achieve exact search, while Grover’s algorithm can obtain target strings with high probability. In addition, the number of quantum gates and circuit depth required by the original and modified Grover’s algorithms are the same, which will deepen as increases. However, the DEGA requires fewer quantum gates and shallower circuit depth. The circuit depth of the DEGA only depends on the parity of , and it does not deepen as increases.
After that, we have simulated a -qubit DEGA running in the depolarization channel and compared with the original and modified Grover’s algorithms. Through such simulations, it shows the DEGA will be more resistant to the depolarization channel noise. In other words, it further illustrates that distributed quantum algorithm has the superiority of resisting noise.
However, we have only designed a distributed exact quantum algorithm for the case of unique target in search problem, so it is still open that designing a distributed exact quantum algorithm solves the search problem with the case of multiple targets.
7 Appendix A: The equivalence of Eq. (15) and Eq. (16)
Let
In order to prove the equivalence of Eq. (15) and Eq. (16), it is equivalent to proving
Inserting Pauli gates to the right of Eq. (112), we have
where
Besides, we know that
Furthermore, we have
To sum up, it can be seen from Eq. (117) to Eq. (120) that Eq. (15) and Eq. (16) are equivalent.
{{custom_sec.title}}
{{custom_sec.title}}
{{custom_sec.content}}