Optimised generation of heralded Fock states using parametric down conversion

The generation of heralded pure Fock states via spontaneous parametric down conversion (PDC) relies on perfect photon-number correlations in the output modes. Correlations in any other degree of freedom, however, degrade the purity of the heralded state. In this paper, we investigate spectral entanglement between the two output modes of a periodically poled waveguide. With the intent of generating heralded 1- and 2-photon Fock states, we expand the output state of the PDC to second order in photon number. We explore the effects of spectral filtering and inefficient detection, of the heralding mode, on the count rate, g(2) and purity of the heralded state, as well as the fidelity between the resulting state and an ideal Fock state. We find that filtering can decrease spectral correlations, however, at the expense of the count rate and increased photon-number mixedness in the heralded output state. As a physical example, we model a type II PP-KTP waveguide pumped by lasers at wavelengths of 400 nm, 788 nm and 1930 nm. The latter two allow the fulfillment of extended phase matching conditions in an attempt to eliminate spectral correlations in the PDC output state without the use of filtering, however, we find that even in these cases, some filtering is needed to achieve states of very high purity.


Introduction
Pure photon Fock states, in particular, single-photon states, are useful for many quantum-optical applications, including quantum information processing, quantum computing and quantum cryptography [1]. Some novel uses for photon number states include the generation of other non-Gaussian states, such as Schrödinger kitten states [2,3].
A common method for creating single-photon states makes use of spontaneous parametric down conversion (SPDC), where a CW or pulsed laser is used to pump a nonlinear crystal. Due to the nonlinear properties of such a crystal, photons in the pump laser are spontaneously down converted into pairs of lower energy photons. Momentum conservation ensures that the photon wave packets are well localised with respect to each other. The detection of a single photon in one spatial mode (idler) heralds the presence of another single photon in the other spatial mode (signal). In practice, however, given high enough pump power, the presence of higher order photon-number terms in the output state can lead to a photon-number mixed state in the signal mode, when inefficient detectors mistake two (or more) photons for one.
Energy conservation ensures that the frequencies of the downconverted photons always sum to the pump frequency. For CW pumped PDC, these correlations cannot be avoided, but pulsed pump light allows this constraint to be weakened. Strong spectral correlations are another potential source of mixedness -the signal state is projected into a spectrally mixed state when a frequency-insensitive detector heralds a single photon in the signal mode. In the context of single-mode versus multi-mode descriptions [4,5] this property can also be interpreted as projecting the single photon onto different distinguishable broadband spectral modes [6]. In recent years, there has been a growing effort in engineering pulsed SPDC sources to produce photons uncorrelated in frequency, i.e. those with a separable joint spectral amplitude (JSA). Some examples include manipulating the crystal length, material, bandwidth and central frequency [7,8,9,10,11,6,12,13,14,15] as well as filtering the pump field, prior to down-conversion, using an optical cavity [16]. Another promising technique produces a source of counter-propagating photons with a separable JSA [17].
Typical theoretical analyses of multimode effects in PDC truncate the output state to first order in photon number. In this paper, we will extend our analysis to include second-order photon number contributions. We will compare the more humble method of pre-detection filtering, of which the main shortcoming is the loss in the production rate, with a more experimentally challenging approach where the JSA is made as separable as possible by satisfying various phase matching conditions. We find that even if these conditions are fulfilled, some level of filtering is still required in order to achieve states with very high purities. For both methods, we characterise the effects of higher order photon number contributions, on the generation of single-photon states. In addition, we consider the production of two-photon Fock states, conditional on the detection of two photons in the idler mode.
As a practical example, we consider a periodically poled KTP (PP-KTP) wave guide -this eliminates any spatial correlations -pumped by ultrafast optical pulses to ensure that the pairs exhibit tight localisations in time.
This paper is structured as follows. In section 2, we introduce spectral notation for photon states as well as a theoretical model of spectral effects in SPDC. In section 3 we introduce spectral filtering. In section 4 we present analytical results for the probability of detecting a single photon in the heralding detector, the heralded output state, its g (2) and purity, as well as the maximum fidelity between the heralded output state and an ideal pure state. In section 5, we present similar results for the generation of two-photon Fock states. In sections 6 and 7, we illustrate these results using realistic parameters. In section 8 we discuss our results.
Finally, a note on nomenclature. In our theoretical calculations, we have a preference for using frequency (as opposed to wavelength) due to its direct relationship to energy conservation in SPDC, however, we have made an attempt to also present our results in nanometers (nm), for readers who are accustomed to "thinking in wavelengths". All frequencies quoted in this paper are angular frequencies in units of s −1 . When describing Gaussian filters and beam profiles, we will specify the central frequency and Gaussian standard deviation in s −1 as well as the central wavelength and the FWHM in nm.

