  Molecular Nanomagnets may enable the implementation of qudit-based quantum
error-correction codes which exploit the many spin levels naturally embedded in
a single molecule, a promising step towards scalable quantum processors. To
fully realize the potential of this approach, a microscopic understanding of
the errors corrupting the quantum information encoded in a molecular qudit is
essential, together with the development of tailor-made quantum error
correction strategies. We address these central points by first studying
dephasing effects on the molecular spin qudit produced by the interaction with
surrounding nuclear spins, which are the dominant source of errors at low
temperatures. Numerical quantum error correction codes are then constructed, by
means of a systematic optimisation procedure based on simulations of the
coupled system-bath dynamics, that provide a striking enhancement of the
coherence time of the molecular computational unit. The sequence of pulses
needed for the experimental implementation of the codes is finally proposed.
