Q-switching, sometimes known as giant pulse formation or Q-spoiling, is a technique by which a laser can be made to produce a pulsed output beam. The technique allows the production of light pulses with extremely high (gigawatt) peak power, much higher than would be produced by the same laser if it were operating in a continuous wave (constant output) mode. Compared to modelocking, another technique for pulse generation with lasers, Q-switching leads to much lower pulse repetition rates, much higher pulse energies, and much longer pulse durations. The two techniques are sometimes applied together.