The ability to control the shape and motion of quantum states(1,2) may lead to methods for bond-selective chemistry and novel quantum technologies, such as quantum computing. The classical coherence of laser light has been used to guide quantum systems into desired target states through interfering pathways(3-5). These experiments used the control of target properties-such as fluorescence from a dye solution(6), the current in a semiconductor(7,8) 8 Or the dissociation fraction of an excited molecule(9)-to infer control over the quantum state. Here we report a direct approach to coherent quantum control that allows us to actively manipulate the shape of an atomic electron's radial wavefunction, We use a computer-controlled laser to excite a coherent state in atomic caesium. The shape of the wavefunction is then measured(10) and the information fed back into the laser control system, which reprograms the optical field. The process is iterated until the measured shape of the wavefunction matches that of a target wavepacket, established at the start of the experiment. We find that, using a variation of quantum holography(11) to reconstruct the measured wavefunction, the quantum state can be reshaped to match the target within two iterations of the feedback loop.