Parametric Down Conversion
A single-mode PDC can be modeled in the interaction picture, where the evolution of the state vector is given by [18] This gives the output of a PDC ‡, in the number basis, as where κ is the effective nonlinearity and is a function of the pump power and the properties of the nonlinear crystal and t is the interaction time. The output state is correlated in photon number.
To take the spectral properties of the system into consideration, we define the creation operator for a photon with a spectral distribution ψ(ω) as [5,19]: A † ψ satisfies all the standard bosonic commutation relations, such as [Â ψ k ,Â † ψ k ] = δ k,k , where ψ k (ω) and ψ k (ω) are orthogonal spectral functions, i.e. ψ k (ω)ψ k (ω)dω = δ k,k . ‡ Note that a PDC state of one spatio-spectral mode is exactly equivalent to a two-mode squeezed beam.
An n-photon state can be written as We emphasise the distinction between the statesÂ † where the former is a two-photon Fock state and the latter consists of two single-photon Fock states.
For type-II down conversion, where the pump is non-delpleting, i.e. classical, we can take the multimode Hamiltonian to be [20] where V is the spatial mode volume in the waveguide andÊ j (r, t) =Ê j (r, t) are the three interacting fields with j = p, i, s denoting the pump, idler and signal modes respectively.
where α(ω p ) = exp(−(ω p − µ p ) 2 /2σ p ) is the pump envelope function and we have restricted the spatial integral to be over only one dimension, ie. z, and j = i, s. This Hamiltonian does not commute with itself at different times and therefore, the evolution of the state vector should be taken to be where T is the time-ordering operator. U (t) can be expanded into what is known as the Dyson series. This is very challenging, and as an approximation, we will drop the time-ordering operator and expand U (t) as a Taylor series. In the scenario presented in this paper, we do not expect this type of approximation to be problematic, however, we acknowledge that problems may arise when considering input states of a quantum nature, as has been investigated by Leung et al. [21]. A description of multiple pair creation in degenerate SPDC has also been analysed in the Heisenberg picture by Wasilewki et. al [22] and Mauerer [23]. We will assume that A(ω j ) is slowly varying over the frequencies of interest and therefore we can bring it outside of the integral. We can now write where L is the length of the crystal and A = χ (2) A p A(ω i )A(ω s ). For a pulsed laser, we can assume that the pump field, and therefore the interaction Hamiltonian, is zero before t 0 and after t. Therefore we can extend the limits of the integration over time to −∞ and ∞ [24]. Performing the time integral yields 2πδ(ω i + ω s − ω p ) which then allows the ω p integral to be evaluated, giving Evaluating the integral over z yields where Φ(ω i , ω s ) is the phase-matching function where sinc(x) = sin(x)/x and ∆k = k i (ω i )+k s (ω s )−k p (ω i +ω s ). For a periodically poled waveguide of periodicity Λ, ∆k = k i (ω i ) + k s (ω s ) − k p (ω i + ω s ) + 2π/Λ [25]. Note that by picking the spatial integration to be centered around z = 0, it is possible to eliminate a phase term which would normally be present in equation (11). For the experiment, this corresponds to pre-chirping the pump pulse with an adapted phase progression. Following Grice and Walmsley [20], we Taylor expand the phase mismatch to first order such that ∆k ≈ ∆k (0) + k s ν s + k i ν i − k p ν p where ν j = ω j − µ j , k j = ∂k j (ω)/∂ω| ω=µ j and µ j is the center frequency of a photon in mode j. We set µ i = µ s = µ and µ p = 2µ. We can achieve perfect phase-matching by picking Λ such that ∆k (0) = k s (µ s ) + k i (µ i ) − k p (µ p ) = 2π/Λ and therefore ∆k ≈ k s ν s + k i ν i − k p ν p .
To consider contributions from the 2-photon components of the down-converted state, we take the Taylor series expansion of the unitary evolution operator in equation (8) to second order (disregarding the time-ordering operator): This gives the downconverted state where χ = 2πAL/i and N is defined in equation (18). The joint spectral amplitude (JSA) is given by where the normalisation parameter N f is chosen such that dω i dω s |f (ω i , ω s )| 2 = 1. Any well-behaved complex function can always be decomposed in terms of a discrete basis of orthonormal functions (a well known example is the basis of Hermite functions). This is known as the Schmidt decomposition.
where the Schmidt modes ξ k (ω i ) and ζ k (ω s ) are normalised and may be complex and the Schmidt coefficients b k are real and k |b k | 2 = 1, if f (ω s , ω i ) is normalised. It is useful to write the downconverted state in terms of the Schmidt decomposition (refer to Table 1 for creation operator definitions).
where ξ k (ω i ) are the Schmidt modes for the idler state and ζ k (ω s ) are the Schmidt modes for the signal state and Notice, in the four-photon term of equation (17), when two photons are created in the same spectral mode (i.e. k = k ) there will be a factor of √ 2 in front of each two-photon Fock state, increasing the probability of down conversion into such a state. This can be understood due to stimulation effects in the PDC process itself. Equation (17) can also be written as We can characterise the spectral entanglement of the JSA by using the entropy of entanglement [26]. The entropy of entanglement can be defined, for the bi-partite state in terms of the Schmidt values: The entropy of entanglement is valid only for pure bipartite states and, when defined in terms of the Schmidt decomposition, can not be applied to the entire output state in equation (19). However, we can apply it to the two-photon term to get some information |1; τ m s diag. single-photon signal modes about the spectral entanglement arising only from the JSA. The entropy of entanglement ranges from zero for a product state to log 2 N for a maximally entangled state of two Nstate particles, which in our case corresponds to a state containing N orthogonal spectral modes. In the limit of a maximally entangled JSA, the entropy of entanglement would be ∞.

