  We formalize the problem of dissipative quantum encoding, and explore the
advantages of using Markovian evolution to prepare a quantum code in the
desired logical space, with emphasis on discrete-time dynamics and the
possibility of exact finite-time convergence. In particular, we investigate
robustness of the encoding dynamics and their ability to tolerate
initialization errors, thanks to the existence of non-trivial basins of
attraction. As a key application, we show that for stabilizer quantum codes on
qubits, a finite-time dissipative encoder may always be constructed, by using
at most a number of quantum maps determined by the number of stabilizer
generators. We find that even in situations where the target code lacks gauge
degrees of freedom in its subsystem form, dissipative encoders afford
nontrivial robustness against initialization errors, thus overcoming a
limitation of purely unitary encoding procedures. Our general results are
illustrated in a number of relevant examples, including Kitaev's toric code.
