  Future quantum technologies such as quantum communication, quantum sensing,
and distributed quantum computation, will rely on networks of shared
entanglement between spatially separated nodes. In this work, we provide
improved protocols/policies for entanglement distribution along a linear chain
of nodes, both homogeneous and inhomogeneous, that take practical limitations
such as photon losses, non-ideal measurements, and quantum memories with short
coherence times into account. For a wide range of parameters, our policies
improve upon previously known policies, such as the "swap-as-soon-as-possible"
policy, with respect to both the waiting time and the fidelity of the
end-to-end entanglement. This improvement is greatest for the most practically
relevant cases, namely, for short coherence times, high link losses, and highly
asymmetric links. To obtain our results, we model entanglement distribution
using a Markov decision process, and then we use the Q-learning reinforcement
learning (RL) algorithm to discover new policies. These new policies are
characterized by dynamic, state-dependent memory cutoffs and collaboration
between the nodes. In particular, we quantify this collaboration between the
nodes. Our quantifiers tell us how much "global" knowledge of the network every
node has. Finally, our understanding of the performance of large quantum
networks is currently limited by the computational inefficiency of simulating
them using RL or other optimization methods. Thus, in this work, we present a
method for nesting policies in order to obtain policies for large repeater
chains. By nesting our RL-based policies for small repeater chains, we obtain
policies for large repeater chains that improve upon the
swap-as-soon-as-possible policy, and thus we pave the way for a scalable method
for obtaining policies for long-distance entanglement distribution.
