Semi-empirical method for evaluating the robustness of QRWS algorithm for different coin sizes and functional dependence between coin phases

In this work we study the quantum random walk search algorithm when the walk coin is constructed by generalized Householder reflection and a phase multiplier. We focus on the algorithm’s robustness against errors in the phases – how the probability to find solution decreases with increasing the errors in those phases. The robustness depends on the functional dependence between the reflection phase φ and the phase multiplier ζ. Here we use interpolations by non-linear logistic regression functions to study a particular functional dependence between angles ζ = -2φ + 3π + α sin(2φ) for different coin sizes and parameters alpha. The obtained results in this work are discussed, together with their limitations.


Introduction
Quantum random walk is a quantum analogue of its classical counterpart.It was first introduced by Y. Aharonov et al. [1] and is very popular in the recent years.This walk can be used to traverse a graph with arbitrary topology and quantum interferences that arises during it allows a quadratically faster traversing of the graph.Those properties are used in variety of different applications s including quantum state preparation [2], quantum machine learning [3] [4], quantum cryptography [5] and in the quantum algorithms.Examples of such quantum algorithms are quantum algorithms for calculating Boolean formulas [6], quantum simulated annealing [7], quantum algorithm for finding distinct elements [8] and quantum random walk search (QRWS) algorithm [9].
Quantum random walk search algorithm was first introduced by Shenvi et al. in their work [9].This probabilistic quantum algorithm is quadratically faster than the fastest known classical search algorithm.It can be used to search in a database with an arbitrary topology, unlike Grover's search algorithm [10] that have similar speed but can be used only on linear database.Examples of databases that are of interest for quantum random walk search are simplex [11], hexagonal lattice [12], triangle lattice [13], fractal structures [14] and hypercube [15].
The most efficient way to implement quantum algorithms on a particular quantum computer architecture, depends on the physical processes used to control its qubits.An example is the decomposition of the operators to Householder reflections and phase gates that can be done efficiently in ion trap quantum computers [16] and photonic quantum computers [17].Compared to the decomposition to Givens rotations [10], decomposition of an arbitrary operator to Householder reflection and phase gates is quadratically faster [18] and is easy to implement even when qudits are used instead of qubits.Some quantum algorithms like Grover's algorithm [19] and Quantum random walk search algorithm [20] have operators that can be constructed by just one generalized Householder reflection.
Regression functions are functions used to estimate the functional dependence of a set of datapoints.They have variety of uses in different fields of natural and social science: including particle physics [21], astronomy [22], bio chemistry [23], molecular biology [24] and systems biology [25], finance [26], economics [27] and many others.Regression functions, similarly to machine learning, is often used for interpolation (prediction of the function behavior within interval fixed by the data set) or extrapolations (prediction of the function behavior outside the defined by the dataset interval).There are different functions used in the regression analysis, like for example the asymmetric Gaussian and Hill functions.
The asymmetric Gaussian is used in different fields including machine learning (pattern recognition [28] and image classification [29]), solid state physics [30] and financial data analysis [26].
The Hill function is non-linear logistic regression function used in computational biochemistry [23] and systems biology [25], where it describes phenomenologically the non-linear reaction's rate in the case when the bindings influence each other (cooperative binding).This function should not be confused with the solution of the Hill equation in quantum mechanics (second order differential equation for a periodic function).
In our previous works [20] and [31] we have proposed modification of QRWS algorithm that uses as traversing coin the generalized Householder reflection and a phase multiplier.We show that the robustness of the algorithm (the interval where the probability to find the solution is close to its maximum) increases if a particular functional dependence between angles is preserved.In those works, we show numerical results for relatively small coin size and give prognosis for probability to find solution of QRWS for larger coin size by using supervised machine learning.In [32] we make the prognosis by using modified Hill function to fit the QRWS's probability to find solution as a function of the coin size for a few selected functional dependences between the coin phases.We used those fits to extrapolate both the maximal probability to find solution and the robustness of the algorithm for those phases' relations as a function of the coin size.However, those extrapolations were not general -they can't be used for an arbitrary functional dependence.Here, we interpolate the probability to find solution as a function of both the coin size and an additional parameter.We extrapolate the quantum algorithm's success rate for larger coin size.
This work is structured as follows: In Sec. 2 is given a brief description of the quantum random walk search algorithm on hypercube.Next, in Sec. 3 we define the traversing coin constructed by generalized householder reflection and an additional phase, and for some coin sizes we show how the probability to find solution behaves when the phases change.In addition, here we give a particular functional dependence between phases and define the corresponding robustness of the algorithm.Sec. 4 is dedicated to the description of the fits of the probability to find solution of QRWS algorithm by modified Hill function.This function has three parameters, and we calculate them for fixed coin size and functional dependence.The main results in this work begin from Sec. 5 -namely fitting the probability to find solution of QRWS for an arbitrary coin size and an arbitrary parameter in the functional dependence.In Sec.5.1 and Sec.5.2 two of modified Hill function parameters from Sec. 4, are fitted with a single function for all coin dimensions.In Sec.5.3.1 and Sec.5.3.2 two ways to fit the final third parameter by modified Hill function is shown.A comparison between the two fit variants is given in Sec.5.3.3.Comparison of the two different fits of QRWS is in Sec.5.4, where we also discuss their limits of applicability.At the end, Sec.

