{'fraction_non_alphanumeric': 0.03390124670966996, 'fraction_numerical': 0.007405050475832345, 'mean_word_length': 4.3525313516024156, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Scattering quantum random-walk search with errors

We analyze the realization of a quantum-walk search algorithm in a passive, linear optical network. The specific model enables us to consider the effect of realistic sources of noise and losses on the search efficiency. Photon loss uniform in all directions is shown to lead to the rescaling of search time. Deviation from directional uniformity leads to the enhancement of the search efficiency compared to uniform loss with the same average. In certain cases even increasing loss in some of the directions can improve search efficiency. We show that while we approach the classical limit of the general search algorithm by introducing random phase fluctuations, its utility for searching is lost. Using numerical methods, we found that for static phase errors the averaged search efficiency displays a damped oscillatory behaviour that asymptotically tends to a non-zero value.


I. INTRODUCTION
The generalization of random walks for quantum systems [1] proved to be a fruitful concept [2] attracting much recent interest. Algorithmic application for quantum information processing is an especially promising area of utilization of quantum random walks (QRW) [3].
In his pioneering paper [4] Grover presented a quantum algorithm that can be used to search an unsorted database quadratically faster than the existing classical algorithms. Shenvi, Kempe and Whaley (SKW) [5] proposed a search algorithm based on quantum random walk on a hypercube, which has similar scaling properties as the Grover search. In the SKW algorithm the oracle is used to modify the quantum coin at the marked vertex. In contrast to the Grover search, this algorithm generally has to be repeated several times to produce a result, but this merely adds a fixed overhead independent of the size of the search space.
There are various suggestions and some experiments how to realize quantum walks in a laboratory. The schemes proposed specifically for the implementation of QRWs include ion traps [6], nuclear magnetic resonance [7] (also experimentally verified [8]), cavity quantum electrodynamics [9,10], optical lattices [11], optical traps [12], optical cavity [13], and classical optics [14]. Moreover, the application of standard general logic networks to the task is always at hand [15,16].
The idea of the scattering quantum random walk (SQRW) [17] was proposed as an answer to the question that can be posed as: how to realize a coined walk by a quantum optical network built from passive, linear optical elements such as beam splitters and phase shifters? It turned out that such a realization is possible and, in fact, it leads to a natural generalization of the coined walk, the scattering quantum random walk [18]. The SQRW on the hypercube allows for a quantum optical implementation of the SKW search algorithm [5]. Having a proposal for a physical realization at hand we are in the position to analyze in some detail the effects hindering its successful operation.
Noise and decoherence strongly influence quantum walks. For a recent review on this topic see [19]. The first investigations in this direction indicated that a small amount of decoherence can actually enhance the mixing property [20]. For a continuous QRW on a hypercube there is a threshold for decoherence, beyond which the walk behaves classically [21]. Košik et al analyzed SQRW with randomized phase noise on a d dimensional lattice [22]. The quantum walk on the line has been studied by several authors in the linear optical context, with the emphasis on the effect of various initial states, as well as on the impact of decoherence [23,24]. The quantum random walk search with imperfect gates was discussed in some detail by Li et al [25], who have considered the case when the Grover operator applied in the search is systematically modified. Such an imperfection decreases the search probability and also shifts its first maximum in time.
In this paper we analyze the impact of noise on the SKW algorithm typical for the experimental situations of the SQRW. In particular, first we focus on photon losses and show that, somewhat contradicting the naïve expectation, non-trivial effects such as the enhancement of the search efficiency can be observed. As a second type of errors we study randomly distributed phase errors in two complementary regimes. The first regime is characterized by rapid fluctuation of the optical path lengths, that leads to the randomization of phases for each run of the algorithm. We show that the classical limit of the SKW algorithm, reached by increasing the variance of the phase fluctuations, does not correspond to a search algorithm. In the other regime, the stability of the optical path lengths is maintained over the duration of one run, thus the errors are caused by static random phases. This latter case has not yet been considered in the context of QRWs. We found that static phase errors bring a significantly different behaviour compared to the case of phase fluctuations. Under static phase errors the algorithm retains its utility, with the average success probability displaying a damped oscillatory behaviour that asymptotically tends to a non-zero constant value.
The paper is organized as follows. In the next section we introduce the scattering quantum walk search algorithm. In section III. we derive analytic results for the success probability of search for the case when a single coefficient describes photon losses independent of the direction. In section IV. we turn to direction dependent losses, and present estimations of the success probability based on analytical calculations and numerical evidence. In section V. phase noise is considered and consequences for the success probability are worked out. Finally, we conclude in Sec. VI.

II. THE SCATTERING QUANTUM WALK SEARCH ALGORITHM
The quantum walk search algorithm is based on the generalized notion of coined quantum random walk (CQRW), allowing the coin operator to be non-uniform accross the vertices. In the early literature the coin is considered as position (vertex) independent. The CQRW is defined on the product Hilbert space H = H C ⊗ H G , where H C refers to the quantum coin, and H G represents the graph on which the walker moves. The discrete time-evolution of the system is governed by the unitary operator where C is the coin operator which corresponds to flipping the quantum coin, and S is the step or translation operator that moves the walker one step along some outgoing edge, depending on the coin state. Adopting a binary string representation of the vertices V of the underlying graph G = (V, E), the step operator S (a permutation operator of the entire Hilbert space H) can be expressed as In (2) x denotes the vertex index. Here, and in the rest of this paper we identify the vertices with their indices and understand V as the set of vertex indices. The most remarkable fact about S is that it contains all information about the topology of the graph. In particular, the actual binary string values of e dx are determined by the set of edges E. This is accomplished by the introduction of direction indices d, which run from 0 to n−1 in case of the n regular graphs which are used in the search algorithm.
To implement the scattering quantum random walk on an n regular graph of N nodes, identical n-multiports [26,27] are arranged in columns each containing N multiports. The columns are enumerated from left to right, and each row is assigned a number sequentially. The initial state enters on the input ports of multiports in the leftmost column. The output and input ports of multiports of neighbouring columns j and j+ are then indexed suitably and connected according to the graph G.
For the formal description of quantum walks on arrays of multiports, we propose to label every mode by the row index and input port index of its destination multiport. We note that an equally good labelling can be defined using the row index and output port index of the source multiport. To describe single excitation states, we use the notation |d, x where the input port index of the destination multiport is d = 0, 1, . . . , n − 1, and the row index is x = 0, 1, . . . , N − 1. Thus the total Hilbert space can effectively be separated into some product space H C ⊗H G . To be precise, the additional label j would be necessary to identify in which column the multiport is, however, we think of the column index as a discrete time index, and drop it as an explicit label of modes. Thus a timeevolution U = SC can be generated by the propagation through columns of multiports.
A quantum walk can be realized in terms of the basis defined using the destination indices, and we shall term it "standard basis" through this section. First, we recall that an n-multiport can be fully characterized by an SU(n) transformation matrix C. The effect of such multiport on single excitation states |ψ ∈ H C is given by the formula, where |d denotes the single photon state with the photon being in the d mode, i.e. |d = |0 0 . . . |1 d . . . |0 n−1 . We note, that a multiport with any particular transformation matrix C can be realized in a laboratory [28]. To simplify calculations it may be beneficial to choose an indexing of input and output ports such that the connections required to realize the graph G can be made in such way that each input port has the same index as the corresponding source output port. Therefore the label d can stay unique during "propagation." We emphasize that this is not a necessary assumption for a proper definition of SQRW, but an important property that makes also easier to see that SQRWs are a superset of generalized CQRWs. This indexing of input and output ports for walks on a hypercube is depicted on Fig. 1a, with some of the actual connections illustrated for a (three dimensional) cube on Fig. 1b.
Considering an array of identical multiports, an arbitrary input state undergoes the transformation by the same matrix C for every x. Let the output port d of multiport x be connected to multiport x ⊕ e dx in the next row. Thus the mode labelled by the source indices d and x, is labelled by d and x ⊕ e dx in terms of the destination indices. Therefore, effect of propagation in terms of our standard basis is written, Comparing this formula with Eqs. (2) and (3) we see that this formula corresponds to a U = SC = S(C 0 ⊗1 1) transformation where C 0 is generated by the matrix C. Due to the local nature of the realization of the coin operation, it is straight-forward to realize position dependent coin operations, such as the one required for the quantum walk search algorithm.
In particular, the SKW algorithm [5] is based on the application of two distinct coin operators, e.g.
where G is the Grover inversion or diffusion operator G := −1 1+2|s C s C |, with |s C = 1/ √ n n d=1 |d [29]. In the algorithm, the application of the two coin operators is conditioned on the result of oracle operator O. The oracle marks one x t as target, hence the coin operator becomes conditioned on the node: When n is large, the operator U ′ := SC ′ can be regarded as a perturbed variation of U = S(C 0 ⊗ 1 1). The conditional transformation (6) is straight-forward to implement in the multiport network. For the two coins (5) one has to use a simple phase shifter at position x t in every column of the array, and a multiport realizing the Grover matrix G at every other position. The connection topology required to implement a walk on the hypercube is such that in the binary representation we have e d = 0 . . . 1 . . . 0 with 1 being at the d'th position, i.e. e d = 2 d . See Fig. 1b for a schematic example, when x t = 001. The above described scheme to realize quantum walks in an array of multiports using as many columns as the number of iterations of U can be reduced to only a single column. To do this, one simply needs to connect the The beam-splitters incorporate the combined effect of imperfections of the multiport devices, and effects influencing the state during propagation between the multiports (e.g. scattering and absorption).
output ports back to the appropriate input ports of the destination multiport in the same column. This feedback setup is similar to the one introduced in Ref. [18].

III. UNIFORM DECAY
We begin our analysis of the effect of errors on the quantum walk search algorithm by concentrating on photon losses. In an optical network, photon losses are usually present due to imperfect optical elements. An efficient model for linear loss is to introduce fictitious beamsplitters with transmittances corresponding to the effective transmission rate (see Fig. 2).
The simplest case is when all arms of the multiports are characterized by the same linear loss rate η. The operator describing the effect of decay on a single excitation density operator can then be expressed as The total evolution of the system after one iteration may be written as ̺ → D(U ̺U † ). It is important to note that with the introduction of this error, the original Hilbert space H G of one-photon excitations must be extended by the addition of the vacuum state |0 . The action of the SQRW evolution operator U on the extended Hilbert space follows from the property U |0 = |0 . Due to the nature of Eq. (7) and the extension of U , one can see that the order of applying the unitary time step and the error operator D can be interchanged. Therefore, over t steps the state of the system undergoes the transformation To simplify calculations, we introduce a linear (but non-unitary) operator to denote the effect of the noise operator D on the search Hilbert space: This operator is simply a multiplication with a number. It is obviously linear, however, for η < 1 not unitary. The operator D does not describe any coherence damping within the one-photon subspace, since it only uniformly decreases the amplitude of the computational states and introduces the vacuum. Since all final statistics are gathered from the search Hilbert space H G , it is possible to drop the vacuum from all calculations, and incorporate all information related to it into the norm of the remaining state. In other words, we can think of DU as the time step operator, and relax the requirement of normalization. Using this notation, the effect of t steps is very straight-forward to express: This formula indicates that inclusion of the effect of uniform loss may be postponed until just before the final measurement. The losses, therefore, may simply be included in the detector efficiency (using an exponential function of the number of iterations). Applying the above model of decay to the quantum walk search algorithm we define the new step operator U ′′ = DU ′ , and write the final state of the system after t steps as Adopting the notation of Ref. [5], the probability of measuring the target state |x = 0 at the output after t steps can be expressed as We know from Ref. [5] that | R, 0| ψ 1 | 2 = 1/2 − O(1/n). Since an overall exponential drop of the success probability is expected due to the η 2t factor, we search for the maximum t f be before the ideal time-point |ω ′ 0 |t = π/2. This guarantees that sin 2 (ω ′ 0 t f ) is finite, therefore due to the 2 −n factor for large n the second term can be omitted, and it is sufficient to maximize the function with respect to t. After substituting the result |ω or the closest integer, as the time yielding the maximum probability of success.
To simplify the upcoming formulae, we introduce the variables The variable ε can be regarded as a logarithmic transmission parameter (the ideal case corresponds to ε = ∞, and complete loss to ε = 0). When ε is sufficiently large, the expression − ln η can be approximated to first order in 2 −ε and we obtain Upon substituting t m into (13) we can use the new variable x to express the sine term as Thus for the maximum success probability p max n (η) = p n (η, t m ) we obtain This formula is our main result for the case of uniform photon losses. In the large n limit it gives the approximate performance of the SKW search algorithm as a function of the transmission rate and the size of the search space. Since x acot x is bounded in x, the accuracy of the term in brackets is bounded by O(1/n). The most notable consequence of the second O(1/n) contribution is that while in the ideal case the probability 1/2 is an upper bound, in the lossy case deviations from the leading term, can be expected in either direction. The functional form of Eq. (20), plotted on Fig. 3, allows for a universal interpretation of the dependence of success probability on the transmission rate and the size of the search space through the combined variable x. For small losses we can use the approximation (17) and conclude that the search efficiency depends only on the difference n/2 − ε. The approximation is compared with the results of numerical calculations on Fig. 4. We can observe the O(1/n) accuracy of the theoretical curves as expected, hence producing poorer fits at smaller ranks. The positive deviations from the theoretical curves observable at low transmission rates are due to the second O(1/n) term of Eq. (19).

IV. DIRECTION DEPENDENT LOSS
In the present section we no longer assume equal loss rates, and consider the schematically depicted loss model on Fig. 2 with arbitrary η d parameters. Because of the high symmetry of the hypercube graph, and the use of mainly identical multiports, we can neglect the position dependence of the transmission coefficients. The operator D describing the decoherence mechanism thus acts on a general term of the density operator as To describe the overall effect of this operator on a pure state, we re-introduce the linear decoherence operator in a more general form, and use the notation {η} to denote the set of coefficients η d . Due to the symmetry of the system, the sequential order of coefficients is irrelevant. With the re-defined operator the effect of decoherence reads where ̺ = |ψ ψ| is the initial state, and the nonvacuum part of the output state is ̺ ′ = |ψ ′ ψ ′ |, with |ψ ′ = D |ψ . Therefore, we can again reduce our problem to calculating the evolution of unnormalized pure states, just as in the uniform case, and use the nonunitary step operator U ′′ = DU ′ with the more general noise operator. Telling how well the algorithm performs under these conditions is a complex task. First we give a lower bound on the probability of measuring the target node, based on generic assumptions. To begin, we separate the noise operator into two parts where, for the moment, we leave 0 ≤ η ≤ 1 undefined. As a consequence of Eq. (22) the diagonal elements of D ′ are [D ′ ] dd = δ d = η d − η, and the off-diagonal elements are zero. From Eq. (23) it follows that starting from a pure state |ψ 0 , after t non-ideal steps the state of the system can be characterized by the unnormalized vector |ψ ′ (t) , which is related to the state obtained from the same initial state by t ideal steps as |ψ ′ (t) = η t |ψ(t) + |r .
The expression of the residual vector |r reads To obtain the probability of measuring the target state |x = 0 we have to evaluate the formula Due to the symmetry of the graph and the coins, we use e.g. Eq. (13) and obtain d, 0| ψ(t) ≈ − sin(ω ′ 0 t)/ √ 2n. To obtain a lower bound on p n ({η}, t) we note that the sum is minimal if d, 0| r = const = K for every d (we consider a worst case scenario when all d, 0| r are negative). Now we assume that the second term is a correction with an absolute value smaller than that of the first term. For the upper bound on K, we use the inequality The norm of |r can be bound using the eigenvalues of U , D, and D ′ . Let η max = max {η d |d = 0, . . . , n − 1} and δ max = max {|δ d | |d = 0, . . . , n − 1}. Then we have (29) Since U is unitary, its contribution to the above formula is trivial. Our upper bound on |K| hence becomes |K| ≤ 1/ √ n(η max δ max /η)(η t max −η t )/(η max −η). Combining the results, we obtain a lower bound on the probability for measuring the target node, where p (i) n (t) stands for the corresponding probability of the ideal (lossless) case. We maximize the lower bound with respect to the arbitrary parameter η. The procedure can be carried out noting that δ max = max{η max − η, η − η min }, thereby we find the maximum at η =η ≡ (η max + η min )/2, yielding the formula (31) To interpret the formula (31), we consider the two terms in the curly braces separately. The first term returns the success probability for uniform losses with transmission coefficientη. The second term may be considered as a correction term that depends not only on some average value of the loss distribution, but also on its degree of non-uniformity in a way that is reminiscent of a mean square deviation. We observe that Eq. (30) provides a useful lower bound only for {η} distributions violating uniformity to only a small degree. When the expression inside the curly braces becomes negative, the assumption made on the magnitude of the second term of Eq. (27) becomes invalid, and therefore the formula does not give a correct lower bound.
The estimated lower bound (30) decreases with increasing degree of non-uniformity, in accordance with a naive expectation. However, as we shall show later, numerical simulations taking into account the full complexity of the problem provide evidence to the contrary: departure from uniformity can result in improved efficiency.
Inspired by the appearance of the average loss rate in the lower bound (31), we introduce the mean and the variance of the direction dependent losses, The coefficients have been obtained by second order fitting to numerically generated values for a hypercube sized n = 8. The confidence of each fit is represented on the graph by an error bar. It is clearly visible that the coefficients are always greater than 2 −n . Another feature, that is more suggestive on a linear scale, is that the points between two steps seem to align into straight lines, with their slopes increasing with η .
from the uniform loss case can be well estimated at small degrees of non uniformity. Using the permutation symmetry of p max n we can express the Taylor series as where W 3 = 1/n k δ 3 k . We notice that Q may be regarded as the mean deviation of {η} as a distribution, and hence it is a well-defined statistical property of the random noise. In other words, as long as a second order Taylor expansion gives an acceptable approximation, the probability of success depends only on the statistical average and variance ( η , Q) of the noise and not on the specific values of {η}. Using numerical simulations, we have determined the values of B up to rank n = 10, and studied the impact of higher order terms.
The second order Taylor coefficients were determined by fitting over the numerically obtained success probabilities at data points where the higher order moments of the loss distributions were small. An example plot of B is provided on Fig. 5, for a system n = 8. The higher order effects were suppressed by selecting the lowest values of W from several repeatedly generated random distributions {η}. A general feature exhibited by all studied cases is that the second order coefficients satisfy the inequality It is remarkable that this tight lower bound depends only on the size of the system. The dependence of B on η is monotonous with discontinuities. We found the number of discontinuities to be proportional to the rank n. Our numerical studies have shown that the value of B before the first discontinuity is always a constant, and equal to the empirical lower bound (34). To plot the success probabilities corresponding to arbitrary random coefficients we used the pair of variables η and Q. On these plots, the higher order terms cause a "spread" of the appearing curves. A sample plot is displayed on Fig. 6 where the relative improvement is compared to the uniform case, in percentages. We observe a general increase of efficiency as compared to the uniform case with the same average loss rate. A general tendency is that for smaller values of η the improvement is larger, interrupted, however, by discontinuities. These discontinuities closely follow those of the second order coefficient B.
The numerical studies, involving the generation of 1000 sets of uniformly randomly generated transmission coefficients for each of the systems of up to sizes n = 10, indicate that with the help of Eq. (34) the first two terms of the expansion Eq. (33) can be used to obtain a general lower bound: The inequality implies that the overall contribution from higher order terms is positive, or always balanced by the increase of B. The appeal of this lower bound is that it depends only on the size of the system N = 2 n , and the elementary statistical properties of the noise ( η , Q). Therefore, together with the formula (20) for uniform loss, a straight-forward estimation of success probability is possible before carrying out an experiment.
Up to now, we concentrated on comparing the performance of the search algorithm suffering non-uniform losses with those suffering uniform loss with coefficient equal to the average of the non-uniform distribution. Another physically interesting question is how attenuation alone affects search efficiency. We can formulate this question using the notations above as follows. Consider a randomly generated distribution {η} and compare the corresponding success probability with the one generated by a uniform distribution with transmission coefficient η max = max{η}. We chose Q as a measure of how much an η max uniform distribution needs to be altered to obtain {η}, and made the comparisons using the same set of samples. A typical plot is presented on Fig. 7. It appears that as we start deviating from the original uniform distribution, an initial drop of efficiency is followed by a region where improvement shows some systematic increase. However, it is still an open question, whether it is really a general feature that for some values of Q the efficiency is always increased. On the other hand these plots provide clear evidence that for a significant number of cases the difference p max n ({η}) − p max n (η max ) is positive. In other words, rather counter-intuitively, we can observe examples where increased losses result in the improvement of search efficiency. Since the time evolution with losses is non-unitary, the improvement cannot be trivially attributed to the fact that the Grover operator is not the optimal choice for the marked coin.

V. PHASE ERRORS
In the present section we discuss another type of errors typically arising in optical multiport networks. These errors are due to stochastic changes of the optical path lengths relative to what is designated, and manifest as undesired random phase shifts. Depending on how rapidly the phases change, we may work in two complementary regimes. In the "phase fluctuation" regime the phases at each iteration are different. These errors can typically be caused by thermal noise. In the "static phase errors" regime, the undesired phases have slow drift such that on the time scale of an entire run of the quantum algorithm their change is insignificant. The origin of such errors can be optical element imperfections, optical misalignments, or a slow stochastic drift in one of the experimental parameters. Phase errors in the fluctuation regime have been studied in Ref. [22] for walks on N dimensional lattices employing the generalized Grover or Fourier coin. The impact of a different type of static error on the SKW algorithm has been analyzed in Ref. [25].
To begin the formal treatment, let F denote the operator introducing the phase shifts, and write it as This operator is unitary, hence the step operator dx are considered to be the same random variables for every pair of d and x.
The formalism of Ref. [22] can be applied to the walk on the hypercube, and extended to the case of nonuniform coins and position dependent phases. Namely, using the shorthand notations D = {0, 1, 2, . . . , n − 1} and the state after t iterations can be expressed as and ϕ(a, x 0 ) = t j=1 ϕ (t+1−j) aj ,x0⊕E(t,j−1) . For the standard SKW algorithm, the coin matrices are C (0) aa ′ = 2/n − δ aa ′ and C (1) aa ′ = −δ aa ′ , however, the SKW algorithm is reported to work with more general choices of operators C 0/1 [5].
For the following study, we express the probability of finding the walker at position x after t iterations as the sum p n (x, {ϕ}, t) = p I n (x, {ϕ}, t) + p C n (x, {ϕ}, t), such that the incoherent and coherent contributions are wherex t = x t ⊕ x. The appearing phase factors are andΞx t (a) =Ξx t (a, E(t, 1)), i.e.
(44) Note, that when the probability of finding the walker at the target node x t is to be calculated we must set x = x t , therefore, we havex t = 0.
In the following we shall show that the incoherent contribution is constant, for any two unitary coins C 0/1 . Consequently, p I n is constant also for balanced coins such as those in Eq.
Since E(t − 1, 1) depends on a j only when j ≤ t − 1, and due to the unitarity of the coins a t−1 |C † 0 C 0 |a t−1 = a t−1 |C † 1 C 1 |a t−1 = 1, the summation over a t can be evaluated and we obtain 1. Hence, we see that p I n (x, {ϕ}, t) = p I n (x, {ϕ}, t− 1), and this implies Eq. (45) by induction.
The average probabilityp n (x, t) of finding the walker at node x is obtained by averaging the random phases according to their appropriate probability distribution. Using Eq. (45) this probability can be expressed as where . . . denotes taking the average for each random variable ϕ (t) dx in case of phase fluctuations, and for each ϕ dx in case of static phase errors. It is reasonable to assume that each random variable has the same probability distribution. To analyze the impact of phase errors on the search efficiency, we study the behaviour of the coherent term p C n (x, {ϕ}, t) for different random distributions. In case of phase fluctuations characterized by a uniform distribution, the coherent term immediately vanishes and we obtainp n (x, t) = 1/2 n . This case can be considered as the classical limit of the quantum walk. Therefore, we conclude that the classical limit of the SKW algorithm is not a search algorithm, independently of the two unitary coins used.
Assuming a Gaussian distribution of random phases is motivated by the relation of each phase variable ϕ to the optical path length. The changes in the optical path lengths which introduce phase shifts are not restricted to a 2π interval. In what follows, we assume that the random phases have a zero centered Gaussian distribution with a variance ∆ϕ.
We arrive at the classical limit even when the phase fluctuations have a finite width Gaussian distribution, simply by repeatedly applying the time evolution operator U {ϕ}. For such Gaussian distribution, the coherent term exhibits exponential decrease with time, a behaviour also confirmed by our numerical calculations.
In the static phase error regime the mechanism of cancellation of phases is different than in the fluctuation regime, and more difficult to study analytically. For uniform random distribution we expect a sub-exponential decay of the coherent term to zero. For a zero centered Gaussian distribution with variance ∆ϕ we performed numerical simulations using the standard two coins of Eq. (5). The numerical results for the success probabilitȳ p n (x t , t) for several values of ∆ϕ are plotted on Fig. 8. The data points were obtained by calculating success probabilities for 1000 randomly generated phase configurations and taking their averages at each time step t.
By studying the repetition of the random phase configuration we come to several remarkable conclusions. First, the time evolution of the success probability tends (on a long time scale, t ≫ t f ) to a finite, non-zero constant value. Consequently, being subject to static phase errors, the SKW algorithm retains its utility as search algorithm. Second, the early steps of the time evolution are characterized by damped oscillations reminding of a collapse. Third, the smaller the phase noise the larger is the long time stationary value to which the system evolves. We have plotted the stationary values obtained by numerical calculations, against the rank of the hypercube on Fig. 10.
Better insight into the above features can be gained by examining the shape of the individual runs of the algorithm with the given random phase configurations. As it can be seen on Fig. 9, the success probabilities for different runs display the typical oscillations around a nonzero value. They differ slightly in their frequencies depending on the random phases chosen, hence when these oscillations are summed up we get the typical collapse behaviour. Also, since these frequencies continuously fill up a band specified by the width of the Gaussian, we expect no revivals to happen later. For higher order hypercubes the success probability drops almost to zero for already very moderate phase errors, resembling a behaviour seen on Fig. 3.

VI. CONCLUSIONS
We studied the SQRW implementation of the SKW search algorithm and analyzed the influence on its performance the two most common type of disturbances, namely photon losses and phase errors. Our main result for the photon loss affected SQRW search algorithm is that the introduction of non-uniform distribution of the loss can significantly improve the search efficiency compared to uniform loss with the same average. In many cases, even the sole increase of losses in certain directions may improve the search efficiency. Mostly based on numerical evidence we have set a lower bound for the search probability as a function of the average and variance of the randomly distributed direction dependent loss.
We concentrated our analysis on two complementary regimes of phase errors. When the system is subject to rapid phase fluctuations, the classical limit of the quantum walk is approached. We have shown that in this limit the SKW algorithm loses its applicability to the search problem for any pair of unitary coins. On the other hand, we showed that when the phases are kept constant during each run of the search, the success rate does not drop to zero, but approaches a finite value. The effect in its mechanism is reminiscent to exponential localization found in optical networks [30]. Therefore, in the long-time limit, static phase errors are less destructive than rapidly fluctuating phase errors.