Solution (source code)

= Solution

Choose the upper route for horizontal <polarization (waves)>[polarization], the lower route for vertical <polarization (waves)>[polarization], and absorb fixed optical phases into the path kets. The normalized output is
$$
\boxed{\frac{|H\rangle|\uparrow_1\rangle+|V\rangle|\downarrow_1\rangle}{\sqrt2}.}
$$
This is <entanglement> between two <degrees of freedom> of one <photon>. Interchanging the path convention interchanges the labels but not any probabilities.