Quantum random walk search
The quantum random walk search algorithm is probabilistic quantum algorithm designed to search in a database constructed as a graph with an arbitrary topology.Together with the more famous Grover's search algorithm they are quadratically faster than their classical counterparts.Probability to find solution depends on the modification of the algorithm, the number and positions of the marked nodes and various characteristics of the graph -its size and topology of the searched structure.The quantum circuit of QRWS is shown on Fig. 1.In this work we will study only QRWS on Hypercube.The algorithm has three quantum registers -a control register with size 2, node registers with size n = 2 m and an edge register (known also as coin register) with size m.The initial state of all registers is |0 .Next, the node and edge registers are put in an equal superposition of states by applying the discrete Fourier transformation operators F n and F m on them.
Next step consists of applying the QRWS iteration k times, where: Here, means that the number in the brackets is rounded down.Each iteration is constructed in the following way: (i) An Oracle is applied on the node and control registers and entangles them.It marks all solutions by changing the state of the control register.When the algorithm has λ solutions h 1 , h 2 , . . ., h λ , the Oracle's action can be written as: (ii) For all states that are not solutions, a traversing coin C 0 is applied on the edge register.As a traversing coin can be used any unitary operator with size equal to the size of the node register.In case of hypercube the most common choice is the Grover coin.(iii) For all states that are solution, the marking coin C 1 is applied on the edge register.In case of hypercube, most often is used the minus identity operator.
(iv) For the second time in the iteration, the Oracle is applied.It disentangles the node and edge registers.(v) The final operator in the algorithm is the Shift operator.It makes the walk itself depending on the state of the edge register.The Shift operator defines the topology of the walked structure, and in the case of Hypercube the shift operator is: where j i is the j-th state when i-th bit is flipped.
The algorithm ends by measurement of the node register.The probability to find solution is approximately: If the result after the measurement is not the marked state, the algorithm can be repeated.

Robust traversing coin
One way to construct the walk coin is by using a generalized Householder reflection and a phase multiplier: where |χ is equal weight superposition, φ and ζ are the Householder phase and the additional phase.Probability to find solution after final iteration depends on the used walk coin.The Grover coin is an example for such coin and it can be obtained when φ = ζ = π.In case of such construction of the coin, the probability to find solution can be written as: For fixed m, the region with high p(φ, ζ) looks like a stripe, whose width decreases as the size of the coin increases.In this case, the dependence of p on both angles can be approximated by a curve and a functional dependence between the phases is introduced.
If for fixed value of m, the maximal probability to find solution is p m ax and it is achieved at φ = φ max .Then we define robustness, for a fixed functional dependence ζ(φ), as the largest ε for which is fulfilled: A highly robust nonlinear functional dependence between φ and ζ was proposed in our previous work [20].It can be written as: where α is a parameter.The value of α that leads to the highest robustness depends on the coin size.
Examples of p(φ, ζ) for coin sizes 4,6,8 and 10 can be seen on Fig. 2. On the horizontal axis is given the parameter α and on the vertical one is the angle φ.The teal dashed line corresponds to α = 1/(2π) and the blue dash-dotted line -to α = 0.
Of particular interest is the area around φ = π with a high probability to find solution.The wider this area is for fixed value of α, the higher is the robustness of the algorithm against inaccuracies of φ.Near the optimal value of φ, the robustness against inaccuracies in α is also very important.This investigation will give us optimal functional dependencies with high stability of the algorithm.This will be useful to find the best functional relation for a particular experimental implementation of the quantum algorithm.
Calculating the p(φ, α) for larger coin size cannot be done due to scaling of the both memory and computational time of QRWS algorithm with increasing the coin size.However, we can use a nonlinear fit to evaluate p(φ, α) and in the next sections we will show a prediction for p(φ, α) for a larger coin size.

