  We analyse families of codes for classical data transmission over quantum
channels that have both a vanishing probability of error and a code rate
approaching capacity as the code length increases. To characterise the
fundamental tradeoff between decoding error, code rate and code length for such
codes we introduce a quantum generalisation of the moderate deviation analysis
proposed by Altug and Wagner as well as Polyanskiy and Verdu. We derive such a
tradeoff for classical-quantum (as well as image-additive) channels in terms of
the channel capacity and the channel dispersion, giving further evidence that
the latter quantity characterises the necessary backoff from capacity when
transmitting finite blocks of classical data. To derive these results we also
study asymmetric binary quantum hypothesis testing in the moderate deviations
regime. Due to the central importance of the latter task, we expect that our
techniques will find further applications in the analysis of other quantum
information processing tasks.
