  Inhomogeneity, in its many forms, appears frequently in practical physical
systems. Readily apparent in quantum systems, inhomogeneity is caused by
hardware imperfections, measurement inaccuracies, and environmental variations,
and subsequently limits the performance and efficiency achievable in current
experiments. In this paper, we provide a systematic methodology to
mathematically characterize and optimally manipulate inhomogeneous ensembles
with concepts taken from ensemble control. In particular, we develop a
computational method to solve practical quantum pulse design problems cast as
optimal ensemble control problems, based on multidimensional pseudospectral
approximations. We motivate the utility of this method by designing pulses for
both standard and novel applications. We also show the convergence of the
pseudospectral method for optimal ensemble control. The concepts developed here
are applicable beyond quantum control, such as to neuron systems, and
furthermore to systems with by parameter uncertainty, which pervade all areas
of science and engineering.
