Frame functions in finite-dimensional quantum mechanics and its Hamiltonian formulation on complex projective spaces