  In this paper we q-deform a construction of Kazhdan and Kostant from 1970's
which produces quantum Toda Hamiltonians by considering the action of Casimirs
of a simple Lie algebra on Whittaker functions on the corresponding Lie group.
We also give the affine analog of this generalization. This is done by
extending the notion of a Whittaker function to quantum groups and quantum
affine algebras. We compute the q-deformed Toda Hamiltonians for Lie algebras
of type A and show that they coincide with those known in the theory of
integrable systems.
