Output spectrum of a detector measuring quantum oscillations