The basis of Q-switching is the use of a device which can alter the Q factor or quality factor of the optical resonator of the laser. The Q is a measure of how much light from the gain medium of the laser is fed back into itself by the resonator.
In the technique, initially the laser medium is pumped while the Q-switch device prevents feedback of light into the gain medium (producing an optical resonator with low Q). This produces a population inversion, but laser operation cannot yet occur since there is no feedback from the resonator. Since the rate of stimulated emission is dependent on the amount of light entering the medium, the amount of energy stored in the gain medium will increase as the medium is pumped. Due to losses from spontaneous emission and other processes, after a certain time the stored energy will reach some maximum level; the medium is said to be gain saturated. At this point, the Q-switch device is changed from low to high Q, allowing feedback and the process of optical amplification by stimulated emission to begin. Because of the large amount of energy already stored in the gain medium, the intensity of light in the laser resonator builds up very quickly; this also causes the energy stored in the medium to be depleted almost as quickly. The net result is a short pulse of light output from the laser, known as a giant pulse, which may have a very high peak intensity.
The Q-switch itself may be a mechanical device (e.g. a shutter, chopper wheel or spinning mirror placed inside the cavity), some form of modulator such as an acousto-optic or electro-optic device, or a passive saturable absorber material.
A typical Q-switched laser (e.g. a ruby laser) can produce light pulses of around 2 nanoseconds duration with peak intensities over 25 MW/cm2. Q-switched lasers are often used in applications which demand high laser intensities, such as dentistry and metal cutting.