Stability of quantum linear logic circuits against perturbations

Here we study transformation of waveshapes of photons under the action of the linear logic circuits and other related architectures involving only linear optical networks and measurements. We show that the gates are working well not only in the case when all photons are separable and located in the same mode, but in some more general cases. For instance, the photonic waveshapes are allowed to be slightly different in different channels; in this case, Zeno effect prevents the photons from decoherence after the measurement, and the gate thus remains neutral to the small waveshape perturbations.


Introduction
The quantum logic based on 'flying qubits', that is, photons which propagate through an extended pathway with gates being represented by input-output transformations of such photons taking place 'with the speed of light', provides one of the possible ways to build quantum circuits. Such flying-qubits gates and circuits are potentially capable of making universal quantum computers [1][2][3][4][5]. They have been proven to be useful in various optical experiments, 4 Author to whom any correspondence should be addressed.
Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
including several proof-of-principle setups [6][7][8][9][10][11][12][13][14][15][16]. The most successful all optical architectures up to now use linear logical elements and measurements and are based on the fact that the interferometric setups followed by measurements may probabilistically introduce entanglement between photons. Such architectures include so called linear optical computing (LOC) [2], based on a probabilistic teleportation, one-way circuits [3] including measurement of specially created entangled states, and their combinations [11]. In the following we will use the term 'LOC' to denote all such approaches. More generally, interferometric setups of various kind, supplied with measurements, play an important or even deciding role in other quantuminformation tasks, such as bosonic sampling [13,14,[17][18][19], quantum metrology [20,21], and others.
Optical qubits can be encoded in various degrees of freedom of photons, such as polarization, spatially distinct channels [11] ('which-path encoding'), photon number [11], frequency bins [22][23][24], temporal waveshape [25] or orbital angular momentum [26][27][28]. Although every realistic photon has a certain waveshape, in many of above mentioned encodings this temporal waveshape is unused, that is, constituting a kind of 'ballast' degrees of freedom. Nevertheless, these ballast degrees of freedom often play an important role in the overall dynamics, even if they are supposed to be 'unused' [29,30]. Unless the photons in different spatial channels are fully indistinguishable, an interferometric setup introduce entanglement between them, which, after one of the photons is measured, destroys the coherence of the remaining photons [31,32]. In particular, for interferometric schemes, for the full visibility of interference fringes the symmetry of the spectral function [32] is needed. For experiments involving both interferometric parts and measurement, more restrictive conditions are required. For instance, for single photons created from photon pairs, the absence of spectral/temporal entanglement is necessary to keep the resulting single photon fully coherent [31][32][33][34], that is, the photon pair must be in a state with the Schmidt rank equal to one.
The conditions mentioned above were obtained by considering relatively simple setups [31][32][33][34], each of them however representing important parts of LOC gates, as well as whole gates [32]. The direct analysis of the above mentioned questions in larger LOC constellations was up to now not undertaken, to the best of our knowledge. Nevertheless, already considered setups give clear and simple understanding of the sufficient conditions on the photonic wavepacket to be efficient for quantum computations: the perfect operation of LOC gates is in every case guaranteed if the photons in different channels are independent and indistinguishable, i.e. are located in exactly the same temporal mode. In such case, no which-path information can be extracted from the photons, which guarantees efficient quantum interference and absence of incoherence by the measurements.
In this article we extend this condition. We derive, using the formalism of temporal modes [25], a general expression for the action of the linear gates and whole circuits taken into account their waveshapes. We consider more specifically the case when the waveshapes of photons are slightly varying in different channels, which can take place, for instance, if the propagation conditions such as dispersion in different channels are slightly different. We show that in this case Zeno effect prevents the system from decoherence. The circuit remains thus 'neutral' to the perturbations: although they remain in the system and are not allowed to exit through the measured ancillary channels, they also do not influence the computation process. Furthermore, few other classes of 'allowed' states are discussed here.

The general setting
A typical part of an LOC circuit can be presented as the following (see figure 1): a network of linear optical elements U, acting on photons in channels C 1 , . . . , C m , followed by The LOC circuits include a network of linear elements U acting on the channels C 1 , . . . , C m , followed by the measurements (Mes.) of some channels. Without loss of generality we may assume the measurement acting on only one of the channels (in our case the last, mth one). The classical information (Clas.) resulted from the measurement might be used in the following gates (feed-forward). Optionally, we may affect the waveshapes in one or more channels (here, channel C 2 ) by the operator D modifying the temporal waveshape of the photon. measurements in one or several channels. The result of the measurements can be optionally used in the other parts of the network. We are interested in evolution of temporal shapes of the photons in the system. Therefore, we define channels carrying quantum information to include all degrees of freedom except temporal modes, and the photon in each channel can be in one of the temporal modes or in a superposition of such. In particular, photons in different polarizations or transverse modes we consider to be in different channels. The corresponding partial wavefunction for n photons at the entrance of U can be thus defined as: defines the quantum amplitude of n photons having particular frequencies ω 1 , ω 2 , . . . , ω n and located in channels W 1 , W 2 , . . . , W n , W l ∈ {C 1 , . . . , C m }, l = (1, . . . , n). Summation is made over W, the sequences of n 'channel names' denoting the location of every photon, with possible repetitions, meaning more than one photon in a particular channel. Thus, W is formally a set of all 'words' of length n with the 'letters' from the alphabet {C 1 , . . . , C m }, having the property that W l > W l if l > l (by this we assume the natural ordering among the channels C 1 < C 2 < · · · < C m ). The latter condition is needed in order to define f uniquely; otherwise we will have some f labeled differently but describing the same physical situation. Finally, |0 C 1 ,C 2 ,...,C m denotes vacuum in all channels and a † ω l ,W l is the photon birth operator with the frequency ω l in the channel W l .
We find useful to rewrite equation (1) in the temporal domain using a set of some discrete orthogonal modes in time g i (t) = 1 √ 2π g i (ω)e iωt dω, i = 1, . . . , ∞, where g i (ω) are the Fourier representations of these modes, which are also orthogonal. One can use also continuous set of modes, in this case all corresponding summations must be replaced by integrals. We define the corresponding single-photon states as [25]: In this way, equation (1) is rewritten as: where the function f W 1 ,...,W n i 1 ,...,i n describes the quantum amplitude of n photons to be in the channels W 1 , . . . , W n and temporal modes i 1 , . . . , i n are defined as: The summation over temporal modes I in equation (3) is organized similarly to summation over channels in equation (1). Namely, I is a set of all words being the mode index (see equation (2)). Nevertheless, the order of i l can be arbitrary, that is, in contrast to indices labeling channels, we do not assume the ordering of the mode indices. Finally, the general wavefunction at the entrance of U is a sum of all partial ones: As the next step, we describe the action of U. We represent U as a kind of a scattering matrix, almost fully neglecting the internal structure of the underlying network, except few simplifying assumptions. First, we assume that the network U does not contain losses, that is, the number of photons at the entrance and at the exit are the same. As a second assumption, we assume that every of the linear elements in U are frequency-independent. That is, every element keeps the waveshapes intact. The action of U under these circumstances is distributing every photon between the channels C 1 . . . C m without changing its temporal shape. Furthermore, since linear gates are probabilistic, if the measurements after U gives incorrect result, the gate is unsuccessful and all the photons in C 1 . . . C m are disregarded. Under these assumptions, the action of U is described by an operator U, which is a sum of particular contributions for every number of photons n: where P n is a projector to the subspace with exactly n photons, C is a projector to a subspace containing amplitudes leading to a successful gate operation after preforming measurements. Such a projector is introduced because in the case of negative outcome all the photons participating in this particular operation are disregarded and have typically to be destroyed. By introducing such postselection into equation (6) we make the operator U non-Hermitian (although U (n) remains Hermitian). Besides, we assume implicitly ideal erorrless measurements. Every U (n) in equation (6) is an operator describing redistribution of the photons between channels. In general, the matrix U (n) acts on the photonic amplitudes f W 1 ,...,W n i 1 ,...,i n and thus has elements ..,i n W n , every of them converting the multi-index i 1 W 1 , . . . , i n W n to i 1 W 1 , . . . , i n W n (here we drop the subscript (n), since it follows from the number of indices). Nevertheless, taking into account that U (n) keeps the waveshapes intact and only redistributes the photons between channels, it should contain only indices of spatial channels, that is, can be enumerated as U The matrix CU (n) has the same form, but, because of the projector operation C, some elements are equal to zero. We will thus denote the matrix defined by CU (n) as U W 1 ,...,W n W 1 ,...,W n . That is, the action of every single element in the decomposition equation (6) is written as: where the summation rules are the same as in equation (1). Finally, the subsequent measurement of one of the channels results in the density matrix (in non-normalized form) where M is the set of channels where photons were measured. At this point it is worth to note that the form of equation (8) does not depend on our ability to actually measure the temporal waveshape. It is important only that the temporal waveshapes corresponding to different |g i are orthogonal and thus are potentially distinguishable-because of this, equation (8) contains incoherent sum of all modes in M even if we do not actually measure the waveshapes. Before we approach the general setting in figure 1, we find it constructive to consider first a more specific case of NS (nonlinear sign gate) first defined in [2], which is the most simple and basic element for LOC.

NS gate
NS gate in LOC has a probabilistic nature and exists in several variants. One of them is shown schematically in figure 2. In this variant, two ancilla channels, are used in one of them a single photon is located and the other is in the vacuum state. The unknown state if one of two measuring devices registers one photon and the other measures the vacuum. The joint state of the main and ancilla qubits at the entrance, taking into account that the channel C is in the vacuum state, are described by where |Ψ (n) corresponds to the partial amplitudes with n photons in all channels (that is, n − 1 photons in the working channel A). The partial states |Ψ (n) are rewritten, according to equation (3), as: where the amplitudes f are defined in equation (4), and here short-noted as the following: f B i we denoted as f i , f AB i j as f ij and f AAB i jl as f ijl . This is because in all of these cases we have only one possibility for the channel indices in f, and thus no summation over channel indices is needed. This is due to the ordering condition, as it is described after equation (1).
The action of U is given by the operator U, decomposed into partial operators acting on the states with particular photon number n as defined in equation (6). We consider only the case of success of the NS gate as specified in figure 2 (otherwise all the photons belonging to the gate are disregarded). The first part in the decomposition equation (6), CU (1) P 1 , is quite trivial:   figure 2). Because of the ordering condition on the channels, the lower index pair can be only W 1 W 2 = AB, so that the summation over lower indices is reduced to a single term. Therefore, we denote U IJ AB as U IJ , I, J = {A, B}. The element U AB corresponds to scattering to the same spatial channel, U BA to exchange the channel. Taking this into account and rearranging the indices we obtain the two-photon version of equation (7): Note that in contrast to the vectors which appeared before, |Ψ j A is not necessarily normalized to 1.
For the three-photon case, that is, for the matrix defining the action of CU (3) P 3 , we have, in the same way as for the two-photon one, only one allowed combination in U AAB as U IJL , we have: The successful measurement of the channels B and C (delivering zero photons in C and one photon in B) gives, according to equations (8), (9), (13), (17) (in non-normalized form): That is, the resulting density matrix is a sum of incoherent components corresponding to different j; within every wavefunction |φ j there is interference possible. Having the expression for the output density matrix equations (15), (17), (19) one can reexamine the mode dynamics more closely for some basic situations. The simplest case is when both channels contain exactly the same mode |g k (for some definite k) in both A and B: that is, the amplitudes f in equations (10) and (12) are given by: where δ ik is the Kronecker delta. In this case we have the final state equation (18) being a pure one; that is, only one of |φ j , with j = k, is nonzero: In this case, we have fully indistinguishable photons, and the full quantum interference can take place. The same result takes place if the independent modes in A and B are in the form: for some coefficients g i , g j , g k . In this case, by redefinition of the mode given by | f = g i |g i , we reduce the situation to equations (20) and (21). The conditions (21) and (23) are well known in setups related to interferometry and measurements [31][32][33]: they all represent the case of a state with Schmidt rank equal to one, that is, indistinguishable photons in all channels. We remark that in order to work as an NS gate for the cases considered above, the condition is to be fulfilled, which follows from the definition of the NS gate. This was the major discovery in [2] that purely linear networks may satisfy this condition. Since |U B | < 1, the gate has only a probabilistic nature. Another important nontrivial example we consider here is the one of a separable state with the mode |g k in A and |g k in B, with k = k . That is, now the photons enter A and B in different modes. In this case f is defined as: and the only nonzero amplitudes in equation (19) are which is responsible for the exchange of the modes between channels (that is, the mode k appearing in channel A instead of B), and in which case the modes remain in the same channels as at the entrance. According to equation (18), the resulting density matrix is an incoherent sum of these two waveshapes. For instance, if a = 0 and c = 0, equation (18) is written as: That is, presence of two orthogonal waveshapes in the amplitude turns the result into an incoherent mixture of two amplitudes and thus, in general, destroys the action of the gate (this situation is illustrated in figure 2). Besides, taking into account equation (24), since neither of |U IJ |, |U IJL | are equal to zero, even within every single coherent component of ρ (out) in equations (18) and (19) the correct action of the gate can not be guarantied. For instance, since U B = U AB = −U AAB (which happens because of equation (24)), equation (27) does not give the correct gate action.

