In a semiconductor laser, the optical pulses are generated by injecting a large number of carriers (electrons) into the active region of the device, bringing the carrier density within that region from below to above the lasing threshold. When the carrier density exceeds that value, the ensuing stimulated emission results in the generation of a large number of photons.
However, carriers are depleted as a result of stimulated emission faster than they are injected. So the carrier density eventually falls back to below lasing threshold which results in the termination of the optical output. If carrier injection has not ceased during this period, then the carrier density in the active region can increase once more and the process will repeat itself.
The figure on the right shows a typical pulse generated by gain-switching with a sinusoidal injection current at 250 MHz producing a pulse of approximately 50 ps. Notice the depletion in carrier density during the pulse, and its subsequent rise due to continued current injection giving rise to a smaller secondary pulse.
For solid-state and dye lasers, gain switching (or synchronous pumping) usually involves the laser gain medium being pumped with another pulsed laser. Since the pump pulses are of short duration, optical gain is only present in the laser for a short time, which results in a pulsed output. Q-switching is more commonly used for producing pulsed output from these types of laser, as pulses with much higher peak power can be achieved.
The term gain-switching derives from the fact that the optical gain is negative when carrier density or pump intensity in the active region of the device is below threshold, and switches to a positive value when carrier density or the pump intensity exceeds the lasing threshold.