Abstract: The gating apparatus comprises: a system synchronization unit configured to acquire a clock of a quantum communication system; and a programmable controller configured to generate at least one periodic gating signal sequence that are synchronized with the clock of the quantum communication system, wherein gating signals in each gating signal sequence are spaced apart from each other by a predetermined duration, such that a single-photon detector can operate in a corresponding Geiger mode for a received optical pulse, and the predetermined duration is an optical path difference between a long arm and a short arm of an unequal-arm interferometer that is used for performing phase encoding in the quantum communication system.