  We study stochastic thermodynamics for a quantum system of interest whose
dynamics are described by a completely positive trace-preserving (CPTP) map as
a result of its interaction with a thermal bath. We define CPTP maps with
equilibrium as CPTP maps with an invariant state such that the entropy
production due to the action of the map on the invariant state vanishes.
Thermal maps are a subgroup of CPTP maps with equilibrium. In general, for CPTP
maps, the thermodynamic quantities, such as the entropy production or work
performed on the system, depend on the combined state of the system plus its
environment. We show that these quantities can be written in terms of system
properties for maps with equilibrium. The relations that we obtain are valid
for arbitrary coupling strengths between the system and the thermal bath. The
fluctuations of thermodynamic quantities are considered in the framework of a
two-point measurement scheme. We derive the entropy production fluctuation
theorem for general maps and a fluctuation relation for the stochastic work on
a system that starts in the Gibbs state. Some simplifications for the
probability distributions in the case of maps with equilibrium are presented.
We illustrate our results by considering spin 1/2 systems under thermal maps,
non-thermal maps with equilibrium, maps with non-equilibrium steady states and
concatenations of them. Finally, we consider a particular limit in which the
concatenation of maps generates a continuous time evolution in Lindblad form
for the system of interest, and we show that the concept of maps with and
without equilibrium translates into Lindblad equations with and without quantum
detailed balance, respectively. The consequences for the thermodynamic
quantities in this limit are discussed.
