Experimental setup of our scheme. LD: laser diode; ATT: attenuator; SPD: single-photon detector; TAC: time-to-amplitude converter; MCA: multichannel analyzer; PC: personal computer.