  We analyze the dynamics of a qubit-resonator system coupled with a thermal
bath and external electromagnetic fields. Using the evolution equations for the
set of Heisenberg operators, that describe the whole system, we derive an
expression for the resonator field, accounting for the resonator-drive,-bath,
and -qubit interaction. The renormalization of the resonator frequency, caused
by the qubit-resonator interaction, is accounted for. Using solutions for the
resonator field, we derive the equation describing qubit dynamics. The
influence of the qubit evolution during the measurement time on the fidelity of
a single-shot measurement is studied. The relation between the fidelity and
measurement time is shown explicitly. Also, an expression describing relaxation
of the superposition qubit state towards its stationary value is derived. The
possibility of controlling this state, by varying the amplitude and frequency
of drive, is shown.
