  We propose a deterministic and scalable scheme to construct a two-qubit
controlled-NOT (CNOT) gate and realize entanglement swapping between photonic
qubits using a quantum-dot (QD) spin in a double-sided optical microcavity. The
scheme is based on spin selective photon reflection from the cavity and can be
achieved in a nondestructive and heralded way. We assess the feasibility of the
scheme and show that the scheme can work in both the weak coupling and the
strong coupling regimes. The scheme opens promising perspectives for
long-distance photonic quantum communication and distributed quantum
information processing.