Spectral Filtering
A spectral filter can be modeled as a frequency dependent beam-splitter: where |T (ω)| 2 and |R(ω)| 2 are the transmitted and reflected probabilities and |T (ω)| 2 + |R(ω)| 2 = 1. In addition to the filter, we consider an inefficient detector which we model by a beam splitter of reflectivity 1 − η, followed by a perfect detector (refer to figure  1). If the reflected mode of the filter and the reflected mode of the beamsplitter are to be traced out, the filter-beamsplitter combination can be modeled by a filter with the following transformation: where In terms of the mode functions ζ k , this can be written aŝ where we have defined The definitions in equations (25)-(28) ensure that the creation operators for the filtered modes satisfy the commutation relations [Ĉ T ζ k ,Ĉ † T ζ k ] = 1 and [D Rζ k ,D † Rζ k ] = 1. However, the filtered functions T ζ k (ω s ) no longer define proper modes because the functions ζ k (ω s )T (ω s ) are, in general, not orthogonal to the functions ζ k (ω s )T (ω s ) for k = k and therefore need to be orthogonalised (eg. using the Gram-Schmidt procedure) such that: where φ j (ω i ) are now the new modes defining the idler state and ϕ j (ω i ) are the reflected modes that will be traced out, and The filter relationship in equation (24) can now be written as follows: Because the filter has been modeled as a frequency dependent beamsplitter, it will have similar properties to a beamsplitter. One property, that we will evoke throughout this paper, is the tendency to allow one photon, from an incident two-photon state, to pass through the filter while rejecting the other. Detection of a filtered two-photon state may then result in, even, a perfect detector mistaking it for a one-photon state.

Generating single-photon Fock states
Detection of a single photon in the idler mode heralds the presence of a single photon in the signal mode. In this section, we consider a hypothetical perfect detector, an inefficient detector and a Gaussian spectral filter placed in front of the lossy detector.

