  Many-body ground states can be prepared via unitary evolution in cold atomic
systems. Given the initial state and a fixed time for the evolution, how close
can we get to a desired ground state if we can tune the Hamiltonian in time?
Here we study this optimal control problem focusing on Luttinger liquids with
tunable interactions. We show that the optimal protocol can be obtained by
simulated annealing. We find that the optimal interaction strength of the
Luttinger liquid can have a nonmonotonic time dependence. Moreover, the system
exhibits a marked transition when the ratio $\tau/L$ of the preparation time to
the system size exceeds a critical value. In this regime, the optimal protocols
can prepare the states with almost perfect accuracy. The optimal protocols are
robust against dynamical noise.
