7 model of App. D in which the noise is generated by an environment consisting of a harmonic oscillator field with a flat frequency distribution. We then have The decoherence amplitude 〈 R$_{i}$ ( z, t ) 〉 can vary between the optimal value 1, if the interaction potential V ( z ) = V$_{1}$ ( z ) = V$_{2}$ ( z ) vanishes at the origin, and very small val- ues for a sharply peaked potential. We remark that this result also demonstrates the necessity of a non-local po- tential to avoid the diverging quantum fluctuations in the case V ( z ) ∝ δ ( z ) [35]. knowledges support from the Russian Foundation of Ba- sic Research under grant # 08-07-00449. It is instructive to evaluate this for a Gaussian poten- tial V ( z ) = V (0) exp( − z $^{2}$/w$^{2}$) where V (0) > 0 and the width w should be not substantially larger than an atom. We then find φ$_{1}$ − φ$_{2}$ ≈ √ πV (0) w/η so that 〈 R$_{i}$ ( z, t ) 〉 = exp$^{(}$ − η 4 v$_{i}$ v$_{3}$$_{−}$$_{i}$ Δ v t V (0)$^{)}$ . (37) 〈 R$_{i}$ ( z, t ) 〉 ≈ exp$^{(}$ − φ$_{1}$ − φ$_{2}$ 4 √ π v$_{i}$ v$_{3}$$_{−}$$_{i}$ Δ v t w ) . (38) FIG. 4: The function θ$_{i}$ ( z$_{1}$, z$_{2}$ ) for a Gaussian potential V$_{i}$ ( z ) of width r . Appendix A: Useful commutation relations In this appendix we will summarize a number of com- mutation relations that will be useful in deriving our main results. The first factor is proportional to the XPM phase shift difference. The last factor Δ v t/w is typically much larger than one because the length Δ v t must be larger than the width of the light pulses ( t is the time needed for one pulse to overtake the other). Hence, for very short (femtosecond) pulses the exponential may be of the same size as the XPM phase shift. Typically, however, it will be much larger. We therefore conjecture that for the QND measurement to be successful the XPM phase shifts φ$_{i}$ in the two light pulses must also be nearly equal. The effect of XPM on the pulse propagation is gov- erned by the action of the unitary operators U$_{i}$ = U$_{i}$ ( z, t ) of Eq. (6) on the field operators, The effect of XPM on the annihilation operator for photons in mode i can be derived from the commutation relations In this paper we have devised a scheme to generate a uniform XPM for quantum information processing and applied it to characterize the fidelity of a QND mea- surement of the number of photons in a light pulse and the performance of a deterministic CPG. The analysis is based on a regularized quantization (2) of a common phenomenological model for the classical XPM effect be- tween two light pulses with different group velocities. When the pulses overtake each other while traveling through a nonlinear medium the induced XPM phase shift φ$_{i}$, i = 1 , 2 , is uniform over each pulse. For φ$_{1}$ = φ$_{2}$ the dynamics is unitary and predicts perfect fidelities for QND measurement and CPG. For φ$_{1}$ = φ$_{2}$ a decoherence effect must be introduced to keep the model consistent, and this decoherence significantly affects the fidelity of the gate and the QND measurement. with ˜ a$_{i}$ [ u ; z, t ] of Eq. (11). U † i E$_{i}$ ( z $^{′}$, 0) U$_{i}$ = E$_{i}$ ( z $^{′}$, 0) exp $^{(}$− i η v$_{3}$$_{−}$$_{i}$ v$_{i}$ − v$_{3}$$_{−}$$_{i}$ × θ$_{3}$$_{−}$$_{i}$ ( z − z ′ − v$_{3}$$_{−}$$_{i}$t, ( v$_{i}$ − v$_{3}$$_{−}$$_{i}$ ) t ) $^{)}$, (A1) U$_{i}$ E$_{i}$ ( z $^{′}$, 0) U † i = E$_{i}$ ( z $^{′}$, 0) exp $^{(}$i η v$_{3}$$_{−}$$_{i}$ v$_{i}$ − v$_{3}$$_{−}$$_{i}$ × θ$_{3}$$_{−}$$_{i}$ ( z − z ′ − v$_{3}$$_{−}$$_{i}$t, ( v$_{i}$ − v$_{3}$$_{−}$$_{i}$ ) t ) $^{)}$. (A2) [ a$_{i}$ [ u ] , E † $_{i}$( z, 0)] = √ ηψ ∗ $_{i}$( z − u ) , (A3) U † i ( z, t ) a$_{i}$ [ u ] U$_{i}$ ( z, t ) = ˜ a$_{i}$ [ u ; z, t ] , (A4) and V. CONCLUSION Appendix B: Simplification of the phase shift Acknowledgments If the potential V$_{i}$ ( z ) has a finite range r , so that it vanishes for | z | > r , then θ$_{i}$ ( z$_{1}$, z$_{2}$ ) has generally a shape similar to Fig. 4. It is essentially zero outside the “edges” depicted in the figure and has an extended plateau be- tween the lines z$_{1}$ = 0 and z$_{1}$ = z$_{2}$ . The value on the plateau is given by sign( z$_{2}$ ) V$_{i}$ , with V$_{i}$ defined in Eq. (14). We thank A. I. Lvovsky for helpful discussions. This work has been supported by NSERC, iCORE, and Quan- tumWorks. B. C. S. is a CIFAR Associate. S. A. M. ac-