  We present a general quantum fluctuation theorem for the entropy production
of an open quantum system coupled to multiple environments, not necessarily at
equilibrium.
  Such a general theorem, when restricted to the weak-coupling and Markovian
regime, holds for both local and global master equations, corroborating the
thermodynamic consistency of local quantum master equations. The theorem is
genuinely quantum, as it can be expressed in terms of conservation of a
Hermitian operator, describing the dynamics of the system state operator and of
the entropy change in the baths. The integral fluctuation theorem follows from
the properties of such an operator. Furthermore, it is also valid when the
system is described by a time-dependent Hamiltonian. As such, the quantum
Jarzynski equality is a particular case of the general result presented here.
Moreover, our result can be extended to nonthermal baths, as long as
microreversibility is preserved. We present some numerical examples to showcase
the exact results previously obtained. We finally generalize the fluctuation
theorem to the case where the interaction between the system and the bath is
explicitly taken into account. We show that the fluctuation theorem amounts to
a relation between time-reversed dynamics of the global density matrix and a
two-time correlation function along the forward dynamics involving the baths'
entropy alone.
