What is a Hamiltonian Function?

Introduction to Quantum Computing

Hamiltonian Function:

The Hamiltonian of a system specifies its total energy.  The total energy is the sum of its kinetic energy (motion) and its potential energy (position).   It expresses the rate of change in time of the condition of a dynamic physical system. Thus, it is a continuous time evolution. 
So, a Hamiltonian function is a mathematical construct that can be used to describe the time evolution of a system.  It is used to describe a dynamic system (such as the motion of a particle) in terms of components of momentum and coordinates of space and time and that is equal to the total energy of the system when time is not explicitly part of the function.
So, as an example, we want to find the minimum of a complicated cost function.