Quantum optical realization of arbitrary linear transformations allowing for loss and gain

Unitary transformations are routinely modeled and implemented in the field of quantum optics. In contrast, nonunitary transformations that can involve loss and gain require a different approach. In this theory work, we present a universal method to deal with nonunitary networks. An input to the method is an arbitrary linear transformation matrix of optical modes that does not need to adhere to bosonic commutation relations. The method constructs a transformation that includes the network of interest and accounts for full quantum optical effects related to loss and gain. Furthermore, through a decomposition in terms of simple building blocks it provides a step-by-step implementation recipe, in a manner similar to the decomposition by Reck et al. [Reck et al., Phys. Rev. Lett. 73, 58 (1994)] but applicable to nonunitary transformations. Applications of the method include the implementation of positive-operator-valued measures and the design of probabilistic optical quantum information protocols.


I. INTRODUCTION
Transformations between sets of orthogonal input and output modes are ubiquitous in optics and quantum information technology. In particular, linear transformations between the amplitudes of the input and output modes are used to perform a variety of tasks, e.g. to operate single qubit gates or to model the action of physical elements such as beam splitters [2]. Mathematically, a linear transformation can be expressed as a transformation matrix T relating the mean fields of the m optical input modes 1in...min with those of the n optical output modes 1out...nout: Among such transformations, unitary optical networks, for which T is a unitary matrix that also relates the annihilation operators themselves and not only their expectation values, are routinely used in optical quantum information processing. Unitary networks conserve the number of photons and their implementation in terms * n.tischler@griffith.edu.au † carsten.rockstuhl@kit.edu ‡ karolina@fizyka.umk.pl of basic building blocks, namely phase shifters acting on individual modes and beam splitters mixing two modes at a time, is well understood [1,3]. However, as unitarity imposes restrictions on the transformation matrix, unitary networks can be considered as a special case of linear networks. Relaxing the restrictions unlocks fascinating opportunities for new transformations, including the options of loss and gain [4][5][6][7][8][9][10][11][12][13][14]. One noteworthy class of such networks consists of asymmetric nonunitary beam splitters, which can allow highly tunable quantum interference [14]. Among the symmetric beam splitters, an example of a nonunitary beam splitter that has attracted particular interest is the 2 × 2 transformation given by the matrix 6,8,12,13]. A device with this action can be thought of as a lossy beam splitter. It exhibits a striking, apparently nonlinear, behavior when one photon is incident on each input: either both photons are or neither of them is lost. Even though the initial interest in devices such as this one was primarily theoretical, the technical capabilities in the design and fabrication of novel and nanostructured materials are now making elements with such properties possible [12,13,[15][16][17][18]. Nonunitary transformation matrices also prove useful in modeling the inevitable imperfections of real optical elements that show a wavelength dependent behavior [4]. A further reason for stepping outside the framework of unitary networks is that transformations may have an unequal number of arXiv:1712.01413v2 [quant-ph] 15 Apr 2018 input and output modes of interest, a clear indicator of nonunitarity. Two particularly simple examples are Yjunctions in integrated optics and absorptive polarizers, which feature two orthogonal input modes but only one output mode.
For a quantum optical description of such transformations, the relationship of Eq. (1) does not suffice. Additionally, a relationship between annihilation and creation operators is required. It would be tempting to simply drop the expectation values in Eq. (1), but the modes associated with nonunitary networks would generally not fulfill the required bosonic commutation relations. Hence, we will from now on drop the expectation values and take T to be a transformation between the annihilation operators of interest with the understanding that it is an incomplete transformation: ancilla modes need to be introduced in the mathematical description to faithfully reproduce or predict the full quantum optical transformation. Although this is straightforward for the simple examples of Y-junctions and polarizers, a systematic method to deal with larger scale problems would be desirable.
In this paper we investigate whether such a strategy is possible for all linear transformation matrices, how many ancilla modes are needed for any given case, and how a full enlarged quantum optical network can be mathematically represented and physically realized. Related problems have been previously studied in a number of works. In Refs. 9 and 10 Miller shows how to construct universal linear transformation machines in a classical optics picture where the mean fields are of interest, so that a modulation of field amplitudes is possible without the need to take into account quantum optical effects. The Bloch-Messiah reduction also shows how a decomposition into basic building blocks can be found and it does include a rigorous quantum optical description. However, it already starts with the complete transformation matrix respecting bosonic commutation relations (a linear unitary Bogoliubov transformation), rather than a partial network [19]. Allowing nonunitary partial networks as an input, He et al. and Knöll and coworkers present techniques to find corresponding enlarged transformations, but they do not allow for transformations that include both loss and gain [5,7,20].
In this article we put forward a systematic method for dealing with linear transformation matrices of any size, allowing for the option of loss and gain. The method combines a singular value decomposition of the partial network and the single mode treatment presented in Ref. 21 to provide full information about the transformation, so that the quantum optical output state can be calculated for any input state. In addition, as a generalization of the seminal decomposition in Ref. 1 or the more recent variant of Ref. 3 to nonunitary networks, our method shows how to realize transformations in terms of the basic building blocks of phase shifters, beam splitters, and parametric amplifiers.
We discuss possible applications of nonunitary net-works, which include the implementation of positiveoperator-valued measures (POVMs) and probabilistic optical quantum information protocols. The physical realization of small circuits could be achieved with bulk optics, whereas integrated optics would be naturally suited as a platform for larger scale networks. In the appendix we demonstrate the method on several examples, including the lossy beam splitter with apparent nonlinear action described earlier. The lossy beam splitter example illustrates how devices made of exotic materials can be replaced by standard optical circuits.

II. RESULTS
We begin by outlining the basic structure of the method, illustrated in Fig. 1. Starting with the partial network T , a singular value decomposition is performed, which yields three main components, U , D, and W . The singular value decomposition is particularly useful as each main component is well suited to be further decomposed into a sequence of operations in the form of simple building blocks. Each of these building blocks corresponds to a physical operation and has a known complete quantum optical description.
Importantly, since U and W are unitary, they can physically be implemented with phase shifters and beam splitters using the techniques of Refs. 1 or 3. These two main components only involve the nominal modes and can be understood as an initial conversion from the input modes to another basis, the modulation basis, and a final conversion from the modulation basis to the output modes. The modulation takes place in D, the second main component, and includes interactions with ancilla modes. Specifically, each operation here corresponds to a singular value, and each singular value different from one results in the interaction of a nominal mode with a vacuum ancilla, either through a beam splitter or a parametric amplifier.
Combining all of the individual operations provides the quantum optical description of the overall transformation, which we denote by S total .

A. Preliminaries
As a basis for the detailed description of the method in Section II B, it is useful to first establish some terminology and a single-mode framework after Ref. 21, i.e. the case with a single nominal input mode and a single nominal output mode. In the general multi-mode treatment put forward in the present article, we will make extensive use of these basic single-mode tools.

Quasiunitarity
where G is defined as the 2N × 2N diagonal matrix with the first N diagonal elements equal to 1 and the last N diagonal elements equal to −1 [21,22].

Properties of partial and full transformations
The input into the method is the partial network T , a complex matrix of any size without any conditions on its elements. We call T a partial network because in general, T on its own is not enough to predict the quantum optical output for an arbitrary input. For instance, the noise due to vacuum fluctuations in ancilla modes is neglected, and this noise impacts quantum properties of light such as the degree of squeezing. One of the aims of the method is to construct another network, S total , which contains T as its upper left block and includes the ancilla modes so that it can be used as a quantum optical model of the transformation T (Fig. 2). The matrix S total relates the input and output creation and annihilation operators in the following way: It is 2N × 2N -dimensional, where in general N ≥ max (m, n) due to the possible inclusion of ancilla modes. A requirement on S total is that it must fulfill the quasiunitarity equation (2) so that its modes are bosonic, i.e. the creation and annihilation operators fulfill the standard

bosonic commutation relations
The reason that creation operators are included in the description is that active elements associated with gain lead to a coupling of creation and annihilation operators. In fact, whether the transformation contains only passive elements or includes active elements can be recognized based on the off-diagonal blocks of S total when viewed as a 2 × 2 block matrix: a passive transformation has zeros for these blocks.

Single-mode loss
A single lossy channel characterized by T = σ where σ ∈ R, 0 ≤ σ < 1, can be implemented using a lossless beam splitter with an ancilla modeâ 2 initialized in its vacuum state. The transformation of the modes is then generated by a beam splitter HamiltonianĤ = iφ â † 1â 2 −â † 2â 1 , with cos φ = σ and sin φ = √ 1 − σ 2 representing the transmission and reflection amplitudes of the beam splitter, respectively. The connection between this Hamiltonian and the corresponding transformation matrix is described in Ref. 21, pp. 1215-1216. (see also [23]) Step 1: SVD, buffering Step 2: subdecomposition Steps 3&4 Step 5: evaluating product Figure 3. Overview of the method. Starting with T , a singular value decomposition followed by a padding with identity matrix elements to make all components the same size, provides the main components U , D, and W . In Step 2, a further decomposition of U and W into simple blocks is found through the technique in Ref. 1 or Ref. 3, and D is written as a product of single-mode modulations. For each of these, a corresponding enlarged transformation is determined in Steps 3 and 4. Finally, the overall transformation S total is obtained as the product of all the individual transformations.

Single-mode gain
Similarly, for a single channel with gain given by T = σ where σ ∈ R, σ > 1, we introduce an ancilla modeâ 2 , initially in vacuum. Gain can be realized with a parametric amplifier with a HamiltonianĤ can be constructed as described in Ref. 21, p. 1217.

Single-mode phase shift
Complex transformations involve phase shifts T=e iϕ (ϕ ∈ R) for which no ancilla mode is required. The Hamiltonian isĤ = −ϕâ † 1â 1 , and the transformation takes the simple form of B. Method The method consists of the steps illustrated in Fig. 3 and described below: Step 1, singular value decomposition of T : A singular value decomposition provides the main components where U and W are unitary matrices and D is a diagonal matrix with non-negative real diagonal elements.
Step 1b, if T is not square: The method can be applied to transformations of arbitrary dimensionality, including those given by non-square matrices. Such transformations apparently correspond to unequal numbers of input and output modes, which is an incomplete description in quantum mechanics as it can neglect necessary sources of quantum noise. For this reason, nonsquare transformations definitely require either ancilla input modes or ancilla output modes, so that the number of inputs matches the outputs. On top of that, both square and non-square transformations may require what we will refer to as full ancilla modes, which will be discussed later on.
A singular value decomposition of a non-square n × m matrix provides a square n × n matrix U , a diagonal n × m matrix D, and another square m × m matrix W . The impact of the missing input or output modes can be naturally taken into account through augmentation of the matrices U , D, and W to the max (m, n)×max (m, n) size, by padding them with the corresponding elements of the identity matrix as the last rows and columns where required. The following steps 2-5 should be applied to the augmented matrices, which we will still call U, D, W for simplicity.
An example of an application of the method to a nonsquare matrix is shown in Appendix C 1.
Step 2, subdecomposition of all three matrices: We further decompose the two unitary matrices U and W by the established methods of Ref. 1 or Ref. 3, and thereby write the main components as the products U = i U i , and W = k W k , respectively. All of the matrices U i and W k correspond to simple physical operations of phase shifters and beam splitters. The diagonal matrix D can be decomposed into a product of matrices D = j D j , where each D j is the identity matrix with element (j, j) replaced by D j,j . Overall, we obtain Step 3, determining the dimensionality of the enlarged system and assigning modes: The dimensionality of the enlarged matrices is 2N ×2N , with N given by N ≡ n N + n A , where n N ≡ max (m, n) is the number of nominal modes, i.e. the number of modes explicitly included in T , and n A is the number of singular values of T not equal to 1. Modes 1 to n N are associated with the nominal modes, while modes n N + 1 to N are associated with full ancilla modes, by which we denote those modes that are added throughout the whole transformation, not just as inputs or outputs to match the number of input and output modes, as described in Step 1b. Each nominal mode j has its own corresponding ancilla mode m Aj if the j th singular value of T differs from 1.
Step 4, finding associated quasiunitary matrices: We construct a matrix S Ui for each U i and similarly, a matrix S Wk for each W k . S Ui and S Wk are defined as respectively, with U i and W k being the n N ×n N matrices from Step 2, I nA being the n A × n A identity matrix, and the 0s being matrices of the appropriate size filled with zeros. In addition, we construct a matrix S Dj for each D j . For the special case that the j th singular value σ j = 1, S Dj is the N × N identity matrix and therefore not needed. Otherwise, if σ j = 1, the matrix S Dj is the N ×N identity matrix with the elements corresponding to the intersection of rows and columns j, m Aj , j + N, m Aj + N replaced by if σ j < 1, and if σ j > 1. This also allows dealing with transformations that combine loss in some modes with gain in others, which previously proposed methods did not accommodate. An example can be found in Appendix B 2.
Step 5, multiplication of quasiunitary matrices to obtain the overall transformation: We obtain the overall enlarged transformation as A proof that S total fulfills the quasiunitarity equation (2) and contains T as its upper left block can be found in Appendix A, and an example decomposition is shown in Appendix B 1. Implementation of the decomposition in terms of simple building blocks The full decomposition S total = ijk S Ui S Dj S Wk provides a recipe for an implementation in terms of the simple building blocks of phase shifters, beam splitters, and parametric amplifiers, as each of the matrices in the decomposition directly corresponds to such a building block. The factors S Ui and S Wk correspond to beam splitters and phase shifters involving the nominal modes, i.e. the first n N modes. The factors S Dj that differ from the identity correspond to beam splitters and parametric amplifiers, each involving one of the nominal modes and one of the full ancilla modes.

III. DISCUSSION
Section II has shown how a full enlarged quantum optical network can be mathematically represented and physically realized. Now we are also in a position to answer the remaining questions from the introduction. Contrary to conclusions of earlier works devoted to setups with either loss or gain alone, any transformation is available. The decomposition works for all linear networks as an input, since a singular value decomposition can be performed for any complex matrix. This means that in principle any transformation can be realized, even if the practical implementation of arbitrary two-mode squeezing is technically challenging [24].
The number of required ancilla modes is tied to the dimensionality of T if it is not square, as well as to its singular values. A non-square n × m transformation T leads to (m − n) output ancilla modes if m > n, or to (n − m) input ancilla modes if n > m. In addition to these input or output ancilla modes, full ancilla modes are introduced, and their number is equal to the number of singular values of T that are not equal to 1. Each singular value below (above) 1 entails a beam splitter operation (parametric amplification) with such an ancilla mode. For the special case where T is square and all of its singular values are equal to 1, no ancilla modes are needed because T is unitary, and then the method can be reduced to the known unitary decompositions ( [1] or [3]). Upper bounds on the number of elemental building blocks required when using the scheme depend on the dimensionality of T in the following way: The maximum number of variable beam splitters needed to implement the unitary blocks U and W is n(n − 1)/2 + m(m − 1)/2, while the maximum number of phase shifters is n(n + 1)/2 + m(m + 1)/2. Additionally, up to min(m, n) elements are required to implement D; these elements are either beam splitters or parametric amplifiers. Hence, the number of parametric amplifiers only scales linearly with the size of the transformation matrix.
A unitary network followed by photon detection in the different modes can be used to implement a projective measurement in a Hilbert space with a dimensionality matching the unitary network. In the context of generalized measurements, it is possible for a POVM to have a number of measurement outcomes that is larger than the dimensionality of the system. The Naimark dilation theorem guarantees that such a POVM can be implemented as a projective measurement in an enlarged Hilbert space [25]. Our method can be used to find a Naimark extension, which provides a suitable enlarged unitary transformation for this projective measurement (see Appendix C 1).
Another possible application of the method lies in the construction of probabilistic optical quantum information protocols. Starting with a general transformation matrix, by formulating the action of the protocol as a mapping from a given set of input states to a set of desired output states, a system of possibly nonlinear equations for the elements of T can be constructed. A solution of the system of equations defines a network that performs the protocol, and the method can then be used to find an implementation of that network (for an example, see Appendix C 2).
Although the decomposition always provides a full quantum optical transformation with the dependence of the mean output fields on the mean input fields as specified by the partial network T , the implementation is not unique. This is already evident from the simplest nonunitary 'network', a single channel with loss or gain. As discussed in Ref. 21, the same mean field could be achieved by including excess gain and loss that compensate each other's effect on the mean field, at the expense of a reduction in the purity of the state. Given that this leaves the first moment of the field invariant but changes higher order moments, it presents an opportunity to tailor the higher order moments. It is an interesting question beyond the scope of the present article whether the multi-mode control over first moments of the field provided by the method could be extended to higher order moments.

IV. CONCLUSION
In summary, we have presented a way to describe and implement an arbitrary linear optical transformation, which can have any size and does not need to be complete in the sense that its modes fulfill bosonic commutation relations. This is achieved by finding a transformation in an enlarged space that includes the network of interest. The ancilla modes included in the description enable rigorous quantum optical modeling of the gain and losses in the network. In addition, a decomposition into the basic building blocks of beam splitters, phase shifters, and parametric amplifiers is obtained. This shows a way to implement the network that could physically be realized with integrated optics. We have discussed the role that the singular values of the transformation matrix play with respect to the number and type of ancilla modes. The method could prove useful for the implementation of POVMs, the design of probabilistic optical quantum information protocols, and more generally in any application that involves nonunitary networks.
We provide a MATLAB code for numerically implementing the full decomposition on GitHub, at https://github.com/NoraTischler/QuantOpt-lineartransformation-decomposition. First it should be noted that the individual S matrices (S Ui , S Dj , and S Wk ) fulfill Eq. (2). The product of two matrices that fulfill Eq. (2) is another quasiunitary matrix, which can be seen as follows.
Let A and B fulfill Eq. (2). Then Therefore, S total is quasiunitary. The second part of the proof is that the product of the individual S matrices has T as its upper left block.
We have T = U DW = ijk U i D j W k , and S total = ijk S Ui S Dj S Wk . Due to the block structure of the matrices S Ui and S Wk , and similarly The components S Dj corresponding to D j do not generally have the same structure. S Dj is the identity matrix if the j th singular value of T , σ j = 1. Otherwise, if σ j = 1, j and m Aj are the mode numbers corresponding to the nominal mode and ancilla mode, respectively, of the j th singular value. Then, each matrix S Dj is the identity matrix with the elements corresponding to the intersection of rows and columns j, m Aj , j + N, m Aj + N replaced as given by expressions (11) and (12).
The fact that S total = ijk S Ui S Dj S Wk has T = ijk U i D j W k as its upper left block can be shown by observing the structure of the matrix as the multiplication is carried out. Let us consider the multiplication by starting from the right-most matrix, sequentially multiplying from the left by the other matrices as specified, and denoting the product after x steps as S x . The rows of S x that deviate from those of the identity matrix are of interest at different stages of the multiplication, i.e. for different x. Let x 1 equal the number of matrices in the decomposition of W . For S x1 = k S Wk we have already seen that the upper left block of S x1 is the product of the upper left blocks of the components, and that the only elements that deviate from the identity matrix are contained in the blocks (1 : n N , 1 : n N ) and (1 + N : n N + N, 1 + N : n N + N ) [26]. Now, as each S Dj is multiplied from the left, there are at most two new rows of the resulting matrix that can deviate from the identity: rows m Aj and (m Aj + N ) when σ j = 1. Let x 2 lie between x 1 and the number of matrices in the decomposition of DW . After each step, the upper left block of S x2 is the product of the upper left blocks of the components because the elements (m Aj , 1 : n N ) and (m Aj + N, 1 : n N ) of S x2−1 are zero. This is essentially due to the fact that a unique ancilla mode is assigned to each singular value different from 1. After having multiplied through the individual S matrices corresponding to DW , for i S Ui we again have the block structure that guarantees that the upper left block of S total is T .

Appendix B: Examples
We demonstrate the method on two examples. First, we discuss how the lossy beam splitter with apparent nonlinearity can be constructed with standard optical elements. We then apply the method to an arbitrary 2 × 2 transformation, which may combine loss and gain in different modes, to obtain an analytic decomposition.

Lossy beam splitter with apparent nonlinear action
Here, the method is applied to decompose the 2 × 2 T 1in 2in 1out 2out Figure 4. Implementation of the lossy beam splitter with apparent nonlinear loss. (a) One approach would be to implement the transformation directly by a single device. The special transformation coefficients may be achieved with a novel material, e.g. a metamaterial. (b) The decomposition reveals a much simpler implementation consisting of two 50:50 beam splitters (along with single-mode phase shifts omitted from the diagram), and elucidates the simple role quantum interference plays with respect to the 'nonlinear loss'.
while W is already a beam splitter, one of the basic building blocks. The matrix D does not need to be decomposed further due to its simple form: the diagonal element 0 in D represents a complete attenuation of a mode and constitutes the only singular value different from 1. One can thus proceed to identify the number of ancilla modes n A = 1, so that N = 3 and the dimensionality of the corresponding S matrix is 6 × 6 with the nominal modesâ 1 andâ 2 , and the ancilla modê a 3 .
We continue to identify the S U , S D , and S W matrices corresponding to individual operations based on Eqs.
The total transformation matrix indeed contains T as its upper left block, and is consistent with the scattering matrix given in Ref. 12. Figure 4(b) shows the setup after simplifications, such as rewriting the beam splitter between modes 2 and 3 from S D in terms of a swap operation, which means an exchange between the labels of the two modes. The setup reveals that the apparent nonlinear loss is simply the result of photon bunching due to two-photon quantum interference at the first beam splitter; one of the output ports of the beam splitter is discarded, which leads to either both or neither of the two photons emerging in the nominal output modes 1 and 2.

General 2 × 2 linear transformation
We now turn to a more general case of an arbitrary 2×2 linear transformation matrix T = t 11 t 12 t 21 t 22 , with complex elements t ij = |t ij |e iϕij , ϕ ij ∈ R. Although the method always provides an easy way to obtain a decomposition numerically, in this low-dimensional case, an analytical solution, depicted in Fig. 5, can also be found. We will represent the solution in terms of the following matrices: rotations by a beam splitter of real coefficients BS (θ) = cos θ sin θ − sin θ cos θ and single-mode phase shifts P S 1 (θ) = e iθ 0 0 1 , P S 2 (θ) = 1 0 0 e iθ .
To solve this case analytically, one can transform the T matrix to a real form T re through the following sequence of operations:
The construction of the S network depends on the singular values σ 1,2 , and can be obtained from Eqs. (9)- (12). The dimensionality of S is at most 8 × 8, since there is one ancilla mode per singular value = 1. For a particular example, the case of a transformation combining loss in mode 1 (σ 1 < 1) with gain in mode 2 (σ 2 > 1), the submatrices read S U = S P S2(α2) S P S1(α1) S BS(γ) S P S2(β2) S P S1(β1) where the empty blocks should be filled with zeros.

Appendix C: Applications
In this appendix we outline two applications in which the method can be used: finding Naimark extensions for POVMs and the design of probabilistic optical quantum information protocols.

POVMs
A POVM is determined by a set of positive semidefinite operators {E i } m i=1 , which sum to identity m i=1 E i =I n and represent generalized measurements in an ndimensional Hilbert space [27]. Here, I n denotes the n-dimensional identity matrix. An active field of research has been focused on the physical implementation of POVMs [28][29][30][31][32]. One of the strategies is based on Figure 5. Implementation of an arbitrary 2×2 transformation. The two green rectangles represent the unitary components W and U of the singular value decomposition. The diagonal part D, marked in yellow, corresponds to single-mode modulations by σj, which are realized by coupling to ancilla modes.
Naimark's dilation theorem. According to the theorem, any POVM can be realized as a projective measurement in an enlarged Hilbert space H [25]. However, the theorem does not itself provide a general recipe to find the extension to H, called Naimark's extension.
To see how our method can be exploited to find Naimark extensions, let us focus on the important case of rank-one POVMs. The operators forming rank-one POVMs correspond to projectors E i = |φ (i) φ (i) | on, in general, nonorthogonal vectors |φ (i) in the original Hilbert space. A Naimark extension can be found by augmenting the vectors |φ (i) to the size m so that they become orthogonal in H. For this purpose, let us define a rectangular n × m matrix with columns given by the n-dimensional vectors |φ (i) : such that T T † = I. Here, φ (i) j stand for elements of |φ (i) . A singular value decomposition of T = U DW provides a unitary n × n matrix U , an n × m matrix D, and a unitary m × m matrix W . Note that since T T † = I, all the singular values of T are equal to 1. This means that the dimensionality of the Naimark extension found with the method is m, and the number of ancilla output modes is m − n. Next, let us pad the matrices of smaller dimensionalities with elements of the identity matrix, in accordance with Step 1b of the method. As a result, we obtain the enlarged m × m matrices: and W does not require any modification. The product U DW = U W is unitary and becomes an m-dimensional Naimark extension of T , which can be directly decomposed into building blocks with methods of Reck et al. [1] or Clements et al. [3]. This procedure allows designing a network for an arbitrary rank-one POVM.

Design of probabilistic protocols
Here, we demonstrate how the method can be used in the design of probabilistic optical quantum logic gates. We illustrate the design on the example of the 2-qubit controlled-Z gate, and show a systematic way to find the setup presented in Ref. 33. A 2-qubit controlled-Z gate can be implemented with two photons and four optical modes. The control qubit is encoded by one photon within the first two modes (called the control modes), while the target qubit is encoded by another photon in the last two modes (the target modes). The goal is to construct a transformation using passive optical elements, such that it implements a controlled phase flip, given that both the input and output states fulfill the condition that there is one photon in the control modes and one photon in the target modes.
Our starting point is the desired effect on two-photon states: for the four different input states below and only considering outputs according to the postselection condition of having one photon in a control mode and the other photon in a target mode, we want the circuit to output the following states: a cHinâtHin → −kâ cHoutâtHout a cHinâtV in → kâ cHoutâtV out a cV inâtHin → kâ cV outâtHout a cV inâtV in → kâ cV outâtV out , where the four modes are denoted cH, cV , tH, tV , after horizontal and vertical polarization in the control and target modes. The real constant k ∈ (0, 1] allows for the possibility of the protocol being probabilistic, with a success rate of k 2 . The above transformations involve four input and output modes, so the transformation we seek has the general form Since we assume that the setup will be passive, we know that S total will be block-diagonal and can be written as Based on the constraints of Eq. (C1), the elements of T need to be determined. To do this, it is useful to write the annihilation operators of the input modes in terms of those of the output modes. The unitary matrix A can simply be inverted to write the input modes in terms of the output modes, and we obtain There are three free parameters, t 11 , t 13 , t 31 , and the success probability of the protocol, k 2 , depends on two of these parameters. Moreover, the singular values of T depend on the parameters. We need all the singular values to be ≤ 1, so that the circuit is a passive network, but would like as many of the values as possible to be 1, so that the number of ancilla modes is minimized. A suitable choice of parameters is t 11 = 1 3 , t 13 = t 31 = 2 3 . This results in the success probability of the protocol k 2 = 1 9 , and the singular values 1, 1, 1 3 , 1 3 , which show that two ancilla modes are required. From here, the decomposition method can be used to find the physical realization of the matrix