  The quantum master equation (QME), used to describe the Markov process of
interaction between atoms and field, has a number of significant drawbacks. It
is extremely memory intensive, and also inapplicable to the case of long-term
memory in the environment. An iterative algorithm for modeling the dynamics of
an atomic system in the extended Tavis-Cummings model in terms of a pure state
is proposed. The correctness of this algorithm is shown on the example of the
interaction of an atomic system with the environment through the exchange of
photons with the preservation of coherence. This algorithm is applicable to a
wide class of processes associated with photonic machinery, in particular, to
chemical reactions.
