A method to determine which quantum operations can be realized with linear optics with a constructive implementation recipe

The evolution of quantum light through linear optical devices can be described by the scattering matrix $S$ of the system. For linear optical systems with $m$ possible modes, the evolution of $n$ input photons is given by a unitary matrix $U=\varphi_{m,M}(S)$ given by a known homomorphism, $\varphi_{m,M}$, which depends on the size of the resulting Hilbert space of the possible photon states, $M$. We present a method to decide whether a given unitary evolution $U$ for $n$ photons in $m$ modes can be achieved with linear optics or not and the inverse transformation $\varphi_{m,M}^{-1}$ when the transformation can be implemented. Together with previous results, the method can be used to find a simple optical system which implements any quantum operation within the reach of linear optics. The results come from studying the adjoint map bewtween the Lie algebras corresponding to the Lie groups of the relevant unitary matrices.


I. INTRODUCTION
The action of a linear optical device can be described for classical (coherent) light fields as well as for single photon states using unitary matrices. The unitary transformations induced by linear optical devices for generic n-photon states of m modes are difficult to compute due to the indistinguishability of photons. Our paper studies the evolution of states of light through a linear optical interferometer acting on n photons in m different modes. These devices are also called linear optics multiports and conserve the total number of photons.
More precisely, we provide a prescription to assess whether a particular unitary U acting the space of n-photon states distributed on m modes can be realized by a linear optical setup, cf. Theorem 1, and, if it can, give a recipe to build a device implementing it, cf. Theorem 2. Throughout the text we will provide two worked examples of the method.
We will work in the Hilbert space H m,n of the quantum states |ψ of n photons in m modes, with superpositions of the form |ψ = ∑ n 1 +···+n m =n α n 1 ,...,n m |n 1 · · · n m , * juagar@tel.uva.es † gimenov@mat.uji.es ‡ moyano@uji.es where |n 1 · · · n m is a state with n k photons in the k-th mode. This space is isomorphic to C M , where M = dim C H m,n = m + n − 1 n since each photon number state is orthogonal to the rest: n ′ 1 · · · n ′ m |n 1 · · · n m = δ n ′ 1 n 1 · · · δ n ′ m n m . In order to understand the action of the interferometer S on multiple photon states we need to study the underlying transformation ϕ m,M from U(m) to the U(M), the group containing the unitary matrix U which gives the evolution of the n-photon state in H m,n . Aaronson and Arkhipov [1] give a nice algebraic description of the resulting one-to-one correspondence, which turns out to be a group homomorphism we call the (m, M)-photonic homomorphism (see also [2][3][4] for alternative descriptions).
This paper gives the inverse transformation ϕ −1 m,M (S), providing a way to implement any possible linear interferometer. Apart from being interesting in itself, this result also has applications to linear optics quantum computing [5,6] and in boson sampling, a problem which could prove quantum systems can outperform classical computers [1,7].
A. Organization of the paper In Section II we give an informal overview of the results. First, Sections II A and II B introduce the basic concepts we need. Then, in Section II C, we give a general explanation of our results. Section II D presents the concept of the adjoint representation, which is fundamental in our method. Section II E describes our preferred basis when working with unitary algebras and Section II F introduces the state space we will use for our guided examples in the rest of the paper.
Section III gives a necessary and sufficient condition for a unitary to be implemented with linear optics and Sections III A and III B show concrete examples of operations which cannot and can be implemented with linear optics, respectively.
Section IV shows the method that finds the scattering matrix of the linear system which gives a given unitary operation U (if it exists). Section IV A shows the necessary steps, which are illustrated for an example in Section IV B.
Section V gives the detailed proofs of the Theorems on which our results are based.
Finally, Section VI discusses the importance of our results and their limitations.