Case 1: Perfect Detection in the triggering idler mode
The POVM for a detector that perfectly distinguishes photon number, but gains no information about the frequency of the photon can be written as follows: We can interpret this as: the detection of a single photonâ † (ω)|0 , however due to the lack of spectral knowledge, ω must be integrated over; or alternatively, the detection of a single photon in the spectral mode |1; ξ j , however due to the lack of knowledge about which mode it was in, it is necessary to sum over j. Since photon detection is destructive, the detected mode must be traced out. The probability of detecting a single photon in the idler mode using a perfect single-photon detector (refer to figure 1(a)), is Given a single-photon detection in the idler mode, the heralded signal state is The g (2) of the signal state, which we define as is g (2) = 0. This reveals that there is only one photon in the signal mode, but not how pure it is. The purity of the heralded state is For a state which only contains single photons, i.e. one that is heralded by a perfect detector, the purity is equivalent to the Hong-Ou-Mandel visibility [27].
Without loss of generality, we order the Schmidt coefficients in decreasing order from k = 0. Therefore, the pure single photon state with the highest overlap with the projected state will be the photon mode corresponding to the highest Schmidt coefficent, b 0 , and hence the maximum fidelity with a single photon Fock state is The fidelity does not depend on χ. Increasing the strength of the nonlinearity only has an effect on how often the detector registers a click, however, once that happens, the signal mode is always projected into the same state.

Case 2: Inefficient Detection in the triggering idler mode
An inefficient detector can be modeled by the transformation in equation (23) where T (ω) = √ η and R(ω) = √ 1 − η, followed by a perfect detector (refer to figure 1(b)). After the beam splitter, the joint signal-idler state is where The probability of detecting a single photon in the idler mode, using an inefficient single-photon detector, is Given a single-photon detection in the idler mode, the heralded signal state is where N 1,ineff = N χ √ η/ √ p 1,ineff . The g (2) for this state, defined in equation (37), is where The purity of the signal state is The maximum fidelity, between the heralded state and a pure Fock state |1; ξ j , is

Case 3: Filtering the idler state
We now introduce a filter in the idler mode as shown in figure 1(c). Applying a filter, as defined in equation (24), to the signal mode, gives the filtered state where and u kj and v kj are defined as per equations (31) and (32). The probability of detecting a single photon in the filtered idler mode is where Given a single-photon detection in the idler mode, the heralded signal state is where N 1,filt = N χ/ √ p 1,filt . Note that filtering the idler mode also changes the mode structure of the heralded signal state. The g (2) for this state, defined in equation (37), is where The purity of the heralded state is The density matrix in equation (58) is not diagonal in the |1; ξ k basis, but this can be easily achieved, for the part of the state which is relevant for calculating the fidelity with a single-photon Fock state, giving where and τ m (ω s ) are the new orthogonal modes defining the signal state. The maximum fidelity, between the heralded state and a pure single-photon state |1; τ l , is In an experiment, the spectral distribution τ m should be chosen in any interferometric experiment to optimise for the best performance of the heralded single photons.
In the extreme case whereT (ω) = δ(ω−µ), i.e. the filter picks out a single frequency µ, the fidelity tends to unity and the signal state tends to the pure state as χ → 0. This implies that it is possible to obtain arbitrarily pure single photon states, with the use of spectral filtering and by ensuring the nonlinearity strength is low.

Generating 2-photon Fock states
In addition to creating single-photon states, it is becoming increasingly desirable to create higher photon-number Fock states. In this section we will investigate the effects of detector efficiency, and filtering of the idler mode, on the generation of two-photon Fock states in the signal mode conditional on the detection of heralded two-photon states in the idler mode.

Case 1: Perfect Detection in the triggering idler mode
The projector for detecting two photons in any spectral modes ζ j and ζ j will be separated into two parts: the part which detects two photons in orthogonal modes and the part which detects two photons in the same mode: Refer to the schematic in figure 1(a). The probability of detecting two photons in the idler mode, with a frequency insensitive detector, is Given a two-photon detection in the idler mode, the heralded state in the signal mode is where N 2 = N χ 2 / √ p 2 . The purity is The g (2) for this state is g (2) = 1/2. It is interesting to note that the g (2) does not depend on the purity of the two-photon state. It will always remain at the value of 1/2 regardless of whether the two-photon state is in a Fock state or in some other form. This reflects the fact that g (2) is only sensitive to the photon number, but not the modal properties of the state. The maximum fidelity between the heralded state and an ideal two-photon Fock state |2; ξ j is

