  We investigated the optimal control of a continuous variable system, focusing
on entanglement generation in an optomechanical system without utilizing Fock
basis cutoffs. Using the Krotov algorithm to optimize the dynamics of the
covariance matrix, we illustrated how to design a control objective function to
manipulate the dynamics of the system to generate a desirable target state. We
showed that entanglement between the macroscopic mechanical mirror and the
quantum optical cavity can be reliably generated through imposing the control
on the detuning of the external laser field. It has be shown that the control
may be still achieved when imposing spectral constraints on the external field
to restrict it to low-frequency components. In addition, we systematically
studies the effects of quantum control on non-Markovian open system dynamics.
We observed that memory effects can play a beneficial role in mitigating the
detrimental impact of environmental noises. Specifically, the entanglement
generated shows reduced decay in the presence of these memory effects.
