  Quantum repeaters promise to deliver long-distance entanglement overcoming
noise and loss in realistic quantum channels. A promising class of repeaters,
based on atomic ensemble quantum memories and linear optics, follow the
proposal by Duan et al [Nature 414, 413, 2001]. Here we analyse this protocol
in terms of a very general model for the quantum memories employed. We derive
analytical expressions for scaling of entanglement with memory imperfections,
dark counts, loss and distance, and apply our results to two specific quantum
memory protocols. Our methods apply to any quantum memory with an interaction
Hamiltonian at most quadratic in the mode operators and are in principle
extendible to more recent modifications of the original DLCZ proposal.
