Distributing quantum entanglement between quantum memory nodes separated by extended distances1,4 is an important element for the realization of quantum networks, enabling potential applications ranging from quantum repeaters2,5 and long-distance secure communication6,7 to distributed quantum computing8,9 and distributed quantum sensing and metrology10,11. Proposed architectures require quantum nodes containing multiple long-lived qubits that can collect, store and process information communicated by photonic channels based on telecommunication (telecom) fibres or satellite-based links. In particular, the abilities to herald on successful photon arrival events and to detect quantum-gate errors are central to scalable implementations. As photons and individual matter qubits interact weakly in…