We theoretically study decoherence of two localized spins interacting via the RKKY interaction in one-, two-, and three-dimensional electron gas. We derive the kinetic equation for the reduced density matrix of the localized spins and show that energy relaxation caused by singlet-triplet transition is suppressed when the RKKY interaction is ferromagnetic. We also estimate the decoherence time of the system consisting of two quantum dots embedded in a two dimensional electron gas.PACS numbers: 03.65. Yz, 75.75.+a, Quantum computation and quantum information are emerging research fields of physics, technology and information sciences [1]. The elementary units in most quantum computation and quantum information schemes are a quantum bit and a quantum gate. Because of its scalability and relatively long coherence time [2], solid state device with localized spins is considered as one of the promising candidates for these quantum devices [3]. Kane[4] proposed the system of nuclear spins of phosphorus donors in a silicon heterostructure with direct exchange interaction between electrons localized at the donors. Mozyrsky et al. [5,6] proposed the qubits of nuclear spins in quantum-Hall system in which the gate operation is realized by the indirect exchange interaction via virtually excited spin waves. Recently Craig et al. [7,8] observed the RKKY [9] coupling of semiconductor quantum dots, which proved that the RKKY interaction can be used as a quantum gate consisting of localized spins in semiconductor quantum dots. Several theoretical papers studying the RKKY interaction in such semiconductor nanostructures have been published [10,11,12,13,14,15].One of the major obstacle to realizing quantum computation is decoherence [16,17]. Since the RKKY interaction is mediated by the electron gas, the particle-hole excitations act as an environment (Fermion bath) [18,19,20,21]. It is therefore important to clarify the effects of the Fermion bath on the dynamics of the qubits consisting of the localized spins.In this paper, we study the dynamics of the localized spins interacting via the RKKY interaction by using the kinetic equation of the reduced density matrix. We find the term intrinsic to the RKKY interaction appears in the kinetic equation, which is an oscillating function of the distance between the localized spins with the same period as the RKKY interaction. We show that the energy relaxation due to the singlet-triplet transition is strongly suppressed by this term. We also discuss the physical realization of a quantum gate using the RKKY interaction and estimate the decoherence time of the system consisting of two quantum dots embedded in a two dimensional electron gas(2DEG).We consider the system consisting of two localized spins embedded in a one-, two-, or three-dimensional electron gas. The Hamiltonian, H = H S + H c + H int , comprises the localized spin part, H S , the conduction electron part, H c , and the s-d interaction, H int . We assume that there is no external magnetic field and we set H S = 0. In the sec...