Quality factor can be measured using various techniques, depending on the type of device and its operating frequency. For example, in mechanical resonators, it can be measured by observing the decay of oscillations over time. In optical resonators, it can be measured by analyzing the linewidth of the resonance peak in the frequency domain. Advanced techniques like scanning probe microscopy and optical interferometry may also be used for high-precision measurements.