Abstract The motion of a particle constrained to move inside a box with a movable wall is quantized. The semiclassical, adiabatic and exact solutions are worked out. The time-dependent density matrix is found in closed form. The motions of the heavy and the light parts of the system, described by appropriate reduced density matrices, are discussed. General comments about quantum friction are made.