in energy [Fig.~\ref{fig:figure_2}(b)]. From Eq.~(3), they are given by
\begin{align}
|\tilde{1}\rangle &= \cos\theta_{12}|g,0,0\rangle - \sin\theta_{12}|e,0,0\rangle, \tag{4} \\
|\tilde{2}\rangle &= \sin\theta_{12}|g,0,0\rangle + \cos\theta_{12}|e,0,0\rangle, \tag{5} \\
|\tilde{3}\rangle &= \cos\theta_{34}|e,1,0\rangle - \sin\theta_{34}|g,1,0\rangle, \tag{6} \\
|\tilde{4}\rangle &= \sin\theta_{34}|e,1,0\rangle + \cos\theta_{34}|g,1,0\rangle, \tag{7} \\
|\tilde{5}\rangle &= \cos\theta_{56}|g,0,1\rangle - \sin\theta_{56}|e,0,1\rangle, \tag{8} \\
|\tilde{6}\rangle &= \sin\theta_{56}|g,0,1\rangle + \cos\theta_{56}|e,0,1\rangle, \tag{9}
\end{align}

\begin{align}
\theta_{12} &= \arctan[2\Omega_d/(\omega_{|e,0,0\rangle}-\omega_{|g,0,0\rangle})]/2, \tag{10} \\
\theta_{34} &= \arctan[2\Omega_d/(\omega_{|g,1,0\rangle}-\omega_{|e,1,0\rangle})]/2, \tag{11} \\
\theta_{56} &= \arctan[2\Omega_d/(\omega_{|e,0,1\rangle}-\omega_{|g,0,1\rangle})]/2. \tag{12}
\end{align}

The radiative decay rate from $|\tilde{j}\rangle$ ($j=3,4$) to $|\tilde{i}\rangle$ ($i=1,2$) is given by $\tilde{\kappa}_{ji}^a=\kappa_a|\langle \tilde{j}|a^\dagger|\tilde{i}\rangle|^2$. We confirm that $\tilde{\kappa}_{31}^a=\tilde{\kappa}_{42}^a$, $\tilde{\kappa}_{32}^a=\tilde{\kappa}_{41}^a$, and $\tilde{\kappa}_{31}^a+\tilde{\kappa}_{32}^a=\tilde{\kappa}_{41}^a+\tilde{\kappa}_{42}^a=\kappa_a$. Namely, $|\tilde{3}\rangle$ and $|\tilde{4}\rangle$ decay in two directions satisfying the sum rule of decay rates. Similarly, $\tilde{\kappa}_{51}^b=\tilde{\kappa}_{62}^b$, $\tilde{\kappa}_{52}^b=\tilde{\kappa}_{61}^b$, and $\tilde{\kappa}_{51}^b+\tilde{\kappa}_{52}^b=\tilde{\kappa}_{61}^b+\tilde{\kappa}_{62}^b=\kappa_b$. Figure~\ref{fig:figure_2}(c) plots $\tilde{\kappa}_{ij}^a$ and $\tilde{\kappa}_{ij}^b$ as functions of the drive power. In the drive-off case ($\Omega_d=0$), $\tilde{\kappa}_{32}^a=\tilde{\kappa}_{41}^a=\kappa_a$, $\tilde{\kappa}_{51}^b=\tilde{\kappa}_{62}^b=\kappa_b$, and others vanish. This represents the simple decay of the resonator modes preserving the qubit state [Fig.~\ref{fig:figure_2}(a)]. As we increase the drive power, the decay rates for resonator A are inverted, whereas those for resonator B remain almost unchanged. This is because of our choice of the drive frequency $\omega_d$. At $\Omega_d=\Omega_d^{\mathrm{imp}}$ in Fig.~\ref{fig:figure_2}(c), the four decay rates concerning resonator A become identical. Then, a resonant signal photon deterministically induces a Raman transition of $|\tilde{1}\rangle \rightarrow |\tilde{j}\rangle \rightarrow |\tilde{2}\rangle$ ($j=3,4$). Regarding resonator B, we should make $\tilde{\kappa}_{52}^b (=\tilde{\kappa}_{61}^b)$ as small as possible to suppress the $|\tilde{1}\rangle \rightarrow |\tilde{k}\rangle \rightarrow |\tilde{2}\rangle$ and $|\tilde{2}\rangle \rightarrow |\tilde{k}\rangle \rightarrow |\tilde{1}\rangle$ transitions ($k=5,6$). For this purpose, $\omega_d$ close to $\omega_q-2\chi_a$ is advantageous. We set $\omega_d/2\pi=4.905$ GHz [5 MHz above $(\omega_q-2\chi_a)/2\pi$]. Thereafter, which results in $\Omega_d^{\mathrm{imp}}/2\pi=10.897$ MHz. Then, $\cos^2\theta_{12}=0.99$, $\cos^2\theta_{34}=0.61$, and $\cos^2\theta_{56}=0.96$. Namely, the dressed states $|\tilde{1}\rangle$, $|\tilde{2}\rangle$, $|\tilde{5}\rangle$, and $|\tilde{6}\rangle$ are almost identical to the bare states $|g,0,0\rangle$, $|e,0,0\rangle$, $|g,0,1\rangle$, and $|e,0,1\rangle$, respectively. $\tilde{\kappa}_{52}^b (=\tilde{\kappa}_{61}^b)$ is about $0.6\%$ of $\kappa_b$.

