the dynamics of opinion formation have been studied with growing attention ; in particular in the field of physics , in which a new research field termed _ sociophysics _ ( going back to the pioneering work of galam _ ) emerged .more recently , different kinetic models to describe opinion formation have been proposed .such models successfully use methods from statistical mechanics to describe the behaviour of a large number of interacting individuals in a society .this leads to generalisations of the classical boltzmann equation for gas dynamics .then the framework from classical kinetic theory for homogeneous gases is adapted to the sociological setting by replacing molecules and their velocities by individuals and their opinion . instead of binary collisions ,one considers the process of compromise between two individuals .the basic models typically assume a homogeneous society . to model additional sociologic effects in real societies , e.g.  the influence of strong opinion leaders , one needs to consider _ inhomogeneous _ models .one solution , which arises naturally in certain situations ( see , e.g.  ) , is to consider the time - evolution of distribution functions of different , interacting species .to some extent this can be seen as the analogue to the physical problem of a mixture of gases , where the molecules of the different gases exchange momentum during collisions .this leads to systems of boltzmann - like equations for the opinion distribution functions  of interacting species which are of the form the boltzmann - like collision operators describe the change in time of due to binary interaction depending on a balance between the gain and loss of individuals with opinion .the suitably chosen relaxation times allow to control the interaction frequencies .to model exchange of individuals ( mass ) between different species , additional collision operators can be present on the right hand side of , which are reminiscent of chemical reactions in the physical situation .  another alternative is to study models where the distribution function depends on an additional variable as e.g. in .this leads to _ inhomogeneous boltzmann - type equations _ for the distribution function which are of the following form clearly , the choice of the field which describes the opinion flux plays a crucial role .it may not be easy to determine a suitable field from the economic or sociologic problem , in contrast to the physical situation where the law of motion yields the right choice .  in this paper , we give two examples of opinion formation problems , which can be modelled using _inhomogeneous boltzmann - type equations_. one is concerned with opinion formation where the compromise process depends on the interacting individuals leadership abilities .the other considers the so - called ` big sort phenomena ' , the clustering of individuals with similar political opinion observed in the usa . both problems lead to an inhomogeneous boltzmann - type equation of the form .our work is based on a homogeneous kinetic model for opinion formation introduced by toscani in .the idea of this kinetic model is to describe the evolution of the distribution of opinion by means of _ microscopic _ interactions among individuals in a society .opinion is represented as a continuous variable with  ] .the endpoints of the interval , i.e.  , represent a strongly or weakly assertive individual .a leader would correspond to a strongly assertive individual .the interaction for two individuals with opinion and assertiveness and reads as : the first term on the right hand sides of models the compromise process , the second the self - thinking process . the functions and model the local relevance of compromise and self - thinking for a given opinion , respectively . the constant _ compromise parameter _ controls the ` speed ' of attraction of two different opinions .the quantities  are random variables with distribution with variance and zero mean , assuming values on a set   let us discuss the interaction described in and its ingredients in more detail . in each such interaction ,the pre - interaction opinion increases ( gets closer to ) when and decreases in the opposite situation ; the change of the pre - interaction opinion happens in a similar way .we assume that the compromise process function can be written in the following form : in we will only allow interactions that guarantee . to this end , we assume let us now discuss useful assumptions on the functions , and .as in we assume that the ability to find a compromise is linked to the distance between opinions .the higher this distance is , the lower the possibility to find a compromise .hence , the _ localisation function _ is assumed to be a decreasing function of its argument .usual choices are for some constant and smoothed variants thereof .on the other hand , we assume the higher the assertiveness level , the lower the tendency of an individual to change their opinion .hence , should be decreasing in its argument , too . a possible choice for may be for some constant .this choice is motivated by the following considerations : let and denote two individuals with assertiveness and opinion and , respectively .then the particular choice of corresponds to the two cases :  * if and , i.e. a highly assertive individual meets a weakly assertive individual : then ( no influence of individual on ) , but ,i.e. the leader persuades a weakly assertive individual . *if both individuals have a similar assertiveness level and hence  is small , there will be some exchange of opinion , no matter how large ( or small ) this assertiveness level is .( -1,0 ) ( 1.2,0 ) node[below ] ; ( -1,0 ) ( -1,1.2 ) node[right ] ; /in -1/-1,0/0,1/1 ( 0pt,2pt ) ( 0pt,-2pt ) node[below ] ; /in 0/0,1/1 ( 2pt,0pt ) ( -2pt,0pt ) node[left ] ; plot[id = r ] function0.5 - 0.5*tanh(5*x ) ; at ( 1.2,0.2 ) ; plot[id = h ] function(x<0 ) ? 1 : 0 ; at ( 0.8,0.9 ) ;  note that in the limit the choice corresponds to an approximation of with denoting the heaviside function , see figure [ fig : choicer ] . in this limit , individuals are either maximally assertive in the interaction with a value of the assertiveness variable in , or minimally assertive with assertiveness in .effectively , one would recover in the same limit a variant of the opinion leader - follower model in if the assertiveness of individuals were assumed to be constant in time .we conclude by discussing the choice of we assume that the ability to change individual opinions by self - thinking decreases as one gets closer to the extremal opinions .this reflects the fact that extremal opinions are more difficult to change .therefore , we assume that the self - thinking function is a decreasing function of with we also need to choose the set i.e. we have to specify the range of values the random variables , in can assume .clearly , it depends on the particular choice for let us consider the upper bound at first . to ensure that individuals opinions do not leave , we need obviously , the worst case is , where we have to ensure hence , if it suffices to have .a similar computation for the lower boundary shows that if it suffices to have .  in this setting , we are led to study the evolution of the distribution function as a function depending on the assertiveness , opinion and time , . in analogy with the classical kinetic theory of rarefied gases, we emphasise the role of the different independent variables by identifying the velocity with opinion , and the position with assertiveness . in this way , we assume at once that the variation of the distribution with respect to the opinion variable depends on ` collisions ' between agents , while the time change of distributions with respect to the assertiveness depends on the transport term . unlike in physical applications where the transport term involves the velocity field of particles , here the transport term contains an equivalent ` opinion - velocity field ' which controls the flux depending on the independent variables and .this is in contrast to the physical situation of rarefied gases where the field would simply be given by .  the time - evolution of the distribution function of individuals depending on assertiveness , opinion and time will obey an _inhomogeneous boltzmann - type equation _, herein , is the ` opinion - velocity field ' and is a suitable relaxation time which allows to control the interaction frequency . the boltzmann - like collision operator which describes the change of density due to binary interactions is derived by standard methods of kinetic theory. a useful way of writing the collision operators is the so - called weak form .it corresponds to consider , for all smooth functions , where denotes the operation of mean with respect to the random quantities , .choosing as test function in and denoting the mass by implies conservation of mass , if there is point - wise conservation of opinion in each interaction in ( e.g. choosing and ) , or , more generally , conservation of opinion in the mean in each interaction in ( e.g. choosing ) , then the first moment , the mean opinion , is also conserved .this can be seen by choosing in . denoting the mean opinion by we obtain   we still have to specify the ` opinion - velocity field ' .a possible choice can be where models the in- or decrease of the assertiveness level , while the prefactor ensures that the assertiveness level stays inside the domain .this leads to an _ inhomogeneous boltzmann - type equation _ of the following form    alternatively , we can consider that both , change of opinion and and change of the assertiveness level happen through binary collisions . in this casewe have the following interaction rules :  [ e : leadership2 ]   herein , the functions , , and play the same role as in the previous section , and are assumed to fulfil the assumptions introduced earlier .the constant parameters and control the ` speed ' of attraction of opinions and repulsion of assertiveness , respectively . in addition, we introduce the function which describes the in- and decrease of the individual assertiveness level .it is assumed to fulfil together , these assumptions guarantee that and .the quantities , and , are uncorrelated random variables with distribution with variances and , respectively , and zero mean , assuming values on a set   to specify , we make the assumption that highly assertive individuals gain more assertiveness and weakly assertive ones loose assertiveness in a collision . therefore , we propose the following form : where the quadratic polynomial ensures that the assertiveness level remains in .  in this setting , we are led to study the evolution of the distribution function as a function depending on the assertiveness , opinion and time , .different to the previous section , we assume that the variation of the distribution with respect to both variables , assertiveness and opinion , depends on collisions between individuals .the time - evolution of the distribution function of individuals depending on assertiveness , opinion and time will obey a _multi - dimensional homogeneous boltzmann - type equation _ , where is a suitable relaxation time which allows to control the interaction frequency . the boltzmann - like collision operator which describes the change of density due to binary interactions is derived by standard methods of kinetic theory. the weak form of is given by for all test functions where denotes the operation of mean with respect to the random quantities , and , .in this section we are interested in modelling the clustering of individuals who share similar political opinions , a process that has been observed in the usa over the last decades .  in 2008 ,journalist bill bishop achieved popularity as the author of the book _ the big sort : why the clustering of like - minded america is tearing us apart _ .bishop s thesis is that us citizens increasingly choose to live among politically like - minded neighbours .based on county - level election results of us presidential elections in the past thirty years , he observed a doubling of so - called ` landslide counties ' , counties in which either candidate won or lost by 20 percentage points or more .such a segregation of political supporters may result in making political debates more bitter and hamper the political decision - making by consensus .bishop s findings were discussed and acclaimed in many newspapers and magazines , and former president bill clinton urged audiences to read the book . on the other handhis claims also met opposition from political sociologists who argued that political segregation is only a by - product of the correlation of political opinions with other sociologic ( cultural background , race , ... ) and economic factors which drive citizens residential preferences .one could consider to include such additional factors in a generalised kinetic model , and potentially even couple the opinion dynamics with a kinetic model for wealth distribution .` the big sort ' lends itself as an ideal subject to study inhomogeneous kinetic models for opinion formation . in this contextwe are faced with spatial inhomogeneity rather than inhomogeneity in assertiveness as in section [ sec : leadership ] . in the followingwe propose a kinetic model for opinion formation when the individuals are driven towards others with a similar political opinion .we study the evolution of the distribution function of political opinion as a function depending on three independent variables , the continuous political opinion variable  ] with position in and an election result ( by plurality voting system ) which is either ` red / republican ' ( ) or ` blue / democratic ' ( ) . in our numerical experimentspresented later we will typically restrict ourselves to bounded domains with no - flow boundary conditions .we assume that supporters of a party are attracted to counties which are controlled by the party they support .we model this effect by defining as a potential that drives the dynamics and is given by a superposition of ( signed ) gaussians centered around with variance we assume also that stronger supporters , i.e. individuals with more extreme opinion values , are able to retain there positions . a possible way to take these effects into account is to choose   the time - evolution of the distribution function of individuals with political opinion at position at time will obey an _inhomogeneous boltzmann - type equation _ for the distribution function which is of the form in a two - party system as we consider it , quantities of interest are the supporters of the parties , given by the marginals in simulations , elections could be run at time by computing to adapt the values of defining the attractive gaussians in accordingly in time .in general , equations like ( and ) are rather difficult to treat and it is usual in kinetic theory to study certain asymptotics , which frequently lead to simplified models of fokker - planck type . to this end , we study by formal asymptotics the quasi - invariant opinion limit ( while keeping fixed ) , following the path laid out in .let us introduce some notation .first , consider test - functions ) ] denoting by , the space of probability measures on , we define the space of measures with finite momentum . in the followingall our probability densities belong to and we assume that the density is obtained from a random variable with zero mean and unit variance .we then obtain =\sigma_\eta^p{\mathrm e}[|y|^p],\end{aligned}\ ] ] where  ] and ^ 2g(x , w)g(x , v)\,dv\,dw\,dx\big\rangle\end{gathered}\ ] ] and now we consider the limit while keeping fixed .we first show that the remainder term vanishes is this limit , similar as in .note first that as , by the collision rule and the definition of we have thus we obtain ^{2+\delta } g(x , w)g(x , v)\,dv\,dw\,dx\big\rangle.\ ] ] furthermore , we note that ^{2+\delta }  \leq 2^{1+\delta}\left(|\gamma c(x , y , v , w)(w - v)|^{2+\delta}+|\eta d(w)|^{2+\delta}\right)\\ \leq &  2^{3 + 2\delta}|\gamma|^{2+\delta}+2^{1+\delta}|\eta |^{2+\delta}.\end{aligned}\ ] ] here , we used the convexity of and the fact that and thus bounded .we conclude since , and has variance we have ( see ) vanishes in the limit while keeping fixed .then , in the same limit , the term on the right hand side of converges to (x , w)g(x , v)\,dv\,dw\,dx\\ = -\frac 1{\tau}\int_{\mathcal{i}\times  \mathbb{r}^2}\phi'(w)\mathcal{k}(x , w)g(x , w)\,dw\,dx + \frac{\lambda}{2\tau}\int_{\mathcal{i}\times \mathbb{r}^2}\phi''(w ) m(x)d^2(w)g(x , w)\,dw\,dx,\end{gathered}\ ] ] with being the mass of individuals in .after integration by parts we obtain the right hand side of ( the weak form of ) the fokker - planck equation subject to no flux boundary conditions for the variable ( which result from the integration by parts ) .we follow a similar approach as in the previous section , now in the two - dimensional setting of the opinion formation model ( cf . also ) .our aim is to study by formal asymptotics the quasi - invariant opinion limit where while keeping fixed , introducing the positive constants and .we consider test - functions ^ 2) ] is finite .the weak form of is given by where to study the situation for large times , i.e. close to the steady state , we introduce for the transformation this implies and the evolution of the scaled density follows ( we immediately drop the tilde in the following and denote the rescaled time simply by ) due to the collision rules , it holds we now employ multidimensional taylor expansion of up to second order around of the right hand side of . recalling that the random quantities , have mean zero , variance and , respectively , and are uncorrelated , we can follow along the lines of the computations of the previous subsection , to obtain { g(x , w)g(x , v)\,dv\,dy\,dw\,dx\big\rangle}\\ + \big\langle \frac{1}{\gamma\tau}\int_{\mathcal{j}^2 \times  \mathcal{i}^2}\frac{\partial\phi}{\partial x}(x , w)\left[\delta \tilde g(x - y)p(|v - w|)(x - y ) + \mu d(x ) \right]\\ \shoveright{\times g(x , w)g(x , v)\,dv\,dy\,dw\,dx\big\rangle}\\ + \big\langle \frac{1}{2\gamma\tau}\int_{\mathcal{j}^2 \times  \mathcal{i}^2}\frac{\partial^2\phi}{\partial w^2}(x , w)\left[-\gamma  r(x - y)p(|w - v|)(w - v)+\eta  d(w)\right]^2 \\ \shoveright{\times g(x , w)g(x , v)\,dv\,dy\,dw\,dx\big\rangle}\\ + \big\langle \frac{1}{2\gamma\tau}\int_{\mathcal{j}^2 \times  \mathcal{i}^2}\frac{\partial^2\phi}{\partial x^2}(x , w)\left[\delta \tilde g(x - y)p(|v - w|)(x - y ) + \mu d(x)\right]^2 \\\shoveright{\times g(x , w)g(x , v)\,dv\,dy\,dw\,dx\big\rangle}\\ + \big\langle \frac{1}{2\gamma\tau}\int_{\mathcal{j}^2 \times  \mathcal{i}^2}\frac{\partial^2\phi}{\partial w\partial x}(x , w)\left[-\gamma  r(x - y)p(|w - v|)(w - v)+\eta d(w)\right]\\ \shoveright{\times\left[\delta \tilde g(x - y)p(|v - w|)(x - y ) + \mu d(x ) \right]g(x , w)g(x , v)\,dv\,dy\,dw\,dx\big\rangle}\\  \shoveright{+r(\gamma,\sigma_\eta , \sigma_\mu)}\\ { = -\frac 1{\tau}\int_{\mathcal{i}\times  \mathcal{j}^2}\frac{\partial\phi}{\partial w}(x , w)\mathcal{k}(x , w)g(x , w)\,dy\,dw\,dx } -\frac { \delta}{\gamma\tau}\int_{\mathcal{i}^2\times\mathcal{j}}\frac{\partial\phi}{\partial x}(x , w)\mathcal{l}(x , w)g(x , w)\,dv\,dw\,dx\\ + \frac{1}{2\gamma\tau}\int_{\mathcal{i}^2 \times \mathcal{j}^2}\frac{\partial^2\phi}{\partial w^2}(x , w)\big[\gamma^2 r^2(x - y)p^2(|w - v|)(w - v)^2+\sigma_\eta^2d^2(w)\big]\\ \shoveright{\times g(x , w)g(x , v)\,dv\,dy\,dw\,dx}\\ + \frac{1}{2\gamma\tau}\int_{\mathcal{i}^2 \times \mathcal{j}^2}\frac{\partial^2\phi}{\partial x^2}(x , w)\big[\delta^2 \tilde g^2(x - y)p^2(|v - w|)(x - y)^2 + \sigma_\mu^2 d^2(x)\big]\\ \shoveright{\times g(x , w)g(x , v)\,dv\,dy\,dw\,dx}\\ + \frac{1}{2\gamma\tau}\int_{\mathcal{i}^2 \times  \mathcal{j}^2}\frac{\partial^2\phi}{\partial w\partial x}(x , w)\big[\gamma\delta r(x - y)p^2(\lvert w - v\rvert)(w - v)\tilde g(x - y)(x - y)\big]\\ \shoveright{\times g(x , w)g(x , v)\,dv\,dy\,dw\,dx}\\ + r(\gamma,\sigma_\eta , \sigma_\mu),\end{gathered}\ ] ] where  [ e : nonlocalops ]   and is the remainder term .our aim is now to consider the formal limit while keeping fixed , recalling and .the remainder term depends on the higher moments of the ( uncorrelated ) random quantities and can be shown to vanish in this limit , similar as in the previous subsection ( we omit the details ) . in the same limit , the term on the right hand side of then converges to with being the mass of individuals in .after integration by parts we obtain the right hand side of ( the weak form of ) the fokker - planck equation subject to no flux boundary conditions which result from the integration by parts , with the nonlocal operators , given in .in this section , we illustrate the behaviour of the different kinetic models and the limiting fokker - planck - type equations with various simulations . we first discuss the numerical discretisation of the different boltzmann - type equations and the corresponding fokker - planck - type equations , and then present results of numerical experiments .  while the multi - dimensional boltzmann - type equation can be solved by a classical kinetic monte carlo method , the monte carlo simulations for the inhomogeneous boltzmann - type equations are more involved . on the macroscopic levelthe high - dimensionality poses a significant challenge hence we propose a time splitting as well as a finite element discretisation with mass lumping in space .we perform a series of kinetic monte carlo simulations for the boltzmann - type models presented in sections [ sec : leadership].[sec : inhomogboltzmann ] and [ sec : leadership].[sec : multidboltzmann ] . in this kind of simulation , known as direct simulation monte carlo ( dsmc ) or bird s scheme ,pairs of individuals are randomly and non - exclusively selected for binary collisions , and exchange opinion ( and assertiveness in the multi - dimensional model from section [ sec : leadership].[sec : multidboltzmann ] ) , according to the relevant interaction rule .  in each simulationwe consider individuals , which are uniformly distributed in at time .one time step in our simulation corresponds to interactions .the average steady state opinion distribution is calculated using realisations . to compute a good approximation of the steady state ,each realisation is carried out for time steps , then the particle distribution is averaged over time steps .the random variables are chosen such that and assumes only values with equal probability .we assume that the diffusion has the form to ensure that the opinion remains inside the interval .the parameter is set to if not mentioned otherwise .the monte carlo simulations for the inhomogeneous boltzmann - type equations are more involved . in equationthe advection term is of conservative form , hence the transportation step can not be translated directly to the particle simulation .pareschi and seaid as well as herty _et al._ propose a monte carlo method , that is based on a relaxation approximation of conservation laws .it corresponds to a semilinear system with linear characteristic variables .we shall briefly review the underlying idea for the conservative transportation operator in in the following .let us consider the linear conservation law in one spatial dimension for the function with a given flux function \rightarrow \mathbb{r} ] hence we assume that initially no extreme opinions exist and no leaders are present . the interaction radius is set to .figure [ f : ex3 ] illustrates the very interesting behaviour in this case . in the multidimensional simulationwe observe the formation of a single peak at a low assertiveness level , while individuals with a higher assertiveness level group around the ` mainstream ' opinion . in the case of the inhomogeneous model, the potential initiates an increase of the assertiveness level for all individuals .therefore we do not observe the formation of a single peak at a low assertiveness level in this case .  .in our final example we present numerical simulations of the corresponding fokker - planck equation , which illustrate ` the big sort ' by considering the state of arizona .arizona is a state in the southwest of the united states with 15 electoral counties . in recent years the republican party dominated arizonas politics , see for example the outcome of the presidential elections from the years 1992 to 2004 in figure [ f : elections ] .the colours red and blue correspond to republicans and democrats , respectively .the colour intensity reflects the election outcome in percent , i.e. dark blue corresponds to democrats , medium blue to democrats and light blue to democrats .similar colour codes are used for the republicans .the election results illustrate the clustering trend as the election results per county become more and more pronounced over the years .  .we solve the fokker - planck equation on a bounded physical domain corresponding to the state arizona , divided into electoral counties , see figure [ f : domainarizona ] .we employ the numerical strategy outlined in section [ sec : numerics].[s : simfp ] .we discretise the physical domain in triangles , the opinion domain $ ] into elements .the time steps are set to .+ we choose an initial distribution which is proportional to the election result in 1992 , where and correspond to the distribution of democrats and republicans estimated from the election results in .we approximate the distributions by assigning different constants to the respective percentages in the electoral vote , i.e. the potential , given by , attracts individuals to the counties controlled by the party they support .we assume that the potential is directly related to the electoral results of the year 1996 , and satisfies the following pde : the laplacian is added to smooth the potential , the right hand side corresponds to the election results in the year 1996 ( using the same constants as in with sign corresponding to the republicans and democrats respectively ) .note that we choose neumann boundary conditions to ensure that individuals stay inside the physical domain .the calculated potential is depicted in figure [ f : pot ] .the simulation parameters are set to , and the interaction radius to .figure [ f : bigsort ] shows the spatial distribution of the marginals , i.e. which correspond to democrats and republican , respectively , at time .we observe the formation of two larger clusters of democratic voters in the south and the northeast of arizona .the republicans move towards the northwest as well as the southeast .this simulation results reproduce the patterns of the electoral results from 2004 fairly well , except for the second county from the right in the northeast ( navajo ) .however , given the electoral data from 1992 and 1996 only it is not possible to initiate such opinion dynamics .this would require more in - depth information such as the demographic distribution within the counties or the incorporation of several sets of electoral results .we leave such extensions for future research .we proposed and examined different inhomogeneous kinetic models for opinion formation , when the opinion formation process depends on an additional independent variable .examples included opinion dynamics under the effect of opinion leadership and opinion dynamics modelling political segregation .starting from microscopic opinion consensus dynamics we derived boltzmann - type equations for the opinion distribution . in a quasi - invariant opinion limitthey can be approximated by macroscopic fokker - planck - type equations .we presented numerical experiments to illustrate the models rich behaviour . using presidential election results in the state of arizona, we showed an example modelling the process of political segregation in the ` the big sort ' , the process of clustering of individuals who share similar political opinions .mtw acknowledges financial support from the austrian academy of sciences ( aw ) via the new frontiers grant nfg0001 .+ the authors are grateful to prof .richard tsai ( ut austin ) for suggesting ` the big sort ' as an example for an inhomogeneous opinion formation process .dring , b. , markowich , p.a . ,pietschmann , j .- f . & wolfram , m .- t .2009 boltzmann and fokker - planck equations modelling opinion formation in the presence of strong leaders .r. soc . lond .a _ * 465*(2112 ) , 3687 - 3708 .images by 7partparadigm , licensed under creative commons attribution - sharealike 3.0 , retrieved from http://en.wikipedia.org/wiki/united_states_presidential_election_in_arizona,_1992|1996|2000|2004[http://en.wikipedia.org/wiki/united_states_presidential_election_in_arizona,_1992|1996|2000|2004 ] on 12 may 2015 .

Abstract: we propose and investigate different kinetic models for opinion formation , when the opinion formation process depends on an additional independent variable , e.g.a leadership or a spatial variable . more specifically , we consider : ( i ) opinion dynamics under the effect of opinion leadership , where each individual is characterised not only by its opinion , but also by another independent variable which quantifies leadership qualities ; ( ii ) opinion dynamics modelling political segregation in the ` the big sort ' , a phenomenon that us citizens increasingly prefer to live in neighbourhoods with politically like - minded individuals . based on microscopic opinion consensus dynamics such models lead to inhomogeneous boltzmann - type equations for the opinion distribution . we derive macroscopic fokker - planck - type equations in a quasi - invariant opinion limit and present results of numerical experiments .


