In an optical resonator, the higher the reflectivity of its surfaces, the higher the Q. A Q-switch rapidly changes the Q in the optical resonator of a laser to prevent lasing until a high level of optical gain and energy storage has been reached in the lasing medium; a giant pulse is generated when the Q is rapidly increased.