Case 2: Inefficient Detection in the triggering idler mode
The probability of detecting two photons in the idler mode, with an inefficient frequency insensitive detector (refer to figure 1(b)), is where ρ ineff is defined in equation (44). Because our analysis only extends to second order in photon-number, the expressions for the fidelity and purity will be the same as they were in section 5.1, where a perfect detector was used. If we included higher order terms, we would expect the fidelity and purity to vary as a function of χ and η in a similar fashion to the single-photon case in section 4.

Case 3: Filtering of the idler state
We now introduce a filter in the idler mode as shown in figure 1(c). After filtering the state, the probability of detecting two photons in the idler mode, with an inefficient frequency insensitive detector, is where ρ filt is defined in equation (51). Given a two-photon detection in the idler mode, the heralded state in the signal mode is where N 2,filt = N χ 2 / √ p 2,filt . Again g (2) = 1/2 as there are always two photons in the state. The purity of the heralded state is The density matrix in equation (78) is not diagonal in the |1; ξ k basis. This can be easily achieved, giving where |1; τ m is defined in equation (64). The maximum fidelity, between the heralded state and a pure two-photon state with an optimised spectral distribution function |2; τ l , is In the extreme case whereT (ω) = δ(ω − µ), i.e. the filter picks out a single frequency µ, the fidelity tends to unity and the signal state tends to the pure state as χ → 0. This implies that it is possible to obtain arbitrarily pure two-photon states, with the use of spectral filtering and by ensuring the nonlinearity strength is low.

Physical example I -correlated JSA
As a physical example, we model a type II PP-KTP waveguide of length L = 3.6 mm and a periodicity of Λ = 8.8 µm, pumped with a 400 nm laser with a 1nm FWHM (σ p = 5.00×10 12 s −1 ) which down converts to 800 nm in the signal and idler modes.
In figure 2 (a)-(c), we have plotted the pump function, the PMF and the JSA for the given parameters. Figure 2 (d) shows the corresponding Schmidt modes: initial signal modes and initial idler modes. In addition, it can be seen that after filtering the idler state, the idler Schmidt modes take on different spectral shapes. These filtered idler modes are no longer orthogonal to each other and therefore need to be orthogonalised giving the orthogonalised idler modes. When the idler mode is detected, the signal state gets projected into a mixture of orthogonal modes, as shown by the diagonalised signal modes. Filtering and detection of the idler state changes the spectral shape of the signal state even though there is no physical interaction. This is a typical effect of entanglement.
In general, the Schmidt decomposition can not be found analytically, but can be calculated numerically by computing the singular value decomposition of a discretised JSA. Unless stated otherwise, the results in this section were obtained using an 800×800 grid, ranging over 0.2 × 10 15 s −1 , centered around ω i = ω s = µ. We note that an insufficiently fine grid, or insufficiently large region, will result in inflated values for the purity. The entropy of entanglement for this particular JSA is E = 4.6.
In this section we present results for: the probability of detecting a single photon in the idler mode; the g (2) and purity of the heralded state in the signal mode; and the fidelity between the signal state and the desired ideal Fock state. We compare results for: an unfiltered idler state; an idler state filtered with a Gaussian filter T (ω i ) = exp(−(µ f − ω i )/2σ 2 f ), of various widths σ f and centered at the central idler frequency, where the filter function has been scaled such that the maximum value is always 1; as well as the limiting case where T (ω i ) = δ(ω i − µ f ). We also present similar results for heralding a two-photon state conditional on the detection of two photons in the idler mode. The resulting JSA f (ω i , ω s ) = α(ω i + ω s )Φ(ω i , ω s ). The JSA has been plotted as a function of the frequency, however corresponding values for the wavelength have been included. (d) Schmidt numbers and modes for the JSA (top to bottom): the first 20 Schmidt numbers b k ; the first 5 Schmidt modes ξ k (ω s ) for the signal state; the first 5 Schmidt modes ζ k (ω i ) for the ilder state, as well as a Gaussian filter function of width σ f = 2×10 12 s −1 (dashed line); the filtered Schmidt modes T (ω i )ζ k (ω i ) for the idler state; the othogonalised idler modes φ j (ω i ); the diagonalised signal modes τ m (ω s ) 6.0.1. Generating single-photon Fock states Due to the second-order truncation of the PDC output state, we are not considering 6-(or higher) photon contributions. At χ = 0.5, the fraction of 6-photon states, to 2-photon states, would roughly be χ 6 /χ 2 = 1/16. We will not plot results beyond that.
In figure 3 (a), we have plotted the probability of detecting a single photon in the idler mode as a function of the nonlinearity χ and the efficiency of the detector η. Notice that the probability of detecting a single photon in the idler mode increases with higher detector efficiency and higher nonlinearity strength, as expected.
The fidelity has been plotted in figure 3 (b). The inclusion of a filter has a drastic effect on the fidelity. It has a greater dependence on the strength of the nonlinearity, than in the unfiltered case, however the overall fidelity is much higher. Notice as well that there is a trade off between the fidelity and the probability of detection.
In figure 3 (c), we have plotted the g (2) for the heralded state in the signal mode. Note that, for visual clarity, the figure orientation has been rotated by π around the z−axis, with respect to the other plots. It is useful to know that g (2) = 0 for a singlephoton state and 1/2 for a two-photon state. A curious thing is that decreasing the filter width results in higher fidelities, despite the higher proportion of two-photon states, as shown by the g (2) . This suggests that for this particular JSA, the dominant cause of impurity is the spectral entanglement, rather than the resulting photon-number mixture due to the presence of higher-order terms.
In figure 3 (d), we have plotted the purity of the state in the signal mode. Due to the 4-fold summation, the purity for the filtered case is very demanding computationally, therefore, we have only included examples of two filter widths. Results for the filtered case were computed using a 600×600 grid, ranging over 0.16×10 15 s −1 , centered around ω i = ω s = µ, and truncating b k with values below 10 −2 .
To achieve a fidelity of F = 0.95, using a heralding detector with efficiency η = 0.5, we could choose from a range of filter widths at different nonlinearity strengths. Different combinations, however, result in slightly different probabilities of success. Figure 4 (a) shows the probability of success, and required nonlinearity, for a number of filter widths. 6.0.2. Generating 2-photon Fock states At χ = 0.25, the fraction of 6-photon states, to 4-photon states, would roughly be χ 6 /χ 4 = 1/16. We will not plot results beyond that. Figure 5 (a) shows the probability for an inefficient detector to detect two photons in the idler mode. The corresponding fidelities and purities have been shown in figure  5 (b) and do not vary as a function of χ and η.

