  We study a quantum memory composed of an array of charged quantum dots
embedded in a planar cavity. Optically excited polaritons, i.e. exciton-cavity
mixed states, interact with the electron spins in the dots. Linearly polarized
excitation induces two-spin and multi-spin interactions. We discuss how the
multi-spin interaction terms, which represent a source of errors for two-qubit
quantum gates, can be suppressed using local control of the exciton energy. We
show that using detuning conditional phase shift gates with high fidelity can
be obtained. The cavity provides long-range spin coupling and the resulting
gate operation time is shorter than the spin decoherence time.
