1. A non-deterministic quantum CNOT gate for photon qubits, comprising an interferometer to receive two target photon modes and two control photon modes and two unoccupied ancilla modes and to cause a sign shift by splitting and remixing of the target photon modes, conditional on the presence of a photon in one particular control photon mode, so that the target photon qubit swaps modes if the control quantum qubit is in one mode but does not if the control photon qubit is in the other mode, provided a coincidence is measured between the control and target output photon modes.