Physical example II -group velocity matching
In this section, we will examine particular phase matching conditions which result in a less entangled JSA, and therefore a more pure heralded Fock state. It is common to approximate the phasematching function as Φ(ω i , ω s ) = exp(−γL 2 ∆k 2 /4) where γ ≈ 0.193. By making this approximation, we can write the JSA as In order to make equation (87) separable, we require all "cross-terms", i.e. terms which contain products of ω i and ω s to vanish. This occurs when the condition 2 is met, yielding a JSA of the form f (ω i , ω s ) ∝ f i (ω i )f s (ω s ) [6]. One way to satisfy the condition in equation (88) is to set k p = (k s + k i )/2, which results in the following condition for the length of the waveguide, as a function of the pump width: These conditions generate a symmetric JSA, where both signal and idler modes have equal widths. Alternatively, rearranging equation (88) as follows we can see that by making L << σ −1 , i.e. L → ∞ and setting k p = k s , we can also obtain a separable JSA. These conditions generate an asymmetric JSA [6].
We have made use of the Gaussian approximation for Φ(ω i , ω s ) to obtain the conditions for separability, however we will now input these conditions into the original sinc form of the function. This analysis will not result in completely pure states being generated, however it should correspond more closely to experimental observations.

Symmetric JSA
In order to meet the extended phase matching conditions for a symmetric, separable JSA, we again model a type II PP-KTP waveguide, now of length L = 24.2 mm and a periodicity of Λ = 68.4 µm, pumped with a 788 nm laser with a 0.7nm FWHM (σ p = 0.9×10 12 s −1 ) which down converts to 1576 nm in the signal and idler modes. Unless stated otherwise, the results in this section were obtained using an 800 × 800 grid, ranging over 0.06 × 10 15 s −1 , centered around ω i = ω s = µ. Figure 6 shows the JSA and the corresponding Schmidt values and modes. Notice in the Schmidt decomposition that the first mode is much more dominant than it was in section 6. The entropy of entanglement for this JSA is E = 0.88. If we had used the Gaussian approximation for Φ, the JSA would decompose into one pair of Schmidt modes and the entropy of entanglement would be E = 0. In such a case, the four-photon term would would consist only of two-photon Fock states.
As an intuitive guide to why the above conditions generate the given JSA, notice that varying the parameter ∆k has the effect of changing the gradient of the phase matching function Φ(ω i , ω s ) (see figure 6 (b)), rotating it around ω i = ω s = µ while changing the parameter L, alters the width of the phase matching function. The goal is to pick ∆k, and therefore k p , and L such that the phase matching function is perpendicular, and of equal width, to the pump function.
As in the previous section, we present results for the probability, purity, g (2) and fidelity, for the heralding of one and two photon Fock states. For a realistic JSA,     shows the fidelity. We distinguish between these surfaces by referring to their values at the point χ = 0 and η = 0. Immediately we can see that the fidelity is much higher than in section 6. In the region of interest, filtering the idler mode increases the fidelity of the signal state with a single photon. Decreasing the filter width can be detrimental to the fidelity when the nonlinearity and the detector efficiency are high. Figure 7 (c) shows the g (2) and figure 7 (d) shows the purity of the state in the signal mode. Again, we will distinguish between these surfaces by referring to their values at the point χ = 0 and η = 0. Results for the filtered case were computed using a 600×600 grid, ranging over 0.06 × 10 15 s −1 , centered around ω i = ω s = µ, and truncating b k with values below 10 −2 . Figure 4 (b) shows the probability of success, and required nonlinearity, for a number of filter widths, in order to achieve a fidelity of F = 0.95, using a detector with efficiency η = 0.5. Note that while the probability of success is greatly enhanced by using a source engineered state, the required pump powers are nearly the same. Also notice the "flat" region, where the probability does not change much, between σ f = 0.6 × 10 12 s −1 and 0.7 × 10 12 s −1 . This corresponds to the "dark" region between the lobes on the JSA. Over this region, we do not expect much change in the flux. Figure 8 (a), shows the probability for an inefficient detector to detect two photons in the idler mode. The corresponding fidelities and purities have been shown in figure 8 (b). The fidelity and purity do not vary as a function of χ and η.

