Invia SMS: Analysis of the operation of gradient echo memories using a quantum input–output model