In distributed quantum information processing, flying photons entangle matter qubits confined in cavities. However, when a matter qubit is homogeneously broadened, the strong-coupling regime of cavity QED is typically required, which is hard to realize in actual experimental setups. Here, we show that a high-fidelity entanglement operation is possible even in the weak-coupling regime in which dampings (dephasing, spontaneous emission, and cavity leakage) overwhelm the coherent coupling between a qubit and the cavity. Our proposal enables distributed quantum information processing to be performed using much less demanding technology than previously.Distributed architecture is a promising approach for realizing scalable quantum computation [1][2][3][4][5][6]. Elementary nodes composed of a few qubits are networked to achieve scalable quantum computation. The node separation can potentially suppress decoherence induced by uncontrollable interactions between qubits. Moreover, since the nodes are spatially separated, individual qubits can be easily addressed by the optical field.A critical operation for realizing distributed quantum computation is the entanglement operation (EO) [1][2][3][4][5][6][7][8][9]. To construct an entire network, qubits in distant nodes have to be coupled by EOs. Most EOs are based on photon interference, and the successful execution of an EO can be heralded by detecting a photon at the target port. This approach has been experimentally demonstrated using an ion trap system [10]. If the EO fails, the two qubits involved should be initialized, which risks destroying the entanglement of other qubits generated by previous EOs. Although EOs typically have such probabilistic properties, previous studies have revealed that only polynomial steps are required to construct large entangled states [2,[11][12][13][14], such as a cluster state [15]. Moreover, by introducing a quantum memory to each node, EOs can be repeatedly performed until they are successful without destroying prior entanglement [16].EOs involve optical excitations of matter qubits. However, the excited states are inherently noisy and significantly degrade the target entanglement. For example, nitrogen vacancy (NV) centers in diamond have promising properties such as a long coherence time at room temperature and optical addressability. Entanglement between an NV center and an emitted photon has been demonstrated at a low temperature of about 7 K [17]. However, at room temperature, this otherwise attractive system suffers from strong environmental dephasing originating from interactions with phonons when the system is optically excited. Consequently, it acquires a large homogeneous broadening of the order of THz [18]. Therefore, in such an approach, NV centers can be used for distributed quantum computation only at low temperatures.One way to overcome homogeneous broadening is to employ high-Q cavities. Previous theoretical proposals of EOs require strong coupling between a matter qubit and the cavity when the matter qubit has large hom...