  An electron tunneling across a junction integrated into an electric circuit
can generate an excitation in the photonic field (electromagnetic environment)
and lose energy in the process. Such inelastic tunneling of particles is
commonly described using the $P(E)$ theory. In the conventional approach to
this theory, the tunneling rate and the electric current through the junction
are derived using Fermi's golden rule and by averaging over the environmental
photonic degrees of freedom. In this work, we address the same problem of
inelastic tunneling due to photonic environment in Lindbladian formalism and we
present how the photonic degrees of freedom are traced out in quantum master
equation approach. The resulting quantum master equation is parameterized by
the same $P(E)$ function and enables us to obtain not only the electric current
but various other quantities, for instance the heat current, in a systematic
and convenient way. We also demonstrate that the Lindbladian formalism provides
a comprehensive description of Bogoliubov quasiparticle tunneling through
superconducting junctions and that it properly accounts for the coherence
factors. The coherence factors become important if the normal-state density of
states is particle-hole asymmetric.
