  We investigate the problem of optimally reversing the action of an arbitrary
quantum channel C which acts independently on each component of an ensemble of
n identically prepared d-dimensional quantum systems. In the limit of large
ensembles, we construct the optimal reversing channel R* which has to be
applied at the output ensemble state, to retrieve a smaller ensemble of m
systems prepared in the input state, with the highest possible rate m/n. The
solution is found by mapping the problem into the optimal reversal of Gaussian
channels on quantum-classical continuous variable systems, which is here solved
as well. Our general results can be readily applied to improve the
implementation of robust long-distance quantum communication. As an example, we
investigate the optimal reversal rate of phase flip channels acting on a
multi-qubit register.
