  Quantum splines are curves in a Hilbert space or, equivalently, in the
corresponding Hilbert projective space, which generalize the notion of
Riemannian cubic splines to the quantum domain. In this paper, we present a
generalization of this concept to general density matrices with a Hamiltonian
approach and using a geometrical formulation of quantum mechanics. Our main
goal is to formulate an optimal control problem for a nonlinear system on the
dual of the Lie algebra of the unitary group which corresponds to the
variational problem of quantum splines. The corresponding Hamiltonian equations
and interpolation conditions are derived. The results are illustrated with some
examples and the corresponding quantum splines are computed with the
implementation of a suitable iterative algorithm
