Abstract
Noise plays a troublesome role for entanglement generation, because the polarization entanglement of photons can be easily disturbed by the noise. In this paper, we propose a protocol to prepare Greenberger–Horne–Zeilinger state and W state of atoms in quantum nodes connected by collective-noise channels assisted by quantum nondemolition detectors (QNDs) and the controlled phase flip gates. The frequency degrees of freedom are exploited in our protocol. The successful probability of our protocol can reach 100% neglecting the photon loss and assuming that the efficiency of QNDs is 1. Moreover, the number of times of using QNDs is limited, and this makes the protocol quite effective when collective noise is small.