Methods and systems for generating calibrated optical pulses in a QKD system. The method includes calibrating a variable optical attenuator (VOA) by first passing radiation pulses of a given intensity and pulse width through the VOA for a variety of VOA settings. The method further includes resetting the VOA to minimum attenuation and sending through the VOA optical pulses having varying pulse widths. The method also includes determining the power needed at the receiver in the QKD system, and setting the VOA so that optical pulses generated by the optical radiation source are calibrated to provide the needed average power. Such calibration is critical in a QKD system, where the average number of photons per pulse needs to be very small—i.e., on the order of 0.1 photons per pulse—in order to ensure quantum security of the system.