Quantum error-correction codes and absolutely maximally entangled states