  We consider the problem of preparing topologically ordered states using
unitary and non-unitary circuits, as well as local time-dependent Hamiltonian
and Liouvillian evolutions. We prove that for any topological code in $D$
dimensions, the time required to encode logical information into the ground
space is at least $\Omega(d^{1/(D-1)})$, where $d$ is the code distance. This
result is tight for the toric code, giving a scaling with the linear system
size. More generally, we show that the linear scaling is necessary even when
dropping the requirement of encoding: preparing any state close to the ground
space using dissipation takes an amount of time proportional to the diameter of
the system in typical 2D topologically ordered systems, as well as for example
the 3D and 4D toric codes.