Strictly invariant wavefunctions
The wavefunctions of the type defined in equation (22) or equation (23), that is, consisting of the same wavefunction in one channels, will retain their form not only for the NS gate but also for the whole circuit. In this case equation (5) can be written as: where |Ψ (n) k = j a j W j |g k C 1 ...C n , a j are some coefficients, the product is made over the all combinations of channels W j were at least one photon is present, and |g k is a wavefunction with fixed k. The waveshape after the whole circuit will be of the same type, i.e., it will be again a pure wavefunction of the type, given by equation (29), only with different coefficients.
It is interesting that this condition can be easily extended by considering more general 'diagonal' state containing an incoherent sum of the terms |Ψ (in) j defined by equation (29). In contrast to equation (29), equation (30) is not a pure state anymore, nevertheless keeping perfectly the quantum interference in every of its components also after measurement. Because of this, the state given by equation (30) retains its form after the gate. In fact, since the index j must not necessarily be discrete, we can, somewhat less formally, consider the modes in the form of delta functions localized in certain position in time, assuming thus g τ (ω) = e −iωτ , which leads to wavefunctions |g τ formally localized at t = τ , with τ being an index continuously labeling the modes (note that such localization of wavefunctions does not automatically mean the electromagnetic field is 'localized' at t = τ ). The corresponding continuous mode is where |Ψ (in) τ is defined analogously to equation (20). Continuous states in ω-space defined in an analogous way as also can be constructed. Such frequency-based 'diagonal' states are somewhat similar to the ones considered in [35], only, in contrast to [35], the phase between different frequency components is here not defined.