A. Optical realizations and their implementation
Any linear interferometer with m modes is completely described by an m × m unitary scattering matrix S which has a limited number of degrees of freedom, 2m 2 − 1. This means that, except for trivial cases when n = 1 or m = 1, linear multiports can only provide a limited subset of all the possible operations over n photons in m modes, which are described by M × M unitary matrices U with 2M 2 − 1 degrees of freedom [8].
The scattering matrices S are elements of the unitary group U(m) and any general evolution U on H m,n is an element of the uni-tary group U(M). The subgroup of all the operations which can be implemented with linear optics is described by the image sub- In this paper, we relate these groups to give a decision criterion that checks if any particular operator U is in imϕ m,M (it is an (m, n)-optical realization) and, if it is possible, compute the inverse ϕ −1 m,M (U) and recover the unitary matrix S of the linear interferometer which gives the desired evolution. Once we find S, we can use previous known results which tell how to build any desired multiport with a fixed scattering matrix using only beam splitters and phase shifters [9] or only beam splitters [10,11], closing the full circle for the experimental implementation of U.
B. Linear optical evolution from the unitary (group) and Hermitian (algebra) matrices point of view The map ϕ m,M is a differentiable group homomorphism [1] and it induces an algebra homomorphism, dϕ m,M , as described by the commutative diagram which relates the unitary groups U(m) and U(M) containing the scattering matrix S and the n-photon evolution operator U, respectively, to the algebras u(m) and u(M) whose elements correspond to antihermitian matrices iH S and iH U which give an equivalent description of the evolution through exponentiation of the Hamiltonians H S and H U (S = e iH S and U = e iH U ) [12,13]. Both the homomorphism ϕ m,M and the differential dϕ m,M can be described in terms of the the photon creation,â † i , and annihilation,â i , operators for mode k [24], which act on states with n k photons in the k-th mode followinĝ The homomorphism ϕ m,M can be understood from studying the evolution of the creation operatorsâ † k in the Heisenberg picture under the action of a unitary U,â † k −→ Uâ † k U † . For an n-photon input state the output state after a linear interferometer described from the elements of S as [2][3][4]: (3) We can also write the elements of U from the permanent of different submatrices of S [4].
From the differential dϕ m,M [13], we can write the effective Hamiltonian H U of a linear optical transformation as: where |p and |q are the photon number states in our Hilbert space. The same results can be reached from alternative points of view [12,[14][15][16][17].

C. Summary of the results
The main design procedure is based on a simple basis decomposition in the image subalgebra of the Hamiltonian, with a detour due to the complications that appear when finding matrix logarithms.
If we know the desired final Hamiltonian, H U , we can check if it can be implemented with linear optics by looking for a linear combination for the same coefficients X i . Now, S = e iH S is the unitary matrix of the desired linear interferometer, for which there are known methods for an experimental implementation [9][10][11].
The problem reduces to solving Eq. (5), which can be expressed as a system of M × M linear equations, one for each matrix element, and m 2 indeterminates (the size of the basis). If the system is not consistent, we know H U cannot be implemented exactly using only linear optics.
Unfortunately, finding whether a given unitary U ∈ U(M) is an optical realization is more involved. In principle, it seems we could just take iH U = logU and proceed as before, but, unlike the exponential map, the matrix logarithm is a multivalued function. Computing the matrix logarithm of a unitary numerically presents some challenges, particularly if it has degenerate eigenvalues, as many interesting operations, such as the Quantum Fourier Transform, do. However, there are reliable methods to obtain a Hamiltonian matrix from a unitary [18].
The greatest obstacle is choosing the correct branch when we are restricted to a subgroup. For a unitary in the image subgroup, we need to guarantee that the logarithm branch we choose is in the image subalgebra iH U ∈ d. Otherwise, we will not be able to find a decomposition in terms of the basis of the image subalgebra, even if U can really be implemented.
We need a method to find a Hermitian matrix in the form given by Eq. (4). These matrices have a strong structure. The only nonzero elements are in positions which correspond to transitions between states that are, at most, one photon away from each other (for input states |p and |q which only differ in the photon number in two positions, one mode giving the photon to the other [13]).
The main contribution of our method is giving an alternative way of finding a suitable basis decomposition, when there is one, by using the adjoint representation. The method avoids using the usual matrix logarithm calculations. There is no need to compute any eigenvalues and we mostly use simple linear algebra methods (matrix multiplication and Gaussian elimi-nation to solve linear systems). If the operation U cannot be implemented, we prove it and if it can, we give a complete description in terms of a linear interferometers.

D. The adjoint representation
We will find the inverse of the ϕ m,M using the adjoint representation, which gives an alternative way of describing linear interferometers and can help to study the evolution of unitary operators [19]. Let When U is an optical realization, the group of linear interferometers can be equally described by m × m unitaries S, by M × M unitaries U in the image subgroup or by the Hermitian matrices H S and H U with iH S and iH U in the associated unitary algebra and image subalgebra. Additionally, if U is in the image subalgebra, the adjoint will also describe the same physical system. Finding the inverse in this representation is easier and this is the path we choose.
The adjoint map is conceptually similar to computing the evolution in the Heisenberg picture. The termsâ † jâ l in the effective Hamiltonian given by Eq. (4) evolves under the action of the adjoint as which, for the definition we use of the adjoint, is to the product of the evolution of the corresponding creation and destruction operators under U −1 = U † in the Heisenberg picture.
In our derivation, we use the fact that, for linear transformations, we can relate the adjoint representations of S and U = ϕ m,M (S) so that for any v ∈ u(m).
E. Bases for the u(m) algebra and the image subalgebra The matrices give a basis of u(m). The real linear combinations of the matrices give any desired antihermitian matrix in the algebra.
Observe that e jk = e k j and f jk = − f k j . From Eq. (4), we see the basis of u(m) transforms into and therefore the map dϕ m,M is injective and gives a basis of the image subalgebra.

F. Example space: 5 photons in 2 modes
To illustrate our results, we will give a few examples using linear interferometers with m = 2 modes and n = 5 input photons, for which we have a Hilbert space of dimension M = 2+5−1 5 = 6. We choose the basis of C 6 . For our reference bases, the ith basis element corresponds to a column vector filled with zeros except for a single 1 in the ith row. The (2,6)-photonic homomorphism will be denoted as ϕ 2,6 : U(2) → U(6). The basis for C 2 will be We study how Ad U acts on d = dϕ 2,6 (u(2)) using the basis {e 11 , e 12 , e 22 , f 12 } of u(2), The U and iH U matrices in these examples are given for the state order of the basis in The same applies to S and iH S and the basis in Eq. (12).
For a given iH S ∈ u(2), the corresponding element in the image subalgebra d, iH U = dϕ 2,6 (iH S ), is given by [13]: The matrices {a i } in the basis of u(2), ordered as in Eq.

III. EXISTENCE OF A UNITARY EVOLUTION VIA LINEAR OPTICS
The adjoint representation gives us a necessary and sufficient condition for the implementation of any given unitary operator U with linear interferometers.
Theorem 1 gives a criterion to decide whether a matrix U ∈ U(M) is an (n, m)-optical realization or not. A quantum operation U can be implemented with linear optics if and only if Ad U | d is an automorphism (for any v in the image subalgebra d, the adjoint UvU † remains in the subalgebra). We only need to see this is the case for a basis of d, which can be obtained by transforming the elements of a basis of u(m) by the algebra homomorphism dϕ m,M .
We can choose a basis of u(m) {a 1 , · · · , a m } following Equations (9) and (10) so that any element in the algebra can be expressed as a real linear combination of the a i matrices. For that basis, the matrices b i = dϕ m,M (a i ) form a basis for d.
U is an optical realization if and only if, for any v that is a real linear combination of the computed b i , we can also write UvU † in the same basis. There must exist real coefficients X i j such that In order to check whether a given U can be realized with linear optics we need to satisfy m 2 equations with M ×M complex matrices, one for each element of the basis, for a total of m 2 M 2 independent real equations [22] with m 4 indeterminates. If the system is consistent, U is an (n, m)-optical realization.
A. Example 1: An impossible operation In our example state space, see Section II F, in order to decide whether a matrix U is a (2, 6)optical realization or not, by Theorem 1, we have to compute Ad U and see if Ad The adjoint is linear and it is enough to verify the property for the vectors in the basis This leads to a real linear system with 2 2 · 6 2 equations in the 2 4 indeterminates X jk belonging to R.
If the system is consistent, then U is a (2, 6)photonic realization.
First, we are going to use Theorem 1 to show that not every unitary 6 × 6-matrix is a (2, 6)- the system (20) is inconsistent. Consider, for instance, Eq. (20) for b 2 : which, in matrix form, is The system is clearly inconsistent. In the first row we see two constants, 3i 2 and √ 2i, which should be equal to zero, which is impossible.
Therefore, since Ad U is not an automorphism of d, we have that U / ∈ Im(ϕ 2,6 ) by Theorem 1 and U is not a (2, 6)-optical realization.
Another way to show that inconsistency is noticing that, if v ∈ d, then n ′ 1 , n ′ 2 |v|n 1 , n 2 = 0 implies that the input state |n 1 , n 2 is, at most, one photon away from the output state |n ′ 1 , n ′ 2 (cf. Eq. (4) and [13]). This is not the case for the given U and our basis order in Eq. (11): notice that |2, 3 is two photons away from |4, 1 , but there exists a matrix S in U(2) such that ϕ 2,6 (S) = U.
We start by solving the system in Eq. (20). We write one matrix identity for each element in the {b i } basis. For instance, for b 1 : from which we see X 11 = 1 2 , X 12 = 1, X 13 = 1 2 and X 14 = 0. If we repeat the same operation for each b i in the basis, we see the system (20) is consistent and its solutions are given by the matrix Therefore, since Ad U is a linear map so that Ad U : dϕ 2,6 (u(2)) → dϕ 2,6 (u(2)), we know (by Theorem 1) that there exists at least one S ∈ U(2) such that ϕ 2,6 (S) = U.

IV. IMPLEMENTATION OF THE POSSIBLE OPERATIONS USING LINEAR OPTICS
When the operation can be implemented, we can give an explicit implementation which uses the solution to the system of equations. Let U ∈ U(M), then Theorem 1 shows that, if Ad U | d is an automorphism, there exists an S ∈ U(m) such that ϕ m,M (S) = U. The goal is to obtain an algorithm which provides this S.
All the relevant adjoint operators can be written from Ad S (a i ) for the elements a i of the basis of u(m) and the desired U.
Notice that for the X i j from the system in Equation (19), which must be consistent (otherwise we know the operation cannot be realized). Both dϕ m,M and dϕ −1 m,M are linear and (31) where all the X i j and a i are known.

A. Implementation recipe
Given an operator U, we first solve the system in Eq. (19) (or say it cannot be realized if it is inconsistent).
Then, we try different integer pairs ℓ, j in If the chosen |S ℓ j | 2 = 0 we have one element of S. We continue until we find a pair ℓ 0 , j 0 which gives a nonzero element of S. This S ℓ 0 j 0 = e iθ |S ℓ 0 j 0 | will be our reference. We can only compute the modulus, but, if we use the same S ℓ 0 j 0 for all the ℓ, j pairs, all the elements of S will have the same global phase, which can be ignored. Using Eq. (31) and Theorem 2, we can compute all the elements of a scattering matrix S which realizes the desired operator U. The scattering matrix, in turn, can be used to build the desired device with linear optical elements [9][10][11].

B. Implementation example
In Section III B we proved the existence of a matrix S ∈ U(2) such that ϕ 2,6 (S) = U for the unitary operation U in Eq. (25). In order to find this matrix S up to global phase we apply Theorem 2.
We first look for a nonzero element of S from Eq. (32): We start with ℓ = j = 1 We also need to use Eq. (31) which, for a 1 = e 11 and the matrix with the coefficients of the solution in Eq. (28), gives Ad S (e 11 ) =X 11 e 11 + X 12 e 12 + X 13 e 22 + X 14 f 12 We obtain S 11 = e iθ 1 √ 2 . From Theorem 2, we see the remaining S ℓ j are: We use the same reference S 11 to find the rest of the entries in S: All the elements can be computed from the basis {e 11 , e 12 , e 22 , f 12 } (remembering f ii = 0, e jk = e k j and f jk = − f k j ). Apart from Ad S (e 11 ), we need the matrices We can ignore the global phase θ and obtain the scattering matrix If we compute ϕ 2,6 (S) using Eq. (3), we can check we get the desired evolution U.
Notice that, had we tried to simply take the matrix logarithm of the unitary in Eq. (25) we can obtain results such as which was computed numerically and is presented rounded to three decimal places. While this is a valid logarithm (U = e iH U ), the matrix is not in the image subspace (it has nonzero elements for transitions between states which are more than one photon away). As a result, this logarithm is not compatible with our approach using the basis of d to check whether U can be implemented or not.

V. PROOFS OF THE MAIN RESULTS
In this Section, we prove Theorems 1 and 2, which lay the foundations for our results. Let Therefore, v ∈ sd if and only if tr(v) = 0. Moreover n−1 tr(iH S ), taking into account that the sum for the average of the photon number operatorn j =â † jâ j in mode j, ∑ ℓ ℓ|n j |ℓ , must be the same for every mode (we cover all the permutations for photon occupation). For n total photons and M possible states, the total sum is nM, which is divided by m for each position.
Observe that span R (iI M ) is a subalgebra of d, since b. Proof: We first assume that Ad U | d is an automorphism, then for any v ∈ sd tr(Ad U (v)) = tr(UvU † ) = tr(v) = 0, therefore Ad U (v) ∈ sd by Lemma 1. This proves that Ad U is an endomorphism. Moreover, the kernel is trivial, since Ad U (v) = 0 implies v = 0 for any v, as can be checked for the trace norm: Conversely, let us assume that Ad U | sd is an automorphism. By Lemma 1, since d = sd ⊕ span R (iI M ) and Ad U : span R (iI M ) → span R (iI M ) is the identity, then Ad U | d is an automorphism.
We can now prove Theorem 1.
] + · · · and clearly Ad U (v) ∈ d, since iH U , v ∈ d and the Lie bracket is closed in d. This proves that Ad U is an endomorphism. Moreover, the kernel is trivial, since Ad U (v) = 0 implies v = 0 for some v (see proof of Lemma 2).