\section{SNR AND DETECTION EFFICIENCY}

In the proposed detector, a signal photon is expected to excite the qubit with a high probability. In order to continuously monitor this event, we apply a probe field, $E_p(t)=E_p e^{-i\omega_p t}$, through waveguide B \cite{21,22,23,24}. From Eq.~(2), the resonant frequency of resonator B depends on the qubit state. This is reflected in the phase shift of the probe field upon reflection. The phase shift $\theta_g$ for the qubit ground state is given by $\theta_g=2\arctan[\kappa_b/2(\omega_b-\omega_p)]$, and $\theta_e$ for the qubit excited state is obtained by replacing $\omega_b$ with $\omega_b-2\chi_b$. Thereafter, in order to suppress the $|\tilde{1}\rangle \rightarrow |\tilde{5}\rangle$ transition, we set the probe frequency at $\omega_p=\omega_b-2\chi_b$ rather than the usually chosen condition $\omega_p=\omega_b-\chi_b$. This results in $e^{i\theta_g}=(3+4i)/5$ and $e^{i\theta_e}=-1$. We measure one quadrature of the reflected field for discriminating the qubit state. We infer the qubit state through the time-averaged probe field with an integration time $\Delta t$. The signal-to-noise ratio (SNR) is given, assuming that the noise is purely of quantum origin, by

\begin{equation}
\mathrm{SNR}=\sqrt{\frac{\kappa_b\langle n_b\rangle \Delta t}{4}}\,|e^{i\theta_g}-e^{i\theta_e}|,
\tag{13}
\end{equation}

where $\langle n_b\rangle=4|E_p|^2/\kappa_b$ represents the probe power in terms of the mean photon number in resonator B \cite{2}. The readout fidelity $\mathcal{F}$ is given by

\begin{equation}
\mathcal{F}=\mathrm{erf}(\mathrm{SNR}/\sqrt{2}),
\tag{14}
\end{equation}

where $\mathrm{erf}$ denotes the error function \cite{29}. In practice, the noise could be enhanced by technical reasons such as the noise from the amplifiers. Here, we assume the noiseless phase-sensitive amplification preserving the SNR \cite{30}.

The single-photon detection efficiency $\eta$, which is the probability to find the qubit excitation, is evaluated as follows. We denote the qubit excitation probability by $p_e(t)$. Since we infer the qubit state through the time-averaged amplitude, we introduce the time-averaged excitation probability,

\begin{equation}
\bar{p}_e(t)=\frac{1}{\Delta t}\int_{t-\Delta t}^{t} dt'\,p_e(t'),
\tag{15}
\end{equation}

and find the maximum probability $\bar{p}_e(t_m)$ in time. Considering the probability to correctly infer the qubit state is $(1+\mathcal{F})/2$, $\eta$ is given by

\begin{equation}
\eta=\bar{p}_e(t_m)\frac{1+\mathcal{F}}{2}+[1-\bar{p}_e(t_m)]\frac{1-\mathcal{F}}{2}.
\tag{16}
\end{equation}

$\eta \simeq 1/2$ for a low SNR, implying that the qubit state is completely indistinguishable. In contrast, $\eta \simeq \bar{p}_e(t_m)$ for a high SNR. Note that the detection efficiency is defined in terms of the quantum jumps in actual measurements. In Appendix B, we observe that the present detection efficiency, which is based on the time-averaged qubit excitation probability, is justified by considering the quantum jumps.

\section{NUMERICAL RESULTS}

In this section, we observe the microwave response of the qubit-resonator system to the signal photon and evaluate the detection efficiency of the detector. The equations of motion used in the numerical simulation are presented in Appendix A.

\subsection{Impedance matching}

In the proposed setup, we input a signal photon through waveguide A. Here, in order to find the optimal operating point of the detector, we apply a weak continuous field $E_s(t)=E_s e^{-i\omega_s t}$ through waveguide A and observe its reflection coefficient. The amplitude $|r_s|$ of the reflection coefficient is plotted in Fig.~\ref{fig:figure_2}(d). We observe that impedance matching ($|r_s|\simeq 0$) takes place at $\Omega_d \simeq \Omega_d^{\mathrm{imp}}$ and $\tilde{\omega}_{31} \lesssim \omega_s \lesssim \tilde{\omega}_{41}$, where $\tilde{\omega}_{ji}$ denotes the transition frequency between $|\tilde{j}\rangle$ and $|\tilde{i}\rangle$. This indicates that each signal photon induces the Raman transition in the A system and is absorbed deterministically.