Exact distributed quantum algorithm for generalized Simon’s problem

(Dated


I. INTRODUCTION
Quantum computing [1] has been proved to have great potential in factorizing large numbers [2], searching unordered database [3] and solving linear systems of equations [4].However, large-scale universal quantum computers have not yet been realized due to the limitations of current physical devices.At present, quantum technology has been entered to the Noisy Intermediate-Scale Quantum (NISQ) era [5], which makes it possible to implement quantum algorithms on middle-scale circuits.
Distributed quantum computing is a novel computing architecture, which combines quantum computing with distributed computing [6][7][8][9][10][11][12][13][14][15].In distributed quantum computing architecture, multiple quantum computing nodes communicate with each other and cooperate to complete computing tasks.Compared with centralized quantum computing, the size and depth of circuit can be reduced by using distributed quantum comput-ing, which is beneficial to improve the performance of circuit against noise.
Simon's problem is one of the most important problems in quantum computing [16].For solving Simon's problem, quantum algorithms have the advantage of exponential acceleration over classical algorithms [17].Remarkably, Simon's algorithm greatly inspired the proposal of Shor's algorithm [2].Furthermore, the generalized Simon's problem is a natural extension of Simon's problem, and an instance of the hidden subgroup problem [1,18].
Tan, Xiao, and Qiu et al. [12] proposed a distributed quantum algorithm for Simon's problem, but they left it open as to whether an exact distributed version exists.In the centralized case, Cai and Qiu [17] utilized quantum amplitude amplification to address the issue of exactness for Simon's problem.Their approach has served as inspiration for our work.In this paper, we contribute in two new ways.Firstly, we characterize the structure of the generalized Simon's problem in distributed scenario and leverage this understanding to design a corresponding distributed quantum algorithm.Secondly, we incorporate quantum amplitude amplification [19] to ensure the algorithm's exactness.
The remainder of this paper is organized as follows.
In Sec.II, we present some notations related to group theory, and recall the generalized Simon's problem.In Sec.III, we characterize the structure of the generalized Simon's problem in distributed scenario.Then, in Sec.IV we describe a distributed quantum algorithm for the generalized Simon's problem and give the corresponding analytical procedure.Furthermore, in Sec.
V we introduce quantum amplitude amplification technique, and with this technique, we in Sec.VI design an exact distributed quantum algorithm for the generalized Simon's problem and prove its correctness.In addition, in Sec.VII, we compare our algorithm with other algorithms.Finally, we conclude with a summary in Sec.VIII.

II. PRELIMINARIES
In this section, we present some notations related to group theory, and recall the generalized Simon's problem.

A. Notations
It is known that the generalized Simon's problem is an instance of the hidden subgroup problem.Below, we present some of the notations related to group theory.
For x, y ∈ Z n 2 with x = (x 1 , . . ., x n ) and y = (y 1 , . . ., y n ), we define x + y := ((x 1 + y 1 ) mod 2, . . ., (x n + y n ) mod 2).( 1) ( For any subset X ⊆ Z n 2 , X denotes the subgroup generated by X, i.e., The set X is linearly independent if X = Y for any proper subset Y of X.Notice that the cardinality Let G denote the group ({0, 1}, ⊕), the basis of G is a maximal linearly independent subset of G.The cardinality of the basis of G is called its rank, denoted by rank

B. The generalized Simon's problem
The generalized Simon's problem is a special kind of the hidden subgroup problem [18], which can be described as follows.Consider a function f : {0, 1} n → {0, 1} m , where we promise that for any x, y ∈ {0, 1} n , there is a hidden subgroup S ≤ Z n 2 , such that f (x) = f (y) if and only if x⊕y ∈ S, where |S| = 2 k for some 0 ≤ k ≤ n (m ≥ n − k).For the specific case where k = 1, the generalized Simon's problem precisely aligns with Simon's problem.
Denote the basis of S as {s i |s i ∈ {0, 1} n , 1 ≤ i ≤ k}, then we have Suppose we have an oracle that can query the value of function f .For any x ∈ {0, 1}  20,21].

III. THE GENERALIZED SIMON'S PROBLEM IN THE DISTRIBUTED SCENARIO
In the following, we describe the generalized Simon's problem in distributed scenario and characterize its structure.
The function f corresponding to the generalized Simon's problem is divided into 2 t subfunctions f w : {0, 1} n−t → {0, 1} m as follows.Let where u ∈ {0, 1} n−t , w ∈ {0, 1} t .Suppose there are 2 t people, each of whom has an oracle O fw that can query all f w (u) = f (uw) for any u ∈ {0, 1} n−t , w ∈ {0, 1} t , where O fw are defined as where u ∈ {0, 1} n−t , w ∈ {0, 1} t and b ∈ {0, 1} m .Each person can access 2 n−t values of f .They need to find the hidden subgroup S by querying their own oracle and communicating with each other as few times as possible.
Below, we further introduce some notations related to the function f corresponding to the generalized Simon's problem.We anticipate that the reader is already familiar with the concept of multisets.
Definition 3.For any u ∈ {0, 1} n−t , let S(u) represent a string of length 2 t m by concatenating all strings f w (u) (w ∈ {0, 1} t ) according to lexicographical order, that is, where , where w i = w j for any i = j and ≤ denotes the lexicographical order.
Let S be the hidden subgroup to be found, and denote the basis of S as {s il s ir then then S r ≤ Z t 2 .The following theorem concerning S(u) is useful and important.
. By the definition of group S and S l , we have ∀s l ∈ S l and ( Then we have ∃w, w ∈ {0, 1} t such that z = f (uw) and z = f (vw ).So we have f (uw) = f (vw ).According to the definition of the generalized Simon's problem, we have uw ⊕ vw = (u ⊕ v)(w ⊕ w ) ∈ S. Further, by the definition of group S and S l , we have u ⊕ v ∈ S l .

IV. DISTRIBUTED QUANTUM ALGORITHM FOR THE GENERALIZED SIMON'S PROBLEM
In the following, we begin with giving related notation, function and operators that are used in distributed quantum algorithm for the generalized Simon's problem, i.e., Algorithm 1.
Let [N ] represent the set of integers {0, 1, • • • , 2 t − 1}, and let BI : {0, 1} t → [N ] be the function to convert a binary string of t bits to an equal decimal integer.
The query operators O fw in Algorithm 1 are defined as where where Intuitively, the effect of U Sort in Algorithm 1 is to sort the values in the 2 t control registers by lexicographical order and XOR to the target register.
In addition, for any operator A w with w ∈ {0, 1} t , we let w∈{0,1} Algorithm 1 Distributed quantum algorithm for finding the elements in S ⊥ Y ← {0 n−t }; 3: Measure the first register, and get an element z; Y ← Y ∪ {z}. 12: end if 13: end procedure In the following, we prove the correctness of Algorithm 1.The state after the third step of Algorithm 1 is Then Algorithm 1 queries each of the oracles to get the following state.
After sorting by using U Sort , we have the following state.
After that, we query each oracle again and obtain the following state.
After using Hadamard transform on the first register, in the light of Theorem 1, we get the following state.
Note that if there exists s l ∈ S l such that s l • z = 1, then we have If z ∈ S ⊥ l , then s l ∈S l (−1) s l •z = 2 k l , so we have Thus, in line 9 of Algorithm 1, after measuring the first register of the state |ψ 5 , we can obtain an element z ∈ S l ⊥ .In line 9 of Algorithm 1, since the result we measure may not be linearly independent of the results we measured earlier, there is no guarantee that Y ⊥ = S l can be obtained for Y obtained after running Algorithm 1 iteratively many times.
After running Algorithm 1 iteratively many times, we denote S l = Y ⊥ .Denote k l = rank (S l ), k l ≤ k l ≤ n−t, and the basis of S l as {e i |e i ∈ {0, 1} n−t , 1 ≤ i ≤ k l }.Note that S l may not be equal to S l . Denote Algorithm 2 Distributed quantum algorithm for finding S 1: procedure DS(integer n, integer t, subgroup S l )

2:
Query each oracle O fw once in parallel to get f 0 n−t w w ∈ {0, 1} t ; 3: return S. 8: end procedure Denote S = It will be proved below that S may not be equal to S , and hence Algorithm 2 is not exact.
In fact, if S l = S l , then there may exist e i in the basis of S l and e i / ∈ ∈ S , which indicates that there is a case where S is not equal to S , i.e., Algorithm 2 is not exact.

V. QUANTUM AMPLITUDE AMPLIFICATION
By means of the work of Cai and Qiu [17], we also require a similar method, i.e., the use of quantum amplitude amplification technique to make the distributed quantum algorithm for solving the generalized Simon's problem exactly.
To make Algorithm 1 exact, we add a post-processing subroutine after line 8 of Algorithm 1 to ensure (Y \ {0 n−t }) ∪ {z} is always linearly independent when we get the measured result z of the first register.
Denote by and let denote the state after line 8 of Algorithm 1.
Let A : {0, 1} n−t+2 t+1 m → {0, 1} n−t+2 t+1 m denote the combined unitary operators from line 4 to line 8 in Algorithm 1, i.e., A is defined as Then by R 0 (φ) and R A (ϕ, Y ), we define the quantum amplitude amplification operator Q : {0, 1} n−t+2 t+1 m → {0, 1} n−t+2 t+1 m as Denote by We have In order to make Algorithm 1 exact, the crucial step is to eliminate all states in Y from the first register.In quantum amplitude amplification process, one can achieve this by choosing appropriate φ, ϕ ∈ R such that after applying Q on S l ⊥ , 0 2 t m , S(T ) , the amplitudes of all states in Y of the first register become zero.
In the following, we present a proposition related to the operator Q acting on the state S l ⊥ , 0 2 t m , S(T ) , which is proved in Appendix A.
Proposition 1.Let φ = 2 arctan We describe the quantum amplitude amplification algorithm used to measure good states as follows.In fact, since we do not know the rank of group S, i.e., k l , we assume that the rank of group S is d l , where 0 ≤ d l ≤ min(k, n − t).
Algorithm 3 Quantum amplitude amplification for measuring good states Measure the first register, get the result z; In this section, we first design an exact distributed quantum algorithm for finding S l , i.e., Algorithm 4, which combines Algorithm 1 and Algorithm 3.After finding S l , we design Algorithm 5 to find the hidden subgroup S exactly.
We describe the main design idea for Algorithm 4 as follows.First, we use Algorithm 1 to ensure that the state of the first register is in S ⊥ l , and then we utilize quantum amplitude amplification technique [19] to ensure that the measured result of the first register is not in Y .
Since rank(S l ) is undetermined, we assume it is d l and initialise d l = 0.For a given d l , if d l = k l , then during the iterative run of Algorithm 4, it must be obtained that z ∈ Y .In this case, the value of d l is increased by 1.If z / ∈ Y , then add z to Y .After that, Algorithm 4 is run repeatedly.Prepare registers 0 n−t+2 t+1 m ;

6:
Apply operator A on 0 n−t+2 t+1 m , where A is defined in Eq. (23); Y ← Y ∪ {z}; 12: 14: Solve the system of exclusive-or equations, get S l = Y ⊥ ; 15: return S l .16: end procedure In the following, we present Algorithm 5.The main design idea of Algorithm 5 is to first find the associated string corresponding to the base of group S l , and then concatenate the strings formed by the base of group S l with their corresponding associated strings, and finally merge them to form the hidden subgroup S exactly.
Algorithm 5 Exact distributed quantum algorithm for finding S 1: procedure EDS(integer n, integer t, subgroup S l )

2:
Query each oracle O fw once in parallel to get f 0 n−t w w ∈ {0, 1} t ;

3:
Query oracle O f 0 t once in parallel to get f ei0 t , where ei|ei ∈ {0, 1} n−t , 1 ≤ i ≤ k l is the basis of S l ;

4:
Find vi ∈ {0, 1} t in parallel such that f 0 n−t vi = f ei0 t ; 5: return S. 8: end procedure In the following, we prove the correctness of Algorithm 4 and Algorithm 5.
First, we prove the correctness of Algorithm 4. In line 6 of Algorithm 4, since operator A is defined in Eq. ( 23), which is the combined unitary operators from line 4 to line 8 in Algorithm 1, the following equation can be obtained from the proof of correctness of Algorithm 1.
Applying Q to A 0 n−t+2 t+1 m , we have the state |ψ 6 in FIG. 1 as where Based on the Proposition 1, we have After measuring on the first register, we can get an element that is in S ⊥ l \ Y .After n − t − k l repetitions of Algorithm 4, we can obtain n − t − k l elements in S ⊥ l .Then, using the classical Gaussian elimination method, we can obtain S l .
If we have already found out S l , we can use Algorithm 5 to find out the hidden subgroup S. In the following, we prove the correctness of Algorithm 5.

Denote by
where To prove the correctness of Algorithm 5, we prove that S = S * .
First, we prove that S * ⊆ S.
Let s * = k l i=1 γ i e i v be any element belonging to S * .Since f (0 n−t v i ) = f (e i 0 t ), by the definition of the generalized Simon's problem, we have Moreover, for any v ∈ V j , there is Therefore, we have f (0 n−t v) = f k l i=1 γ i e i 0 t .According to the definition of the generalized Simon's problem, we have s * = k l i=1 γ i e i v ∈ S. Thus, S * ⊆ S.
Then, we prove that S ⊆ S * .Let s = s l s r be any element belonging to S, where s l ∈ S l , s r ∈ S r .
Since {e i |e i ∈ {0, 1} n−t , 1 ≤ i ≤ k l } is the basis of S l , we also have By the definition of the generalized Simon's problem, we have f (0 n−t s r ) = f (s l 0 t ).Furthermore, there exists γ i ∈ {0, 1} such that From the definition of V * j , we have s r ∈ V * j .Thus, s ∈ S * .Consequently, S ⊆ S * .

VII. COMPARISONS WITH OTHER ALGORITHMS
First, we compare Algorithm 1 with the distributed classical randomized algorithm for solving the generalized Simon's problem.Based on the previous analysis, Algorithm 1 needs O(n − t − k l ) queries for finding group S l .However, in order to find group S l , the distributed classical randomized algorithm needs to query oracles Ω max k l , √ 2 n−t−k l times.
Therefore, Algorithm 1 has the advantage of exponential acceleration compared with the distributed classical randomized algorithm.
Second, we compare Algorithm 4 with the distributed classical deterministic algorithm for solving the generalized Simon's problem.According to the previous analysis, Algorithm 4 needs O(n − t) queries for finding group S l .However, in order to find group S l , the distributed classical deterministic algorithm needs to query oracles Ω max k l , √ 2 n−t−k l times.Consequently, Algorithm 1 and Algorithm 4 facilitate the reduction of circuit depth and the physical implementation of algorithm in the NISQ era.
Finally, we compare Algorithm 2 and Algorithm 5 with the best distributed quantum algorithm for Simon's problem proposed previously [12].Algorithm 2 and Algorithm 5 can not only solve Simon's problem, but also the generalized Simon's problem.In particular, Algorithm 5 is exact.However, the algorithm [12] cannot solve the generalized Simon's problem and is not exact.As a result, Algorithm 2 and Algorithm 5 have better generalisability.Algorithm 5 not only has better generalisability, but also has the advantage of being exact.

VIII. CONCLUSION
In this paper, we have characterized the structure of the generalized Simon's problem in distributed scenario.Based on the structure, we have designed a corresponding distributed quantum algorithm.Then we have further utilized quantum amplitude amplification technique to make our algorithm exact.The number of actual functioning qubits for each oracle in our algorithm is reduced, which reduces the circuit depth and helps reduce circuit noise, making our algorithm easier to be implemented in the current NISQ era.
Our algorithm has the advantage of exponential acceleration compared with the distributed classical algorithm.Compared to the centralized quantum algorithm for the generalized Simon's problem, the oracle in our algorithm is easier to be implemented, which is an important advantage for implementing quantum query algorithms.Compared with the best distributed quantum algorithm for Simon's problem proposed previously, the exact distributed quantum algorithm we designed for the generalized Simon's problem has the advantage of better generalisability and exactness.
We found that characterizing the essential structure of problem is crucial for designing corresponding exact distributed quantum algorithm.In future research work, our algorithm may be instructive for designing exact distributed quantum algorithms for solving the hidden subgroup problem.Furthermore, the ideas and methods employed in the design of our algorithm may also be useful for the design of exact distributed quantum algorithms for solving other problems.

7 :
return z. 8: end procedure VI.EXACT DISTRIBUTED QUANTUM ALGORITHM FOR THE GENERALIZED SIMON'S PROBLEM

Algorithm 4
this means that d l has been increased to equal k l .We have also obtained the set Y , which satisfies Y = S ⊥ l .Eventually, by solving the system of exclusive-or equations, we can obtain S l = Y ⊥ .Exact distributed quantum algorithm for finding S l 1: procedure EDSL(integer n, integer t, integer m, operator O fw )

FIG. 1 .
FIG. 1.The circuit for the quantum part of exact distributed quantum algorithm for finding S l (Algorithm 4).
n and any b ∈ {0, 1} m , if we input |x |b into the oracle, then |x |b ⊕ f (x) is obtained.The goal of the generalized Simon's problem is to find the hidden subgroup S by performing the minimum number of queries to function f .

TABLE II .
Comparison of Algorithm 4 with distributed classical deterministic algorithm.In Algorithm 1 and Algorithm 4, the number of actual functioning qubits for each oracle is only n − t + m.However, in the centralized quantum algorithm, the number of actual functioning qubits for each oracle is n + m.

TABLE III .
Comparison of Algorithm 1 and Algorithm 4 with the centralized quantum algorithm for solving the generalized Simon's problem.