What can we do with a linear optical logic gate?

In an earlier paper [H.J. Caulfield, J. Westphal, The logic of optics and the optics of logic, Information Sciences 162 (2004) 21-33], we considered a simple interferometer (initially conceived as Mach-Zehnder) with two uniform intensity mutually coherent inputs. By encoding those inputs with phases 0 and @p representing Boolean 0 and 1 and identifying the detected values of the outputs as logical Boolean values, we found that the outputs could be identified as the Boolean operations XOR and COINC (sometimes called XNOR). Here, we show that this seemingly simple interferometer can perform many additional functions if we use phases to interpret its outputs. But the XOR/COINC are the only non-trivial logic gate we can get no matter how we cascade Mach-Zehnder interferometers. We also generalize those operations upwards (to three or four arguments). We show that the three argument interferometer or four-argument interferometer cannot produce a Fredkin gate or its variation.