  Quantum error correction is fundamentally important for quantum information
processing and computation. Quantum error correction codes have been studied
and constructed since the pioneering papers of Shor and Steane. Optimal (called
MDS) $q$-qubit quantum codes attaining the quantum Singleton bound were
constructed for very restricted lengths $n \leq q^2+1$. Entanglement-assisted
quantum error correction (EAQEC) code was proposed to use the pre-shared
maximally entangled state for the enhancing of error correction capability.
Recently there have been a lot of constructions of MDS EAQEC codes attaining
the quantum Singleton bound for very restricted lengths. In this paper we
construct such MDS EAQEC $[[n, k, d, c]]_q$ codes for arbitrary $n$ satisfying
$n \leq q^2+1$ and arbitrary distance $d\leq \frac{n+2}{2}$. It is proved that
for any given length $n$ satisfying $O(q^2)=n \leq q^2+1$ and any given
distance $d$ satisfying $ O(q^2)=d \leq \frac{n+2}{2}$, there exist at least
$O(q^2)$ MDS EAQEC $[[n, k, d, c]]_q$ codes with different $c$ parameters. Our
results show that there are much more MDS entanglement-assisted quantum codes
than MDS quantum codes without consumption of the maximally entangled state.
This is natural from the physical point of view. Our method can also be applied
to construct MDS entanglement-assisted quantum codes from the generalized MDS
twisted Reed-Solomon codes.