Hill fit for an arbitrary coin size
The Hill function is commonly used in biochemistry and systems biology for logistic regression of nonlinear functional dependences.It can be modified in order to obtain an approximation of p(φ) for fixed coin size and functional dependence between the phases, as is made in [32]: In this formula there are three parameters and each of them corresponds to one of the curve's characteristics.Eq. ( 12) can describe a Gaussian like shape with plateau (its center is at the point φ = π).Its maximal height is controlled by b, the slope of the curve by n and the width of the plateau -by 4.
The standard deviation can be used to assess how good the fit is: where N is the number of fitting points, q -the number of fitting parameters.P j and W j are the probability to find solution and the fit for the j-th point φ = φ j .1.
In our previous work [32], we obtain fits of the QRWS simulations for a few particular relations between the walk coin parameters as a function of the coin size m: Table 1.Numerical values for the parameters of the Hill fits of the probability to find solution of QRWS algorithm with coin sizes 8 and 10 and nonlinear functional dependence between the phases as in Eq. ( 16) with three different values of α.The columns from 4 to 7 correspond to parameters b, k and n of the Hill fit.The last column gives the standard deviation as a way to estimate the accuracy of the fit.By using the approximation for the probability (14), we make prognosis for some important characteristics for larger coin sizes: (i) A prognosis for the lower bound of the maximal probability to find solution (ii) For the robustness of the algorithm IC-MSQUARE-2023 Journal of Physics: Conference Series 2701 (2024) 012025

Hill fit parameters for functional dependencies of a certain type and an arbitrary coin size
In this work we will fit the probability to find solution, when the functional dependence between the coin phases is of type: In this case W and its parameters will depend on α, so the fitting function will be: In the next three subsections we will show the fits for each b(m, α), k(m, α) and n(m, α).
First, we will fit each of those parameters for the same m as a function of α, namely b(α), k(α) and n(α) for all m's.We will use the same functional dependence for each of the parameters.Next, we will construct b(α, m), k(α, m) and n(α, m) by fitting those functions for different values of parameter n.At the end, we will use them to build W (φ, b, k, n) for arbitrary m and α.

Parameter b as function of α
The parameter b corresponds to the maximal height in the Hill fit of the probability to find solution of QRWS algorithm when the traversing coin is constructed by generalized Householder reflection (containing one phase φ) and one additional phase multiplier ζ.In most cases, the maximal probability to find solution is at the point φ = ζ = π.To simplify the model, we will assume that it is true for all cases considered in this work.So, the maximal probability to find solution will not depend on the value of α.In this case: The numerical values of the parameter b(m) of the Hill fit, can be fitted itself for coin sizes between 4 and 11, as is done in our previous work [32]: Fitting of the simulation datapoints for the parameter b is shown on Fig. 4. The points for coin sizes between 4 and 11 are shown as red four-pointed star.The point for coin size 11 is not used for the fit but is shown on the figure to estimate our model.The fit itself is depicted with dot-dashed red line.

