function of the probe frequency $\omega_{\rm p}$ and the input power $P_{\rm in}$ at the sample (or equivalent average number of cavity quanta $N_{\rm c}$). Numerically-calculated resonance frequencies are shown with coloured dots for $N=2,5,7$ transmon states. (b) Measured relaxation time $T_1$ (left axis) as a function of $N_{\rm c}$. On the right axis, we show the ac-Stark shifted qubit transition frequency $\omega_{\rm q}$ in the same interval. For $N_{c}\leq 1$, a standard perturbative quantum treatment [@Boissonneault09; @Boissonneault12a; @Boissonneault12b] can be used to explain the data (continuous lines), while above these values the increase of $T_1$ can be modelled using a classical approach [@supplement; @Irwin; @Irwin2]. (c) Quantum-to-classical transition in the driven transmon-cavity system. We show the numerically calculated average transmon state occupation $\langle N\rangle$, occupation number fluctuations $\langle \delta N^2\rangle$, and the order parameter $\Xi$ as a function of the cavity occupation. []{data-label="fig:expBSshift"}](fig3){width="1.0\linewidth"}

In the quantum regime, the transmon behaves as a two-level system (qubit) with only $\hat{\sigma}_{\rm z}$-coupling to the cavity via a $\hat{a}^{\dag} \hat{a} \hat{\sigma}_z$-term, cf. Eq. (\[eq:diagHam\]). Consequently, the two systems can be addressed separately and, because $[\hat{H},\hat{\sigma}_{\rm z}] = 0$, the cavity can be used for quantum nondemolition measurements of the qubit population. The higher 