  A theory of detection of microwave photons with a flux qubit-based detector
is presented. We consider semiclassical approximation with the electromagnetic
field being in a coherent state. Flux qubit is considered as a multilevel
quantum system (qudit). By solving the Lindblad equation, we describe the time
evolution of occupations of the qudit's levels for readout and reset stages of
detection. When considering the reset stage, the time evolution is described by
multiple avoided-level crossings, thus providing a multilevel
Landau-Zener-Stuckelberg-Majorana (LZSM) problem. In addition to numerical
calculations, we present an approximate analytical solution for the description
of the reset stage dynamics based on the adiabatic-impulse approximation and
rate equation approach. Our theory may be useful for the theoretical
description of driven-dissipative dynamics of qudits, including applications
such as single-photon detection.
