  In this work, we study the tradeoffs between the error probabilities of
classical-quantum channels and the blocklength $n$ when the transmission rates
approach the channel capacity at a rate slower than $1/\sqrt{n}$, a research
topic known as moderate deviation analysis. We show that the optimal error
probability vanishes under this rate convergence. Our main technical
contributions are a tight quantum sphere-packing bound, obtained via Chaganty
and Sethuraman's concentration inequality in strong large deviation theory, and
asymptotic expansions of error-exponent functions. Moderate deviation analysis
for quantum hypothesis testing is also established. The converse directly
follows from our channel coding result, while the achievability relies on a
martingale inequality.
