  We consider the preparation of matrix product states (MPS) on quantum devices
via quantum circuits of local gates. We first prove that faithfully preparing
translation-invariant normal MPS of $N$ sites requires a circuit depth
$T=\Omega(\log N)$. We then introduce an algorithm based on the
renormalization-group transformation to prepare normal MPS with an error
$\epsilon$ in depth $T=O(\log (N/\epsilon))$, which is optimal. We also show
that measurement and feedback leads to an exponential speedup of the algorithm,
to $T=O(\log\log (N/\epsilon))$. Measurements also allow one to prepare
arbitrary translation-invariant MPS, including long-range non-normal ones, in
the same depth. Finally, the algorithm naturally extends to inhomogeneous MPS.
