The objective of this paper is to develop a functional programming language for quantum computers. We develop a lambda-calculus for the QRAM model, following the work of P. Selinger (2003) on quantum flow-charts. We define a call-by-value operational semantics, and we develop a type system using affine intuitionistic linear logic. The main result of this preprint is the subject-reduction of the language.