Dynamics of the reading process of a quantum memory