Small perturbation of the pulse shapes
We may consider the situation when all the channels contain photons in identical independent states, however the waveshape in one or several channels are slightly disturbed. This situation schematically shown in figure 1, where the waveshape in an exemplary channel C 2 is disturbed by an operator D. Such disturbance can be caused, for instance, by an action of dispersion slightly different from the dispersion in other channels. As the first step, we consider only one disturbed channel. We denote the undisturbed mode |g m whereas the mode in the disturbed channel will be |g m + |g d , where 1, and, without breaking the generality, we may assume g m |g d = 0. Both |g m and |g d have some decomposition in terms of |g i defined before, nevertheless, because of their orthogonality, we may consider these two modes as a new set of basic modes. As in the previous sections, we suppose an ideal linear network U, which does not introduce new modes and only 'redistributes' the existing ones. In fact, this is not too strict condition: if some of the linear elements are imperfect in the above sense, we can always take this into account by 'backtracking' the disturbance introduced by this element to the entrance of U and thus to transfer this imperfection into |g d .
We start our consideration from the NS gate, where we assume the perturbation in the channel B. The initial state will be thus the sum of the one with the same mode equation (21) and the one with the two separate modes equation (25): where i, j, l = {m, d}. The resulting state is given in the lowest orders of by equation (18) as (in unnormalized form): with |φ d , |φ m defined by equations (26) and (27) with k = m, k = d, which gives us (assuming the condition (24) being valid): corresponding to the case when the photon measured in the channel B was in the state |g m , with |φ defined as: and corresponding to the case when the measured photon was in the mode |g d . In equation (37), the first term ∼ |φ defines the amplitude corresponding to the correct action of the gate, with both photons in the mode |g m , whereas the term ∼ corresponds to one of the photons in the state |g d , that is, the 'wrong' photon entering the channel A. Equation (36) is a mixed state consisting of two incoherent terms. Nevertheless, if assume to be small enough and neglect the terms of the second order in , the result is a pure state |φ m given by equation (37). This latter state contains the successful action of the NS gate |φ but also an amplitude with a single photon in the 'bad' mode ∼ |g d . As one can see from equation (37), despite the fact that this bad photon is in the signal channel (A), it has not been processed correctly. We note also that if the gate action was successful, the energy located in this 'wrong' photon (in the mode |φ d ) remains unchanged, that is, the same as it was before the gate. This can be easily seen from the fact that the part |φ m φ m | of the density matrix corresponds to the measurement outcome with the bad photon localized fully in the channel A and thus not removed by the measurement (in the channel B).
The consideration above remains valid also if two or more photons are disturbed: if the disturbance is small enough, to the first order of it can be represented as the sum of the perturbations of the type considered above, and the general behavior observed by us remains the same.
Thus, we conclude that in the first order in , the gate remains 'neutral' to the action of the small disturbance of a single photon. That is, the photon in the wrong mode remains in the system, but also does not influence the action of the gate in respect to the photons located in the correct mode. The decoherence, which appears in our case because, potentially, one can distinguish between the 'good' and 'bad' modes in the measurement device, has the order of 2 .
In the consideration above, the disturbance is set initially in the auxiliary channel B. The part of this disturbance enters the channel A and, according to said above, remains there, whereas the part remaining in B 'canceled' because measurement makes it incoherent with the rest of the amplitude. It is easy to see that basically the same effect takes place if the disturbance is initially in the channel A. In this case, the part of the amplitude remaining in channel A has the amplitude of the order of whereas the part appearing in B has the order of 2 after the measurement. Both of these cases can be considered as a manifestation of Zeno effect, that is, protection of the mode from being changed by continuous measurements [36][37][38][39]. In our particular case, the action of Zeno effect prevents the disturbance from being scattered into the measured channel B.
This consideration, which we made for the NS gate up to now, is possible to extend to more general networks U in figure 1. For this, it is again enough to consider the disturbance localized in a single photon in one of the channels. That is, initial wavefunction is where |Ψ m (in) contains only the photons in the mode |g m , and only one of the photons in |Ψ d (in) is in the mode |g d . The action of U, according to equations (6) and (7), modifies |Ψ (in) to (before measurements) where Here G is the set of channels which are measured after U whereas G is the set of channels which are not measured after U. Equations (41) and (42) describe rescattering of the photon belonging to the 'wrong' mode |g d into the channels belonging to G (the part of the amplitude proportional to in equation (41)) or into the channels belonging to G (the part of the amplitude proportional to in equation (42)). In equation (41) (42) contains the amplitude, free from the 'wrong' photon, which is processed without mistakes. The density matrix which results from equation (41) after the measurements of channels in G is written as: Similarly to equation (36), the first part includes the undisturbed action of U and the distortions which are added coherently, whereas the second part describes decoherence, which is again of the order of 2 . Exactly in the same way as for the NS gate, the small disturbance can be applied to many photons at once, resulting, in the first orders of , the sum of the independent actions described above. Furthermore, the gate U can be repeated many times. Zeno effect protects the disturbances to enter the modes which are measured, so they remain in the circuit.

