  On-demand creation of entanglement between distant qubits is a necessary
ingredient for distributed quantum computation. We propose an entanglement
scheme that allows for single-shot deterministic entanglement creation by
detecting a single photon passing through a Mach-Zehnder interferometer with
one transmon qubit in each arm. The entanglement production essentially relies
on the fact that superconducting microwave structures allow to achieve strong
coupling between the qubit and the photon. By detecting the photon via a photon
counter, a parity measurement is implemented and the wave function of the two
qubits is projected onto a maximally entangled state. Most importantly, the
entanglement generation is heralded such that our protocol is not susceptible
to photon loss due to the indivisible nature of single photons.
