How can beamsplitters and measurements be used to make a quantum cNOT gate? It's possible to create a two-photon gate using detectors and linear optics, which can be used as the basis for a quantum computer.
I am struggling to get a basic understanding of how this works. I'm having some trouble understanding the math in this paper.
Is there perhaps a simple way of showing how post-selection of some single-photon states can create a photon-photon phase gate? (maybe with some unitary operators of creation operators, for example)
 A: The second paper linked by UVphoton describes a C-Phase gate that is quite straightforward to understand. The basic idea of the gate is to use second-order interference on a partially polarizing beam-splitter (PPBS) to generate a conditional phase shift. Since the amplitudes of the four basis states after the PPBS differ, two additional PPBSes are used to balance them. Post-selection is necessary to remove the amplitudes corresponding to two photons exiting in the same spatial mode, since bunched photons don't represent valid two-qubit states in this encoding.
The reflectivity of the first PPBS is chosen to be $2/3$ for $V$-polarized photons, and 0 for $H$-polarized photons. If $a$ and $b$ and the two input/output spatial modes of the PPBS, then the corresponding transformation can be written:
\begin{equation}
\begin{aligned}
\vphantom{\sqrt{\frac{1}{3}}} \hat{a}_H &\to \hat{a}_H,\qquad \\
\vphantom{\sqrt{\frac{1}{3}}} \hat{b}_H &\to \hat{b}_H,\qquad 
\end{aligned}
\begin{aligned}
\hat{a}_V &\to \sqrt{\frac{1}{3}}\hat{a}_V
+ i\sqrt{\frac{2}{3}}\hat{b}_V\\
\hat{b}_V &\to \sqrt{\frac{1}{3}}\hat{b}_V
+ i\sqrt{\frac{2}{3}}\hat{a}_V
\end{aligned}
\end{equation}
with a $\pi/2$ phase upon reflection.
If we identify $|H\rangle$ and $|V\rangle$ as the computational basis states $|0\rangle$ and $|1\rangle$ respectively, then the transformation of the C-Phase gate is:
\begin{equation}
\begin{aligned}
|\Psi\rangle = &\alpha_{HH}|HH\rangle
+ \alpha_{HV}|HV\rangle
+ \alpha_{VH}|VH\rangle
+ \alpha_{VV}|VV\rangle\\
\to
&\alpha_{HH}|HH\rangle
+ \alpha_{HV}|HV\rangle
+ \alpha_{VH}|VH\rangle
- \alpha_{VV}|VV\rangle
\end{aligned}
\end{equation}
Now consider how the (unnormalized) state $|\Psi\rangle = \bigl(\hat{a}_{H} \hat{b}_{H}
+\hat{a}_{H} \hat{b}_{V}
+\hat{a}_{V} \hat{b}_{H}
+\hat{a}_{V} \hat{b}_{V}\bigr)|\text{vac}\rangle$ is transformed by the first PPBS. Note that since we will be post-selecting on there being one photon in each spatial mode, it is not necessary to consider terms on the form $\hat{a}\hat{a}$ or $\hat{b}\hat{b}$. Applying the PPBS transformation and neglecting these terms gives:
\begin{equation}
\begin{aligned}
|\Psi\rangle \to |\Psi'\rangle &=
\bigl(\hat{a}_{H} \hat{b}_{H}
+\hat{a}_{H} \sqrt{\frac{1}{3}} \hat{b}_{V}
+\sqrt{\frac{1}{3}} \hat{a}_{V} \hat{b}_{H}
-\frac{2}{3}\hat{a}_{V}\hat{b}_{V}
+\frac{1}{3}\hat{a}_{V}\hat{b}_{V}
\bigr)|\text{vac}\rangle\\
&=\bigl(\hat{a}_{H} \hat{b}_{H}
+\sqrt{\frac{1}{3}} \hat{a}_{H}  \hat{b}_{V}
+\sqrt{\frac{1}{3}} \hat{a}_{V} \hat{b}_{H}
-\frac{1}{3}\hat{a}_{V}\hat{b}_{V}
\bigr)|\text{vac}\rangle
\end{aligned}
\end{equation}
As you can see, the $|VV\rangle$ component has the correct phase, however the relative balance of the amplitudes is off. This can be corrected by two additional PPBSes, one in each spatial mode, that reflect $2/3$ of $H$-polarized light and fully transmit $V$-polarized light:
\begin{equation}
|\Psi'\rangle \to 
\frac{1}{3}\bigl(\hat{a}_{H} \hat{b}_{H}
+\hat{a}_{H}  \hat{b}_{V}
+\hat{a}_{V} \hat{b}_{H}
-\hat{a}_{V}\hat{b}_{V}
\bigr)|\text{vac}\rangle
\end{equation}
This is the desired final state, which is post-selected on with a probability of $1/9$.