neural networks are being successfully applied across an extraordinary range of problem domains , in fields as diverse as computer science , finance , medicine , engineering , physics , etc .the main reason for such popularity is their ability to approximate arbitrary functions . for the last 30 yearsa number of results have been published showing that the artificial neural network called a _ feedforward network with one hidden layer _ can approximate arbitrarily well any continuous function of several real variables .these results play an important role in determining boundaries of efficacy of the considered networks .but the proofs are usually do not state how many neurons should be used in the hidden layer .the purpose of this paper is to prove constructively that a neural network having only one neuron in its single hidden layer can approximate arbitrarily well all continuous functions defined on any compact subset of the real axis .the building blocks for neural networks are called _neurons_. an artificial neuron is a device with real inputs and an output .this output is generally a superposition of a univariate function with an affine function in the -dimensional euclidean space , that is a function of the form .the neurons are organized in layers .each neuron of each layer is connected to each neuron of the subsequent ( and thus previous ) layer .information flows from one layer to the subsequent layer ( thus the term feedforward ) .a feedforward neural network with one hidden layer has three layers : input layer , hidden layer , and output layer .a feedforward network with one hidden layer consisting of neurons computes functions of the form here the vectors , called _ weights _ , are vectors in ; the _ thresholds _ and the coefficients are real numbers and is a univariate activation function .the following are common examples of activation functions :   in many applications , it is convenient to take the activation function as a _ sigmoidal function _ which is defined as the literature on neural networks abounds with the use of such functions and their superpositions .note that all the above activation functions are sigmoidal .in approximation by neural networks , there are two main problems .the first is the _ density _ problem of determining the conditions under which an arbitrary target function can be approximated arbitrarily well by neural networks .the second problem , called the _ complexity _ problem , is to determine how many neurons in hidden layers are necessary to give a prescribed degree of approximation .this problem is almost the same as the problem of degree of approximation ( see ) .the possibility of approximating a continuous function on a compact subset of the real line ( or -dimensional space ) by a single hidden layer neural network with a sigmoidal activation function has been well studied in a number of papers .different methods were used .carroll and dickinson used the inverse radon transformation to prove the universal approximation property of single hidden layer neural networks .gallant and white constructed a specific continuous , nondecreasing sigmoidal function , called a cosine squasher , from which it was possible to obtain any fourier series .thus their activation function had the density property .cybenko and funahashi , independently from each other , established that feedforward neural networks with a continuous sigmoidal activation function can approximate any continuous function within any degree of accuracy on compact subsets of cybenko s proof uses the functional analysis method , combining the hahn banach theorem and the riesz representation theorem , whiles funahashi s proof applies the result of irie and miyake on the integral representation of functions , using a kernel which can be expressed as a difference of two sigmoidal functions .hornik , stinchcombe and white applied the stone weierstrass theorem , using trigonometric functions .krkov proved that staircase like functions of any sigmoidal type can approximate continuous functions on any compact subset of the real line within an arbitrary accuracy .this is effectively used in krkov s subsequent results , which show that a continuous multivariate function can be approximated arbitrarily well by two hidden layer neural networks with a sigmoidal activation function ( see  ) .chen , chen and liu extended the result of cybenko by proving that any continuous function on a compact subset of can be approximated by a single hidden layer feedforward network with a bounded ( not necessarily continuous ) sigmoidal activation function .almost the same result was independently obtained by jones .costarelli and spigler reconsidered cybenko s approximation theorem and for a given function  ] for the set of all functions of the form ( [ eq : intro ] ) .chui and li proved that a single hidden layer network with a continuous sigmoidal activation function having integer weights and thresholds can approximate an arbitrary continuous function on a compact subset of .ito established a density result for continuous functions on a compact subset of by neural networks with a sigmoidal function having only unit weights .density properties of a single hidden layer network with a restricted set of weights were studied also in other papers ( for a detailed discussion see ) .in many subsequent papers , which dealt with the density problem , nonsigmoidal activation functions were allowed . among themare the papers by stinchcombe and white , cotter , hornik , mhaskar and micchelli , and other researchers .the more general result in this direction belongs to leshno , lin , pinkus and schocken .they proved that the necessary and sufficient condition for any continuous activation function to have the density property is that it not be a polynomial . for a detailed discussion of most of the results in this section ,see the review paper by pinkus .it should be remarked that in all the above mentioned works the number of neurons in the hidden layer is not fixed . as such to achieve a desired precision onemay take an excessive number of neurons .this , in turn , gives rise to the problem of complexity ( see above ) .our approach to the problem of approximation by single hidden layer feedforward networks is different and quite simple .we consider networks ( [ eq : intro ] ) defined on with a limited number of neurons ( is fixed ! ) in a hidden layer and ask the following fair question : is it possible to construct a well behaved ( that is , sigmoidal , smooth , monotone , etc . ) universal activation function providing approximation to arbitrary continuous functions on any compact set in within any degree of precision ? we show that this is possible even in the case of a feedforward network with only one neuron in its hidden layer ( that is , in the case ) .the basic form of our theorem claims that there exists a smooth , sigmoidal , almost monotone activation function with the property : for each univariate continuous function on the unit interval and any positive one can chose three numbers , and such that the function gives -approximation to .it should be remarked that we prove not only the existence result but also give an algorithm for constructing the mentioned universal sigmoidal function .for a wide class of lipschitz continuous functions we also give an algorithm for evaluating the numbers , and .  for numerical experiments we used sagemath .we wrote a code for creating the graph of and computing at any reasonable .the code is open - source and available at http://sites.google.com/site/njguliyev/papers/sigmoidal .we begin this section with the definition of a -increasing ( -decreasing ) function .let be any nonnegative number .a real function defined on is called -increasing ( -decreasing ) if there exists an increasing ( decreasing ) function such that , for all .if is strictly increasing ( or strictly decreasing ) , then the above function is called a -strictly increasing ( or -strictly decreasing ) function .clearly , -monotonicity coincides with the usual concept of monotonicity and a -increasing function is -increasing if .the following theorem is valid .  forany positive numbers and , there exists a , sigmoidal activation function which is strictly increasing on , -strictly increasing on , and satisfies the following property : for any finite closed interval  ] and there exist three real numbers , and for which for all  ] ,  ] first , we define on the closed intervals  ] .  at the second stagewe define on the intervals  ] . by the density of polynomials with rational coefficients in the space of continuous functions over any compact subset of , for any there exists a polynomial of the above form such that for all  ] .note that ( [ eq : g_epsilon ] ) proves our theorem for the unit interval  ] to any finite closed interval  ] , be constructed as above and be an arbitrarily small positive number .the transformed function is well defined on  ] with , and .since each non - zero polynomial with rational coefficients can uniquely be written as , where ( i.e. ) , we have the following bijection between the set of all non - zero polynomials with rational coefficients and the set of all positive rational numbers : \ ] ] we define and where  ] ._  set . besides , for each polynomial , set and it is not difficult to verify that .\ ] ]  if is constant , then we put otherwise , we define as the function ,\ ] ] where note that , are the coefficients of the linear function mapping the closed interval  ] .thus , for all  ] ( , ),scaledwidth=75.0% ]  .some computed values of ( , ) [ cols="^,^,^,^,^,^,^,^,^,^",options="header " , ]   * step 5 . * _ construction of on  ] we will use the _ smooth transition function _ where it is easy to see that for , for and for .set since both and belong to the interval , we obtain that .first we extend smoothly to the interval  ] as the function .\end{split}\ ] ]  let us verify that satisfies the condition ( [ eq : h_sigma_1 ] ) .indeed , if , then there is nothing to prove , since .if , then and hence from ( [ eq : sigma_left ] ) it follows that for each , is between the numbers and . on the other hand , from ( [ eq : epsilon ] ) we obtain that which together with ( [ eq : sigma_again ] ) and ( [ eq : h_m_sigma_1 ] ) yields that  ] and   * step 6 . * _ construction of on ._  finally , we put it is not difficult to verify that is a strictly increasing , smooth function on . note also that ( see step 4 ) , as tends to from the left and , for .step 6 completes the construction of the universal activation function , which satisfies theorem 2.1 .although theorem 2.1 is valid for all continuous functions , in practice it is quite difficult to calculate algorithmically , and in theorem 2.1 for badly behaved continuous functions .the main difficulty arises while attempting to design an efficient algorithm for the construction of a best approximating polynomial within any given degree of accuracy .but for certain large classes of well behaved functions , the computation of the above numbers is doable . in this section ,we show this for the class of lipschitz continuous functions .assume that is a lipschitz continuous function on  ] with a lipschitz constant .denote by the -th bernstein polynomial of the function .let be given .define the functions which return the positions of a positive rational number and a rational number in the sequences and , respectively ( see section 3 ) .we start with the computation of .let be a positive rational number .if ( [ eq : fraction ] ) is the continued fraction representation of with even ( we may always consider  ] if needed ) , then the binary representation of the position of in the calkin wilf sequence is now we can easily find by the formula          set . if is constant then we put if is not constant then we put where and are computed using the formulas ( [ eq : a_1 ] ) , ( [ eq : a_2 ] ) and ( [ eq : a_m , b_m ] ) .   in this step , we return to our original function and calculate the numbers , and ( see theorem 2.1 ) .the numbers and have been calculated above ( they are the same for both and ) . in order to find , we use the formula .  note that some computational difficulties may arise while implementing the above algorithm in standard computers .for some functions , the index of a polynomial in step 5 may be extraordinarily large . in this case , a computer is not capable of producing this number , hence the numbers , and .s. m. carroll and b. w. dickinson , construction of neural nets using the radon transform , in _ proceedings of the ieee 1989 international joint conference on neural networks _ , 1989 , vol .1 , ieee , new york , pp .607611 .a. r. gallant and h. white , there exists a neural network that does not make avoidable mistakes , in _ proceedings of the ieee 1988 international conference on neural networks _ , 1988 , vol .1 , ieee , new york , pp . 657664 .m. stinchcombe and h. white , approximating and learning unknown mappings using multilayer feedforward networks with bounded weights , in _ proceedings of the ieee 1990 international joint conference on neural networks _ , 1990 , vol .3 , ieee , new york , 716 .