Parameter k as function of α
The parameter of the Hill fit of the probability to find solution of QRWS algorithm that corresponds to the width of the plateau is k.The parameter k can be fitted by using a modified asymmetric Gaussian function.First, we fit k for fixed coin size m, as function of α: The four-pointed stars corresponds to numerical simulations of b(m) and the dot dashed line -to the fit of those points by Eq. (18).
As an example, on Fig. 5 can be seen the result of fitting of parameter k of the probability to find solution for all values of alpha in the interval −1.5 ≤ α ≤ 1 depicted with a green solid line.With dashed purple line is depicted the fit of k(α, m) by an asymmetric Gaussian function.The left picture corresponds to coin size 8 and the right -to coin size 10.The fits are made by the following functions: In order to fit well the parameters of the functions we were forced to exclude the results for k for coin size 4 for all fits for q k , d k , µ k , σ L,k and σ R,k .The reason behind this are the high numerical errors of the fits for this coin size.given by Eq. ( 19) for coin sizes between 5 and 10 by asymmetric Gaussian function.

Parameter n as function of α
Similarly to fitting of k, the result for n can also be obtained in the same way -by using the asymmetric Gaussian function.For an arbitrary coin size m and amplitude α of the nonlinear part of Eq. ( 15), the parameter n will be fitted with: In case of coin sizes bellow 8 the numerical simulation can easily be fitted by an asymmetric Gaussian.However, when the coin size is equal or larger than 8, only the central part is well fitted by the asymmetric Gaussian.Near the sides there are plateaus.They are due to the fact that there are two ways to fit the curve with similar results.The first is to fit it with rectangular like curve (similar to Fig. 3 with α = −π/2) and the second type is a triangular like one (similar to Fig. 3 with α = 0.3).In the next two subsections we will explore both cases: (i) When we exclude the plateaus (ii) When we exclude parts of the curves lower than the plateaus In both cases we use an asymmetric Gaussian function for the fit, however the parameter's values are different.In the next section we will compare the results in the both cases.Here, the points in the side plateaus are not used in the fit The parameters used in asymmetric Gaussian function to obtain those fits are: q n (m) = 4.73697 − 2.9278 sin(46.4042+ 0.873013m) d n (m) = 1.1653 − 230.88 Log(m) 13.5063  ( µ n (m) = 109.777− 110.151 sin(7.65524+ 0.0243499m) Those functions fit very good the respective points as can be seen on Fig. 9: Fit of n with excluded lower than plateaus parts The second case is an asymmetric Gaussian fit that excludes everything below the plateaus.In this case the modified Hill function never goes to triangle like shape and always stays Gaussian like.The result that is obtained after the asymmetric Gaussian fit of n(α) for coin sizes 8 and 10 are shown on FFig.given by Eq. ( 25) for coin sizes between 5 and 10 by asymmetric Gaussian function.
-1.5 -1 -0.5 0. The fitting functions for the parameters q n , d n , µ n , σ (L,n) , and σ (R,n) are the same as in the case when the plateaus are excluded.However, the numerical values of the parameters used in In this case fit is worse than in case when we neglect the plateaus:  31), ( 32), ( 33), (34), and (35) correspondingly.

