  The quantum harmonic oscillator is one of the most fundamental objects in
physics. We consider the case where it is extended to an arbitrary number modes
and includes all possible terms that are bilinear in the annihilation and
creation operators, and assume we also have an arbitrary time-dependent drive
term that is linear in those operators. Such a Hamiltonian is very general,
covering a broad range of systems including quantum optics, superconducting
circuit QED, quantum error correcting codes, Bose-Einstein condensates, atomic
wave packet transport beyond the adiabatic limit and many others. We examine
this situation from the point of view of quantum control, making use of optimal
control theory to determine what can be accomplished, both when the controls
are arbitrary and when they must minimize some cost function. In particular we
develop a class of analytical pulses. We then apply our theory to a number of
specific topical physical systems to illustrate its use and provide explicit
control functions, including the case of the continuously driven conditional
displacement gate.