VI. CONCLUSIONS
In this paper, we give a way to check whether any given linear operator U on n photons in m modes can be implemented with linear optics or not and, if it can, provide a explicit method to find the multiport S which gives the desired operator.
The method tries to write the Hamiltonian corresponding to the desired operator in terms of a linear combination of a basis of the subalgebra of all the possible Hamiltonians.
In principle, the same analysis with a decomposition in the basis of the image subalgebra could be directly applied to the H U coming from computing the logarithm of the desired operator matrix U. However, computing a suitable matrix logarithm is far from trivial. By using the adjoint representation we guarantee a simple and flexible method for any operator U. The computation only involves matrix multiplications and solving a linear system and avoids computing eigenvalues.
This method solves the problem completely for any given U.
There are some limitations to this result worth mentioning. First, it applies only to systems which can be exactly implemented, which, as n and m grow, become a smaller subset of the possible matrices U. In many cases we are more concerned with finding the best approximation. In a future work we will present a different method which finds the linear optics evolution which is locally closest to the desired operator in terms of some operator distance.
Second, that a particular operation cannot be implemented has limited implications to the related quantum information problem of whether a given quantum gate can be implemented with linear optics or not. Apart from encoding issues (a gate might be realized using only a subspace of the possible states), notice that, in linear interferometers, permutations are not trivial. For instance, the Quantum Fourier Transform matrix might be realizable for some mapping of the logical states to the photon states but not for others.
Taking into account these precautions, the inverse method we have given can be used in quantum optics and quantum information to search for particular quantum tasks or primitives which can be implemented with linear optics, such as particular instances of quantum cloning machines [23] or simple quantum algorithms showing quantum advantage. In general, the framework provided from group theory helps us to understand better the connections between classical and quantum evolution in linear optics.
[1] S. Aaronson and A. Arkhipov, "The computational complexity of linear optics," in Proceed-ings of the 43rd Annual ACM Symposium on