Optical quantum memory plays a critical role in fields such as quantum computing, quantum sensing, and quantum communication. Cold atomic systems, due to their excellent quantum coherence, controllability, and exceptional ability to handle weak optical fields, have emerged as one of the key platforms for faithful optical quantum state storage. Among these, cigarette-shaped cold atomic ensembles, which can reach up to 2 cm or more in length, exhibit over 85% storage efficiency due to their optical depth reaching 100 or more. However, further applications are significantly hindered by the limited storage lifetimes caused by inhomogeneous residual magnetic fields along the long atomic cloud. This study analyzes the issue of atomic spin decoherence induced by a non-uniform magnetic field with a linear gradient, and obtains the result that storage lifetime dramatically decreases with the increase of linear gradient. Further, we demonstrate that in our two-dimensional magneto-optical trap system, which has a longitudinal atom-light interaction length of 2.7 cm, a direct current (DC) magnetic field can provide a quantization axis, suppress the effects of inhomogeneous fields, and regulate the cycles of spin dephasing and rephasing. With the appropriate setting for the optical pumping process of magnetic quantum levels, adjusting the pump laser power can effectively control the atomic population distribution, thereby precisely optimizing the light storage efficiency at different time bins, as shown in Fig. (a). According to these findings, we propose a scheme for the storage of time-bin entangled photon pairs, which are prepared at two different time slots of Duan-Lukin-Cirac-Zoller (DLCZ) process. A bias magnetic field on the generation MOT (left panel of Fig. (b)) induces modulation on the storage time as shown in Fig. (a), so that read pulse exerted on
rj reads only
wj (
j = 1, 2). Therefore, the two photonic time bins become distinguishable and orthogonal. The retrieved photon pairs thus have fully controllable time bins for both photons. Compared with other degrees of freedom, the time encrypted photonic entanglement remains robust in long-distance network.