6 FIG. 3: Concurrence as a function of the XPM phase shift for minimal decoherence (dots) and the decoherence model presented in Appendix D (solid line). The logical density matrix elements take the form with Tr$_{E}$ indicating the trace over the environment de- grees of freedom and ρ$_{E}$ (0) the initial state of the envi- ronment. To keep the discussion concise we assume that the photon pulses are very sharp. We then can replace the squares of the wavefunctions by δ distributions and get ρ$_{ij}$$_{;}$$_{kl}$ ( t ) = Tr$_{E}$ $^{(}$ρ$_{E}$ (0) X † $_{kl}$X$_{ij}$ $^{)}$, (31) X$_{ij}$ = c$_{ij}$e − i i (1 − j ) $^{φ$_{2}$}$R$_{1}$ ( v$_{1}$t + δz (1) i , t ) R$_{2}$ ( d + v$_{2}$t + δz (2) j , t ) . (32) ρ$_{ij}$$_{;}$$_{kl}$ ( t ) = c$_{ij}$c ∗ $_{kl}$e − i( i (1 − j ) − k (1 − l )) $^{φ$_{2}$}$N$_{ij}$$_{;}$$_{kl}$ ( t ) , (33) N$_{ij}$$_{;}$$_{kl}$ ( t ) ≡ $^{〈}$R † $_{2}$( d + v$_{2}$t + δz (2) l , t ) R † $_{1}$( v$_{1}$t + δz (1) k , t ) × R$_{1}$ ( v$_{1}$t + δz (1) i , t ) R$_{2}$ ( d + v$_{2}$t + δz (2) j , t ) $^{〉}$. (34) The density matrix elements then become with the Hermitian decoherence matrix In App. C 3) we show that it can be written as which maximize the concurrence C for a consistent den- sity matrix. Fig. 3 shows the concurrence for this min- imal decoherence model as a function of φ$_{1}$ − φ$_{2}$ . The dots are found through a random search for the param- eters N$_{00;11}$ , N$_{01;10}$ , and c$_{n}$ of the minimal decoherence model. Each dot is based on a sample of typically 10 7 random events. The error in each value is estimated to be about 5%. The concurrence decreases with φ$_{1}$ − φ$_{2}$ and becomes zero for φ$_{1}$ − φ$_{2}$ = π . In this case deco- herence completely destroys the entangling capacity of the XPM interaction. The numerically determined den- sity matrix then corresponds to a nearly equal mixture of two highly entangled states. Realistic decoherence mod- els would typically predict a less than optimal perfor- mance. For instance, the blue line in Fig. 3 shows C for the decoherence model of App. D under the fairly opti- mistic assumption Δ vt = 4 √ πw , where w is the width of a Gaussian potential V$_{1}$ ( z ) = V$_{2}$ ( z ) = V (0) exp( − z $^{2}$/w$^{2}$). For more realistic values Δ vt ≫ w [47] the concurrence would be non-zero only in a very narrow range around φ$_{1}$ = φ$_{2}$ . Hence the influence of decoherence in our model can be described by four complex parameters N$_{00;11}$ , N$_{01;10}$ , and c$_{n}$ . This is a consequence of the approximation of very short pulses. For extended pulses additional decoherence contributions are anticipated. N =    1 c$_{2}$ c$_{1}$e i( φ$_{1}$ − φ$_{2}$ ) N$_{00;11}$ c ∗ 2 1 N$_{01;10}$ c$_{1}$ c ∗ $_{1}$e − i( φ$_{1}$ − φ$_{2}$ ) N ∗ 01;10 1 c$_{2}$ N ∗ 00;11 c ∗ 1 c ∗ 2 1    , (35) c$_{n}$ ≡ $^{〈}$R † $_{n}$( v$_{n}$t + δz, t ) R$_{1}$ ( v$_{n}$t, t ) $^{〉}$. (36) Our phenomenological model therefore suggests that a CPG may not be achievable with XPM unless φ$_{1}$ is very close to φ$_{2}$ . In most proposals for XPM based on double EIT this could be achieved by a suitable preparation of the atomic gas, although it may require fine tuning of parameters like magnetic fields or pump field intensities. A better way to achieve φ$_{1}$ = φ$_{2}$ would be to find a system in which this is guaranteed through microscopic symmetries. We again calculate the concurrence of density matrix (33) for the initial product state c$_{ij}$ = 1 2 for all i, j . The specific values of the parameters N$_{00;11}$ , N$_{01;10}$ , and c$_{n}$ depend on the detailed decoherence model that one employs so that the predictions may vary substantially depending on the assumptions behind the model. We present one particular decoherence model in Appendix D. However, all decoherence models must be consistent with all eigenvalues of the density matrix (22) taking val- ues between 0 and 1. The scheme for a QND measurement of the photon number discussed in Sec. III A can easily be extended to the non-unitary case by calculating the measurement signal 〈E$_{1}$ ( z, t ) 〉 using solution (27) instead of (5). The only change is that the measurement result (15) is multi- plied by 〈 R$_{1}$ ( z, t ) 〉 . This factor depends strongly on the specific decoherence model but generally will lead to a decrease in the contrast of the phase measurement. To simplify the discussion we consider the special case φ$_{2}$ = π for the oft-used assumption that the two inter- action potentials V$_{i}$ ( z ) are equal and independent of the group velocities [33, 34] so that V$_{1}$ = V$_{2}$ . The phase fac- tor that appears in the decoherence matrix (35) is then φ$_{1}$ − φ$_{2}$ = π Δ v/v$_{2}$ > 0. For a given value of φ$_{1}$ − φ$_{2}$ we can derive a “minimal decoherence model” by find- ing those values of the parameters N$_{00;11}$ , N$_{01;10}$ , and c$_{n}$ To give a rough estimate we consider the decoherence B. Quantum non-demolition measurement of photon numbers