We have studied the quantum information processing phenomenon in photonic crystals doped with four-level nanoparticles. This phenomenon occurs due to the switching mechanism in the system. We consider that one of the transition energies of nanoparticles is coupled near resonantly with a photonic band gap edge. The dipole-dipole interaction between the nanoparticles has also been included. It is found that the system switches between the transparent and nontransparent states due to the dipole-dipole interaction and the band edge coupling. This is an interesting finding and can be used to produce logical photon switches in the quantum information processing.