  The quantum nature of a microscopic system can only be revealed when it is
sufficiently decoupled from surroundings. Interactions with the environment
induce relaxation and decoherence that turn the quantum state into a classical
mixture. Here, we study the timescales of these processes for a qubit encoded
in the collective state of a set of magnetic atoms deposited on a metallic
surface. For that, we provide a generalization of the commonly used definitions
of $T_{1}$ and $T_{2}$ characterizing relaxation and decoherence rates. We
calculate these quantities for several atomic structures, including a
collective spin, a setup implementing a decoherence-free subspace, and two
examples of spin chains. Our work contributes to the comprehensive
understanding of the relaxation and decoherence processes and shows the
advantages of the implementation of a decoherence free subspace in these
setups.
