  Optimal control of bilinear systems has been a well-studied subject in the
areas of mathematical and computational optimal control. However, effective
methods for solving emerging optimal control problems involving an ensemble of
deterministic or stochastic bilinear systems are underdeveloped. These
burgeoning problems arise in diverse applications from quantum control and
molecular imaging to neuroscience. In this work, we develop an iterative method
to find optimal controls for an inhomogeneous bilinear ensemble system with
free-endpoint conditions. The central idea is to represent the bilinear
ensemble system at each iteration as a time-varying linear ensemble system, and
then solve it in an iterative manner. We analyze convergence of the iterative
procedure and discuss optimality of the convergent solutions. The method is
directly applicable to solve the same class of optimal control problems
involving a stochastic bilinear ensemble system driven by independent additive
noise processes. We demonstrate the robustness and applicability of the
developed iterative method through practical control designs in neuroscience
and quantum control.