Comparison between the two fit variants
In both cases investigated in sections 5.3.3 and 5.3.2, the most important part of the probability curve W is the one around the central peak, because it corresponds to the maximal value of probability to find solution of QRWS (see on Fig. 7 the best value of alpha found by a supervised machine learning).So, both fits describe well the most important part.However, the variant that cuts the plateaus (W ) describes the points better, because, as it can be seen on Table 2, it has much smaller standard deviation.
Table 2. Comparison of standard deviation of the two fits for the Hill fit's parameter n(α, m).
The primed case is when the plateaus are cut.The double primed is when all parts lower than the plateaus are cut.We can use it to make a prognosis for the probability to find solution of QRWS algorithm with m and α that cannot not be simulated numerically.The main merit of this work is to give an expression that can be used for easy evaluation of the robustness of QRWS for different functional dependences between the walk coin parameters.
On Fig. 12 is shown comparison between the simulated result of P (φ, m, α) and two different variants of the interpolation fits: at the center W (φ, m, α) and on the right W (φ, m, α).On the leftmost figures are the results of numerical simulation of QRWS.The central column corresponds to W (φ, m, α)=W (φ, m, α) (when n(m, α)=n (m, α)) and the right one to W (φ, m, α)=W (φ, m, α) (when n(m, α) = n (m, α)).The brown colour corresponds to the highest probability to find solution and the green colour -to the lowest.Each row corresponds to different coin size.The graphics for dimensions 4, 6, 8, 10 are shown on the first, second, third and fourth row respectively.
The main advantage of this work is that here we derive a single expression that gives a high probability to find solution for the QRWS algorithm.It can simplify the analysis of the quantum algorithm's robustness in a wide range of walk coin parameters.It can also find an application in speeding up the development of new modifications of QRWS that are stable to different sources of noise.It can be used to obtain a prognosis for values of m and α that gives high probability to find solution.
However, the fitting formula ( 16) has some limitations.For small coin sizes our expression overestimates the maximum probability.The correct value is approximately 0.88 of the one given by our expression for coin size 4, for coin size 6 and 8 it is 0.93, and for coin size 10 is 0.99.For coin sizes 4,5,6 and 7 both fits using n and using n coincide.However, for larger coin sizes they are similar but due to the differences of the fit of n, some characteristics like the maximal probability (see for example Fig. 12 for coin size 8) and the finer details are different (see for example Fig. 12 for coin size 8).There are a lot of approximations made in the construction of this fit, and each one erases some of the details, so as it can be seen, all finer details are lost.Both approximation functions best approximate the simulated results around the lines φ = π and α α max , (that is the most important in the context of robustness).Both fits give very close results for the studied coin sizes.
Eq. ( 16) will be useful for fast evaluation of QRWS success rate in order to exclude values of alpha that will give low robustness.However, values m and α that are not excluded should be simulated numerically and the results from simulations should be compared.
The fits described above gives good interpolations for not calculated values between already known values or extrapolations in the regions close to the training values (namely α ∈ [−1, 1.5], φ ∈ [0, 2π] and m = [4,10]).However, the results are much worse when extrapolating far from the training values.The reasons for it is the high errors in the extrapolations of the parameters for asymmetric Gaussian for higher coin size.An example for extrapolations close to the training values is the one for coin size 11.It is compared to direct simulations of the algorithm on Fig. 13.
On the second row are extrapolations for coin size 12.And on the third one -for coin size 14.Here we can see that both fits differ a lot even for coin size 12.So, when the coin size is far from the interpolated area is better to use a simplified fit like described in [32].
Such versatile fit has worse predictive capabilities than more specialized ones that are made for one particular parameter -like φ and α.However, those specialized fits can be used only in the case when one of the parameters is already fixed.If the intermediate results of the general fit of W (φ, m = const, α) for different α, but with already chosen coin size is used, the obtained probability of this approximation will be quite close to the actual QRWS success rate.However, the subsequent fitting of its parameters for different coin sizes introduce much higher error.That makes such general fit better in some cases and worse in others.An example of specialized fits for particular values of α can be seen in [32].Unfortunately, all those fits W (φ, m, α) are not precise enough to be useful to compare two Ws with close probability to find solution but different α.QRWS still should be simulated numerically but our result can help to reduce the needed number of simulations by excluding the low probability regions.

Conclusion
In this work we obtain practically useful expression for the probability to find solution of Quantum random walk search algorithm with walk coin constructed by generalized Householder reflection and phase multiplier.Here we assume that there is functional dependence between the walk coin phases that contain a nonlinear term.Object of our interest is the robustness (stability against inaccuracy in the coin parameters) of the algorithm to change in one of the phases, the nonlinear parameter connecting the phases and coin size of the algorithm.As regression functions we use variety of different functions including a modified Hill and an asymmetric Gaussian.The interpolation is made for coin sizes between 4 and 10.The simulated data for coin size 11 is used as validation set.Our results show that this method gives relatively good results when we interpolate for unknown value of the parameter in the front of the nonlinear term.However, the extrapolation for coin sizes larger than the simulated ones gives adequate results only for coin size 11.We think that if we were able to simulate the algorithm for larger coin sizes that will give us more proper fitting functions and more precise value of their parameters.
The fitting expression for the success rate of QRWS algorithm derived in this work is a function of only two parameters and could be a useful tool in the study and in the experimental development of robust quantum random walk search algorithm on hypercube.

Figure 1 .
Figure 1.Quantum circuit of Quantum Random Walk Search algorithm.Algorithm begins by applying a discrete Fourier transformation on node and edge registers F n and F m correspondingly.On all register a QRWS iteration W is applied, that consists of Oracle O, walk coin C 0 , traversing coin C 1 and shift operator S. At the end of the algorithm the node register is measured.

