Heralded Nondestructive Quantum Entangling Gate with Single-Photon Sources.