I show that the decoherence in a system of N degenerate two--level atoms
interacting with a bosonic heat bath is for any number of atoms N governed by
a generalized Hamming distance (called ``decoherence metric'') between the
superposed quantum states, with a time--dependent metric tensor that is
specific for the heat bath.The decoherence metric allows for the complete
characterization of the decoherence of all possible superpositions of
many-particle states, and can be applied to minimize the over-all decoherence
in a quantum memory. For qubits which are far apart, the decoherence is given
by a function describing single-qubit decoherence times the standard Hamming
distance. I apply the theory to cold atoms in an optical lattice interacting
with black body radiation.Comment: replaced with published versio