Figure 2 .
Figure 2. Examples of the probability to find solution as a function of φ and α, when the walk coin is constructed by using Householder reflection and a phase multiplier.The top left, top right, bottom left and bottom right pictures correspond to coin sizes 4,6,8 and 10 accordingly.The teal dashed and blue dot dashed lines corresponds to α = 1/(2π) and α = 0.

Figure 3 .
Figure 3.Comparison between numerical result of the probability to find solution obtained by numerical simulations of QRWS (depicted with red dots) and its fit by Hill function (depicted with the blue line).On the left column are the simulation results for coin size 8 and on the right -for coin size 10.The first row corresponds to α = −0.3, the second row to α = −1/(2π) and the third one -to α = 0.3

Figure 4 .
Figure 4. Fit of the numerical values of parameter b(m) for coin sizes between 4 and 16.The four-pointed stars corresponds to numerical simulations of b(m) and the dot dashed line -to the fit of those points by Eq. (18).

Figure 5 .
Figure 5. Fit of the parameter k of the Hill fit of QRWS algorithm for different value of nonlinear part of the relation ζ(φ).The points of k are depicted with green lines and their fit by an asymmetric Gaussian like curve is depicted with purple dashed line.The top left picture corresponds to coin size 4 and right -to coin size 6.The bottom left picture corresponds to coin size 8 and the right one -to coin size 10.

Figure 6 .
Figure 6.Fits of the parameters of k(m, α) given by Eq.(19) for coin sizes between 5 and 10 by asymmetric Gaussian function.The fitted values of the parameters q k , d k , µ k , σ L,k and σ R,k are shown with two-point, three-point, four-point, six-point and sevenpoint star correspondingly.The dotted line corresponds to fits of those points by Eq. (20), Eq. (21), Eq. (22), Eq. (23) and, Eq. (24) correspondingly

Fig. 7
Fig. 7 top shows numerical simulations for n as function of α ∈ [−1.5, 1] depicted as solid blue line.The left pictures present results for coin size 4 (on top) and 8 (on bottom) and right for coin size 6 (on top) and 10 (on bottom).In case of coin sizes bellow 8 the numerical simulation can easily be fitted by an asymmetric Gaussian.However, when the coin size is equal or larger than 8, only the central part is well fitted by the asymmetric Gaussian.Near the sides there are plateaus.They are due to the fact that there are two ways to fit the curve with similar results.The first is to fit it with rectangular like curve (similar to Fig.3with α = −π/2) and the second type is a triangular like one (similar to Fig.3with α = 0.3).

Figure 7 .
Figure 7. Dependence of the Hill function's parameter n(m, α) from α for coin sizes 4, 6, 8, and 10.The top left and right pictures correspond to coin size 4 and 6.The bottom left picture shows numerical results for coin size 8 and bottom right figure -to coin size 10.The teal dashed vertical line corresponds to the value of α for the functional relation between phases with maximal probability of QRWS to find solution (given by supervised machine learning)

5. 3 . 1 . 12 (Figure 8 .
Figure 8. Fit of the dependence of the parameter n(α) (used in the Hill function) on α for coin sizes 4,6,8 and 10 on the top left, top right, bottom left and bottom right correspondingly.Here, the points in the side plateaus are not used in the fit

Figure 10 .
Figure 10.Fit of the dependence of the parameter n(α) (used in the Hill function) on α for coin sizes.Here the sections with high bellow the two plateaus are not used in the fit.

Figure 13 .
Figure 13.On the first row is a comparison between the simulation in case of coin size 11 of P (φ, m, α) (left) and both its extrapolations W (φ, m, α) (center) and W (φ, m, α) (right).Each row below corresponds to extrapolations for different coin size: on second, third and fourth row are shown extrapolations for coin sizes 12, 14, and 16.
6gives summary of this work.
By substituting the relations for b(m, α), k(m, α) and n(m, α) into W (φ, b, k, n) we can obtain one expression that have only two parameters: the coin size m and the multiplier in front of the nonlinear part α.