Quantum linear optics Boson sampling I am currently taking a course in Quantum Optics and I am trying to understand Boson sampling.
We were given a formula for Boson sampling:
if the input is given by:
$$|{\psi_{in}}\rangle=a_1^\dagger a_2^\dagger...a_n^\dagger|{0}\rangle$$
then the output is:
$$|{\psi_{out}}\rangle=\sum_{k_1,s_1;...k_n,s_n; k_1+k_2+...k_n=N}\frac{\text{Perm}(\hat{U}_{k_1s_1,...k_ns_n})}{\sqrt{k_1!...k_n!}}|k_1,...k_n\rangle$$
where $\hat{U}_{k_1s_1,...k_ns_n}$ is column matrix of $k_1$ times the $s_1$ row vector and so on of the unitary transformation.
But as far as I know this formula holds only for the particular state stated above.
What if there are different number of photons in different modes? I had to do an exercise for the three mode Hong Ou Mandel effect for the input state $|3,0,0\rangle$ If I then transform the creation operators I get 27=3^3 terms. There must be a simpler way to do it.
 A: No and yes.  The matrix $U$ will contain repeated columns (or rows depending on your you set it up) so that some simplifications are possible.  Moreover, since your input state is in the irrep $(3,0,0)$ of $U(3)$, you can only get an output that is in this irrep.  The irrep $(3,0,0)$ is of dimension $10$ and you can generate the basis states in the form
\begin{align}
\vert n_1 n_2 n_3\rangle = \frac{(a^\dagger_1)^{n_1}(a^\dagger_2)^{n_2}(a^\dagger_3)^{n_3}}{\sqrt{n_1!n_2!n_3!}}\vert 0\rangle\, ,\qquad 
n_1+n_2+n_3=3
\end{align}
so the output can only be a combination of those states.
The key point is that you cannot gets states in $(2,1,0)$ of $U(3)$ or in $(1,1,1)$ of $U(3)$ as they necessarily involve partially symmetric states, which need to be constructed using at least another degree of freedom to distinguish states in the same output ports.  As an example one of the states in $(2,1,0)$ is of the form
$$
\left\vert \begin{array}{cc} a^\dagger_{1+}& a^\dagger_{1-}\\
a^\dagger_{2+}& a^\dagger_{2-}\end{array}\right\vert a^\dagger_{1+} \tag{1}
$$
i.e. a determinant of creation operators multiplied by another creation operator.  By antisymmetry of the determinant you see you need a second label (here $\pm$) to distinguish different bosons but in your problems your bosons are indistinguishable so don't have such a second label, which eliminates are states of the form (1).
Thus in principle
\begin{align}
U\vert 3,0,0\rangle = \sum_{n_1n_2n_3}\vert n_1n_2n_3\rangle U_{n_11}U_{n_21}U_{n_31}\, .\tag{2}
\end{align}
Now if you detect bosons in some specific output channels - say $(a,b,c)$ then your detecting process is modelled as
\begin{align}
\Pi=\frac{\vert a,b,c\rangle\langle a,b,c\vert}{a! b!c!}
\end{align}
and thus only a limited number of terms in (2) will survive the projection associated with detection.
