Solution (source code)

= Solution
{c}

In <Q-switching>, hold the <optical resonator>'s <quality factor> low while pumping builds <population inversion>, then rapidly reduce the loss. The stored excitation produces a large <optical gain>, the intracavity <light intensity> grows, and <stimulated emission> depletes the <population inversion> until the <optical gain> falls below the <laser threshold>. The resulting <optical pulse> is a transient discharge of stored excitation.

Its duration depends on the high-<quality factor> <photon lifetime>, initial <population inversion>, saturation dynamics and switching time. For example, a simple <laser rate equation> model is
$$
\dot S=(g(N)-\tau_c^{-1})S,\qquad
\dot N=R_p-N/\tau_u-g(N)S,
$$
where $S$ is intracavity <photon number>, $N$ is the available inversion in compatible units, $R_p$ is the pump rate and $\tau_c$ is the <photon lifetime>. During the short discharge, pumping and upper-state decay can often be neglected. The build-up and depletion rates determine the width; there is no universal equality between the width and $\tau_c$. The initially stored <energy> and the output coupling also matter. Typical <Q-switching> produces nanosecond-scale <optical pulses>.