Discussions and conclusion
As a conclusion, we investigated the influence of the waveshapes of photons on the LOC circuit performance. A general LOC setup consists of a number of ancilla photons mixed with the signal ones in an interferometric-type network, with the ancilla channels being subsequently measured and photons in them destroyed. The interferometric part of the setup mixes the waveshapes of the 'main' and auxiliary photons, after which the measurement decoherences them. Thus, if one of the photons is in the 'wrong' mode, this leads to appearance of 'which-way' information in the system and thus to decoherence of the resulting wavefunction. Because of this, photons located in indistinguishable modes seem to be the best (and well known) choose.
Here we have demonstrated few another, less obvious, options. First, we have shown that a small perturbation, at least in the first order, does not break the action of circuit. Moreover, due to Zeno effect, decoherence, which should arise after every measurement, is suppressed. Such action of Zeno effect is present even if we do not measure the waveshapes explicitly. This is in contrast to the 'convenient' Zeno effect, where the stabilized state is projected to the explicitly measured eigenfunction. Because of this Zeno action, the disturbed photons can not escape through ancilla channels and remain in the system. Besides, more general states of the 'diagonal' type such as given by equations (30)-(32) also remain intact during propagation through the gate. Such states consist of completely incoherent sum of states, every of them containing all the photons in the same mode.
In the previous consideration, for clarity, we assumed every spatial mode being considered as a separate 'working channel', which can consist many temporal modes, containing possible disturbances. Nevertheless, it is easy to see that the above consideration, with only minor modifications, can be also applied for the case when disturbances can enter not only temporal waveshapes, but also spatial modes. It remains valid also for the recent proposals, where temporal or frequency-based modes are used for LOC. In this case, we must consider the channels as temporal (or frequency) modes, with the perturbations being localized in the spatial modes or in those temporal of frequency modes which do not represent qubits, that is, all 'ballast' modes.