  We propose and analyze a scheme for manipulating the propagation of single
photon pulses with two polarization components in a Rydberg atomic gas via
double electromagnetically induced transparency. We show that by storing a gate
photon in a Rydberg state a deep and tunable potential for a photon
polarization qubit can be achieved based on strong Rydberg interaction. We also
show that the scheme can be used to realize all-optical switch in dissipation
regime and generate a large phase shift in dispersion regime for the photon
polarization qubit. Moreover, we demonstrate that such a scheme can be utilized
to detect weak magnetic fields. The results reported here are not only
beneficial for understanding the quantum optical property of Rydberg atomic
gases, but also promising for designing novel devices for quantum information
processing.
