An essential component of any quantum computer is the quantum memory, the content of which is a pure quantum state. A program to study the quantum memory is initiated here, where the spatial variables are of central importance. The presence of the spatial variables makes it possible to apply the powerful and welldeveloped theory of scattering: The fundamental operations of writing on, reading and resetting the quantum memory are all performed through scattering from the memory. The requirement that the quantum memory must remain in a pure state after scattering implies that the scattering is of a special type, and only certain incident waves are admissible. Models based on the coupled-channel Schrödinger equation for potential scattering are formulated, where there is indeed the required large collection of admissible incident waves. On the basis of these models, certain types of decoherence are unavoidable. Such decoherence and the necessity of using the relativistic Schrödinger equation are discussed. One of the implications of quantum memory is the possible lack of security for the quantum key distribution in quantum cryptography.