Asymmetric JSA
In order to meet the extended phase matching conditions for an asymmetric separable JSA, we again analyse a type II PP-KTP waveguide, of length L = 80 mm and a periodicity of Λ = 232 µm, pumped with a 1.93 µm laser with a 3nm FWHM (σ p = 0.64×10 12 s −1 ) which down converts to 3.85 µm in the signal and idler modes. We note that single-photon detection is not particularly practical at this wavelength, however for consistency, we have chosen to use a PP-KTP waveguide throughout this paper. The same JSA can be achieved in different systems, at more practical wavelengths. See, for example, Mosley et al. [14]. Unless stated otherwise, the results in this section were obtained using an 800 × 800 grid, ranging over 8×10 12 s −1 , centered around ω i = ω s = µ. Figure 9 shows the JSA and the corresponding Schmidt values and modes. Notice in the Schmidt decomposition that the first mode is even more dominant than in the symmetric case. The entropy of entanglement for this JSA is E = 0.37.
Setting k p = k s generates a vertical phase matching function. As long as the waveguide is sufficiently long, and therefore, the width of the phase matching function sufficiently thin, and the pump is sufficiently wide, the result will be a vertical, almost elliptical and very thin JSA.
As in the previous section, we present results for the probability, purity, g (2) and fidelity, for the heralding of one and two photon Fock states. Although it is possible to achieve purities arbitrarily close to unity by increasing the length of the waveguide, the vertical orientation of the JSA places it in a unique position to take advantage of spectral filtering. We will once again compare results for: an unfiltered idler state; The JSA has been plotted as a function of the frequency, however corresponding values for the wavelength have been included. (d) Schmidt numbers and modes for the JSA (top to bottom): the first 20 Schmidt numbers b k ; the first 5 Schmidt modes ξ k (ω s ) for the signal state; the first 5 Schmidt modes ζ k (ω i ) for the ilder state, as well as a Gaussian filter function of width σ f = 100 ×10 9 s −1 (dashed line); the filtered Schmidt modes T (ω i )ζ k (ω i ) for the idler state; the othogonalised idler modes φ j (ω i ); the diagonalised signal modes τ m (ω s ) an idler state filtered with a Gaussian filter T (ω i ) = exp(−(µ f − ω i )/2σ 2 f ), of various widths σ f and centered at the central idler frequency; as well as the limiting case where T (ω i ) = δ(ω i − µ f ). Figure 10 (a) shows the probability of detecting a single photon in the signal mode. Since most of the photons will have spectral distributions within the filter width, we do not see a very big drop in the probability with filtering, until the filter is so narrow that it cuts into the central lobe. Figure 10 (b) shows the fidelity. We will distinguish between these surfaces by referring to their values at χ = 0.5 and η = 1. Again, filtering the idler mode increases the fidelity of the signal state with a single photon in the low-χ and low-η regimes. Figure 10 (c) shows the g (2) and figure 10 (d) shows the purity of the state in the signal mode. Again, we will distinguish between these surfaces by referring to their values at the point χ = 0.5 and η = 1. Results for the filtered case were computed using a 600 × 600 grid, ranging over 8×10 12 s −1 , centered around ω i = ω s = µ, and truncating b k with values below 10 −2 . Figure 4 (c) shows the probability of success, and required nonlinearity, for a number of filter widths, in order to achieve a fidelity of F = 0.95, using a heralding detector with efficiency η = 0.5. Note that, as with the symmetric case, while the probability of success is greatly enhanced by using a source engineered state, the required pump powers are nearly the same. Also notice the "flat" region, where the probability does not change much, between σ f = 0.3 × 10 12 s −1 and 0.35 × 10 12 s −1 . This corresponds to the "dark" region between the lobes on the JSA. Over this region, we do not expect much change in the flux.  Figure 11. (a) The probability of detecting two photons in the idler mode for (top to bottom): no filter; σ f = 150×10 9 s −1 ; σ f = 100×10 9 s −1 ; σ f = 50×10 9 s −1 . Note that the probability is plotted on a log scale. (b) The purity and fidelity of the signal state with an ideal Fock state.