Abstract: the possibility of approximating a continuous function on a compact subset of the real line by a feedforward single hidden layer neural network with a sigmoidal activation function has been studied in many papers . such networks can approximate an arbitrary continuous function provided that an unlimited number of neurons in a hidden layer is permitted . in this paper , we consider constructive approximation on any finite interval of by neural networks with only one neuron in the hidden layer . we construct algorithmically a smooth , sigmoidal , almost monotone activation function providing approximation to an arbitrary continuous function within any degree of accuracy . this algorithm is implemented in a computer program , which computes the value of at any reasonable point of the real axis .


the generalization of random walks for quantum systems proved to be a fruitful concept attracting much recent interest .algorithmic application for quantum information processing is an especially promising area of utilization of quantum random walks ( qrw ) .  in his pioneering paper 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 ) proposed a search algorithm based on quantum random walk on a hypercube , which has similar scaling properties as the grover search . in the skw algorithmthe 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 , nuclear magnetic resonance ( also experimentally verified ) , cavity quantum electrodynamics , optical lattices , optical traps , optical cavity , and classical optics . moreover , the application of standard general logic networks to the task is always at hand .the idea of the scattering quantum random walk ( sqrw ) 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 .the sqrw on the hypercube allows for a quantum optical implementation of the skw search algorithm .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 .the first investigations in this direction indicated that a small amount of decoherence can actually enhance the mixing property . for a continuous qrw on a hypercubethere is a threshold for decoherence , beyond which the walk behaves classically .et al _ analyzed sqrw with randomized phase noise on a dimensional lattice .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 .the quantum random walk search with imperfect gates was discussed in some detail by li _et al _ , 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 paperwe 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 nave expectation , non - trivial effects such as the enhancement of the search efficiency can be observed . as a second type of errorswe 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 sectionwe introduce the scattering quantum walk search algorithm . in section [ sec : uniform ] .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 [ sec : non - uniform ] .we turn to direction dependent losses , and present estimations of the success probability based on analytical calculations and numerical evidence . in section [ sec: phase].phase noise is considered and consequences for the success probability are worked out . finally , we conclude in sec .[ sec : conclusions ] .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 literaturethe coin is considered as position ( vertex ) independent .the cqrw is defined on the product hilbert space , where refers to the quantum coin , and represents the graph on which the walker moves .the discrete time - evolution of the system is governed by the unitary operator where is the coin operator which corresponds to flipping the quantum coin , and 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 of the underlying graph , the step operator ( a permutation operator of the entire hilbert space ) can be expressed as in ( [ eq : s_gendef ] ) denotes the vertex index . here , andin the rest of this paper we identify the vertices with their indices and understand as the set of vertex indices . the most remarkable factabout is that it contains all information about the topology of the graph . in particular ,the actual binary string values of are determined by the set of edges .this is accomplished by the introduction of direction indices , which run from to in case of the regular graphs which are used in the search algorithm .  to implement the scattering quantum random walk on an regular graph of nodes , identical -multiports arranged in columns each containing 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 and then indexed suitably and connected according to the graph .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 where the input port index of the destination multiport is , and the row index is .thus the total hilbert space can effectively be separated into some product space . to be precise, the additional label 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 time - evolution 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 -multiport can be fully characterized by an su( ) transformation matrix .the effect of such multiport on single excitation states is given by the formula , where denotes the single photon state with the photon being in the mode , i.e.  .we note , that a multiport with any particular transformation matrix can be realized in a laboratory . 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 can be made in such way that each input port has the same index as the corresponding source output port . therefore the label 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 .[ fig : port - example]a , with some of the actual connections illustrated for a ( three dimensional ) cube on fig .[ fig : port - example]b .considering an array of identical multiports , an arbitrary input state undergoes the transformation by the same matrix for every .let the output port of multiport be connected to multiport in the next row .thus the mode labelled by the source indices and , is labelled by and in terms of the destination indices .therefore , effect of propagation in terms of our standard basis is written , comparing this formula with eqs .( [ eq : s_gendef ] ) and ( [ eq : c ] ) we see that this formula corresponds to a transformation where is generated by the matrix . 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 .dimensional hypercube .b ) schematic depiction of the setup of the sqrw implementation of the skw algorithm for , with the marked node being . for clarity , a unique line patternis associated with each input ( output ) port index . ]  in particular , the skw algorithm is based on the application of two distinct coin operators , e.g.  [ eq : std - coin - pair ]   where is the grover inversion or diffusion operator  . in the algorithm ,the application of the two coin operators is conditioned on the result of oracle operator .the oracle marks one as target , hence the coin operator becomes conditioned on the node : when is large , the operator can be regarded as a perturbed variation of .the conditional transformation ( [ eq : pert_coin ] ) is straight - forward to implement in the multiport network .for the two coins ( [ eq : std - coin - pair ] ) one has to use a simple phase shifter at position in every column of the array , and a multiport realizing the grover matrix at every other position .the connection topology required to implement a walk on the hypercube is such that in the binary representation we have with 1 being at the position , i.e. .see fig .[ fig : port - example]b for a schematic example , when .the above described scheme to realize quantum walks in an array of multiports using as many columns as the number of iterations of can be reduced to only a single column . to do this ,one simply needs to connect the output ports back to the appropriate input ports of the destination multiport in the same column .this feed - back setup is similar to the one introduced in ref .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 beam - splitters with transmittances corresponding to the effective transmission rate ( see fig . [fig : loss - scheme ] ) .  .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 ) . ]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 .it is important to note that with the introduction of this error , the original hilbert space of one - photon excitations must be extended by the addition of the vacuum state . the action of the sqrw evolution operator on the extended hilbert space follows from the property . due to the nature of eq .( [ eq : homloss_op ] ) and the extension of , one can see that the order of applying the unitary time step and the error operator can be interchanged .therefore , over 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 on the search hilbert space : this operator is simply a multiplication with a number .it is obviously linear , however , for not unitary .the operator 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 , 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 as the time step operator , and relax the requirement of normalization .using this notation , the effect of 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 algorithmwe define the new step operator , and write the final state of the system after steps as adopting the notation of ref . , the probability of measuring the target state at the output after steps can be expressed as we know from ref . that .since an overall exponential drop of the success probability is expected due to the factor , we search for the maximum be before the ideal time - point .this guarantees that is finite , therefore due to the factor for large the second term can be omitted , and it is sufficient to maximize the function with respect to . after substituting the result \pm o(n^{3/2}/2^n) ] . during operationwe set 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 ) .when is sufficiently large , the expression can be approximated to first order in and we obtain upon substituting into ( [ eq : prob_uniform_approx ] ) we can use the new variable to express the sine term as = \\  = \frac1{1+x^2 } + \frac{2x{\mathop{\mathrm{acot}}\nolimits}x}{1+x^2}o(1/n ) + \frac{{\mathop{\mathrm{acot}}\nolimits}^2x}{1+x^2 } o(1/n^2).\end{gathered}\ ] ] thus for the maximum success probability we obtain .\label{eq : maxprob - homo}\ ] ] this formula is our main result for the case of uniform photon losses . in the large limitit gives the approximate performance of the skw search algorithm as a function of the transmission rate and the size of the search space .since is bounded in , the accuracy of the term in brackets is bounded by .the most notable consequence of the second contribution is that while in the ideal case the probability is an upper bound , in the lossy case deviations from the leading term , can be expected in either direction .the functional form of eq .( [ eq : maxprob - approx ] ) , plotted on fig .[ fig : plot_prob_dimless ] , 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 . forsmall losses we can use the approximation ( [ eq : x - approx ] ) and conclude that the search efficiency depends only on the difference .the approximation is compared with the results of numerical calculations on fig .[ fig : plot_max_prob_compare ] . we can observe the 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 term of eq .( [ eq : maxprob - homo ] ) .  ) .the probability is plotted against the logarithm of which is a combination of the rank of the hypercube and the logarithmic transmission parameter . ]  ) calculated using the theoretical approximation , and numerical simulations .the theoretical curves are drawn with continuous lines of different patterns , and the numerical results are represented by points interconnected with the same line pattern and colour as the theoretical approximates corresponding to the same logarithmic transmission parameter . ]in the present section we no longer assume equal loss rates , and consider the schematically depicted loss model on fig .[ fig : loss - scheme ] with arbitrary 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 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 . due to the symmetry of the system ,the sequential order of coefficients is irrelevant . with the re - defined operatorthe effect of decoherence reads where is the initial state , and the non - vacuum part of the output state is , with .therefore , we can again reduce our problem to calculating the evolution of unnormalized pure states , just as in the uniform case , and use the non - unitary step operator with the more general noise operator .  tellinghow 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 undefined . as a consequence of eq .( [ eq : d - inhomo ] ) the diagonal elements of are {dd}=\delta_d=\eta_d-\eta ] .all points were generated at and the entire available domain for .the values of higher moments of are not restricted , therefore we see multiple points for certain pairs .( rank of the hypercube . ) ]  to plot the success probabilities corresponding to arbitrary random coefficients we used the pair of variables and . on these plots ,the higher order terms cause a `` spread '' of the appearing curves .a sample plot is displayed on fig . [fig : max - prob - q35 ] 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 .  , and in the presence of uniform loss with coefficient .physically , the non - uniform case can be obtained from the uniform case by introducing proper attenuation .we use the second moment as a measure of deviation from the non - attenuated case .the vertical axis shows / p_n^{\mathrm{max } }  ( \eta_{\mathrm{max}})$ ] as a percentage .we observe a systematic improvement for higher values of .the plot corresponds to rank and . ]the numerical studies , involving the generation of 1000 sets of uniformly randomly generated transmission coefficients for each of the systems of up to sizes , indicate that with the help of eq .( [ eq : lowerb - second ] ) the first two terms of the expansion eq .( [ eq : pmax - taylor ] ) 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 .the appeal of this lower bound is that it depends only on the size of the system , and the elementary statistical properties of the noise ( , ) .therefore , together with the formula ( [ eq : maxprob - approx ] ) 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 .we chose as a measure of how much an 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 .[ fig : max - prob - max ] .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 the efficiency is always increased . on the other handthese plots provide clear evidence that for a significant number of cases the difference 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 can not be trivially attributed to the fact that the grover operator is not the optimal choice for the marked coin .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 '' regimethe 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 . for walks on 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 . .  to begin the formal treatment ,let denote the operator introducing the phase shifts , and write it as this operator is unitary , hence the step operator that depends on the phases is unitary as well . in case of phase fluctuations , at each iteration we have the parameters such that all are independent random variables for every , and , according to some probability distribution . in case of static phase errors , and considered to be the same random variables for every pair of and .  the formalism of ref . can be applied to the walk on the hypercube , and extended to the case of non - uniform coins and position dependent phases .namely , using the shorthand notations and the state after iterations can be expressed as where {a_ja_{j+1 } }  \delta_{\xtg \oplus  x_0 , e(t , j+1 ) }  \right),\end{gathered}\ ] ] and . for the standard skw algorithm ,the coin matrices are and , however , the skw algorithm is reported to work with more general choices of operators  .  for the following study , we express the probability of finding the walker at position after iterations as the sum , such that the incoherent and coherent contributions are where .the appearing phase factors are and , i.e. {a_ja_{j+1 } }  \delta_{\txtg , e(j,1 ) }  \right ) .\label{eq : xi_tg}\ ] ] note , that when the probability of finding the walker at the target node is to be calculated we must set , therefore , we have .  in the followingwe shall show that the incoherent contribution is constant , for any two unitary coins .consequently , is constant also for balanced coins such as those in eq .( [ eq : std - coin - pair ] ) .the summations in eq .( [ eq : px - incoh ] ) can be rearranged in increasing order of indices of , yielding {a_1a_2 }  \delta_{\txtg , e_{a_1 } } \right|^2 \times \cdots  \\\times \sum_{a_{t-1}=0}^{n-1 } \left| c^{(0)}_{a_{t-2}a_{t-1 } } +  [ c^{(1 ) } - c^{(0)}]_{a_{t-2}a_{t-1 } } \delta_{\txtg ,  e(t-2,1 ) } \right|^2\\  \times \sum_{a_t=0}^{n-1 } \left| c^{(0)}_{a_{t-1}a_t } +  [ c^{(1 ) } - c^{(0)}]_{a_{t-1}a_t } \delta_{\txtg ,  e(t-1,1 ) } \right|^2.\end{gathered}\ ] ] since depends on only when , and due to the unitarity of the coins , the summation over can be evaluated and we obtain . hence , we see that , and this implies eq .( [ eq : px - coh - const ] ) by induction .   and .the tendency of the success probability to a constant , non - zero value can be observed on this numerically obtained plot .it is also observable that a larger variance results in a smaller asymptotic value . ]the average probability of finding the walker at node is obtained by averaging the random phases according to their appropriate probability distribution . using eq .( [ eq : px - coh - const ] ) this probability can be expressed as where denotes taking the average for each random variable in case of phase fluctuations , and for each 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 for different random distributions .  in case of phase fluctuationscharacterized by a uniform distribution , the coherent term immediately vanishes and we obtain .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 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 . for such gaussian distribution , the coherent term exhibitsexponential 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 distributionwe 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 .( [ eq : std - coin - pair ] ) .  .the difference in frequencies of the major oscillations is clearly observable for larger times . ]the numerical results for the success probability for several values of are plotted on fig .[ fig : phase - noise - evolution ] .the data points were obtained by calculating success probabilities for randomly generated phase configurations and taking their averages at each time step .  by studying the repetition of the random phase configurationwe come to several remarkable conclusions .first , the time evolution of the success probability tends ( on a long time scale , ) 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 .[ fig : phase - noise ] .  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 .[ fig : phase - noise - diff ] , the success probabilities for different runs display the typical oscillations around a non - zero 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 .[ fig : plot_prob_dimless ] .  .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 directionsmay 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 .therefore , in the long - time limit , static phase errors are less destructive than rapidly fluctuating phase errors .

Abstract: 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 .