Solution (source code)

= Solution

<Wave plates> and <polarization> <phase> shifters implement deterministic single-qubit <unitaries>: a suitable quarter-wave/half-wave/quarter-wave sequence realizes an arbitrary <polarization> rotation. A deterministic entangling gate on two independently encoded <photons> needs an effective interaction or additional resources that make one <photon>'s logical action conditional on the other. For example, a sufficiently strong conditional <phase> followed by Hadamards on the target implements <CNOT gate>. Ordinary passive <linear optics> alone does not provide this deterministic interaction on independent <polarization> <qubits>. The practical difficulty is that optical nonlinearities at the single-photon level are weak and commonly accompanied by loss or noise; auxiliary <photons>, measurements and feed-forward trade determinism for resource overhead.

The <polarizing beam splitter> eigenpolarizations at angle $\alpha$ are the orthonormal states
$$
\boxed{|T_\alpha\rangle=\cos\alpha|H\rangle+\sin\alpha|V\rangle,\qquad
|R_\alpha\rangle=-\sin\alpha|H\rangle+\cos\alpha|V\rangle.}
$$
The first is perfectly transmitted and the second perfectly reflected, from either input port. Port-dependent reflection <phases> can be fixed by a consistent optical <phase> convention or compensated locally; they do not alter the transmitted/reflected basis.