Discussion
We have calculated the spectrally entangled output state of a parametric down converter to second order in photon number, with the goal of generating heralded one-and twophoton Fock states in one spatial mode (signal), conditional on the detection of one or two photons in the other spatial mode (idler). We have presented analytical expressions for the heralded state after the idler mode is spectrally filtered using a Gaussian filter and detected with an inefficient detector. The heralded signal state was then characterised by its g (2) and purity. In addition, we calculated the fidelity of the heralded state with the desired ideal Fock state.
As a physical example, we modeled a type II PP-KTP waveguide, pumped by lasers at wavelengths of 400 nm, 788 nm and 1.93 µm. We found that in the first example, where no effort was made to perform any extended phase matching conditions, the results were states with very low purity. After strong spectral filtering, Fock states with arbitrarily high purity could be achieved, however at very low probabilities of success. To achieve a fidelity of F = 0.95 for a single-photon state, using a heralding detector with efficiency η = 0.5, the probability of success would be on the order of 10 −4 .
The latter two examples, where extended phase matching conditions were fulfilled, resulted in much higher purity states, however, some additional filtering was still required to achieve very high purity states. Both the symmetric and asymmetric examples were able to achieve a fidelity, with a single-photon Fock state, of F = 0.95, using a heralding detector with efficiency η = 0.5, with probabilities of success on the order of 10 −2 . High purity two-photon Fock states were also possible. While results were comparable for the symmetric and asymmetric examples, this was due to our choice of physical parameters. The asymmetric case would be able to achieve higher fidelities, with no filtering, by choosing a longer waveguide.

Acknowledgments
AMB acknowledges useful discussions with Alessandro Fedrizzi, Andreas Christ, Andreas Eckstein and Kaisa Laiho. We acknowledge the financial support of the Future and Emerging Technologies (FET) programme within the Seventh Framework for Research of the European Commission, under the FET-Open grant agreement CORNER no. FP7-ICT-213681.