  Quantum information processed in strongly correlated states of matter can
provide built in hardware protection against errors. We may encode information
in highly non local degrees of freedom, such as using three dimensional spin
lattices for subsystem codes or two dimensional spin lattices for topologically
ordered surface codes and measurement based codes. Recently, in [L. Jiang et
al., Nature Physics {\bf 4}, 482 (2008)] the authors showed how to manipulate
these global degrees of freedom using optical lattices coupled to a bosonic
degree of freedom via a cavity. We elaborate on these ideas and recapitulate
two approaches to implement many body gates necessary for quantum information
processing, both relying on controlled interactions of an ancillary cavity mode
with the spin system and single ancilla particles. The main focus of the
present paper is to analyze the effect of imperfections such a cavity decay and
collective and individual spin decoherence. We present strategies to fight
decoherence by monitoring cavity decay and show that high gate fidelities can
be achieved in the strong coupling regime of cavity-QED with state of the art
parameters.
