We consider the temporal evolution of the entropy S of an isolated system from an initial non-equilibrium state 2· of entropy S = S i to the equilibrium state of maximum entropy S = S max > S i. The application of usual density matrix theory of quantum mechanics leads us to the surprising result P = dS/dt = 0. The entropy does not change in time. This result is valid in case of the equilibrium state. However it is wrong for a non-equilibrium state, because the entropy of the isolated system could not spontaneously increase from S i to S max by entropy production P > 0. This contradicts the second law of thermodynamics. We avoid this discrepancy by changing from quantum mechanics to quantum thermodynamics. Now the entropy production P = dS/dt and the time t are the relevant observables. In order to treat the temporal development of S and P, we at first prepare an initial state i of entropy production P i at time t < 0. Subsequently at ϑ t ≥ 0 the initial state i interacts with a continuum of final states f, which transfers the entropy production from i to f. The temporal evolution of the entropy production P(t) of our system is treated by means of the time-dependent perturbation theory. For that reason we split the operator of entropy production P = P 0 + W into two parts. The operator P 0 describes the unperturbed basic vectors of entropy production | i > and | f >, while the perturbation operator W determines the interaction between | i > and | f >. We expand the time-dependent state function < t | ψ > of the isolated system into the complete set of stationary eigenvectors | i > and | f > and calculate the time-dependent expansion coefficients c i(t) and c(f, t) by means of the dynamic equation of quantum thermodynamics − i k (d/dt) < t | ψ > = < t | P | ψ >. Here k means the Boltzmann constant, which is characteristic of quantum thermodynamics and represents the atomic entropy unit. The expansion coefficients are given by a system of coupled differential equations, from which we deduce an integral-differential equation for the coefficient c i(t) of the initial state i. Unfortunately it has been impossible to obtain an analytic solution of the complicated equation. However approximations are available. Accordingly, in the vicinity of the equilibrium state, the probability of still finding the initial state i of entropy production P i at time t is given by ω i(t) = | c i(t) |2 = exp (−Lt). The rate constant L ≥ σ depends on the density ρ(P f) of final states f of entropy production P f near by P i, and on the squared modulus of the perturbation matrix elements W if = < i | W | f >, which determines the interaction between | i > and | f >. The entropy production P(t) = P i ω i(t) = P i exp (−ϑLt) of the isolated system decreases exponentially and irreversibly with proceeding time t. Its rate-determining step is the transfer of entropy production from i to f. The integral over the entropy production of the final states f vanishes. Therefore the continuum states f do not contribute to the total entropy production P(t). The temporal evolution of the entropy S(t) can easily be calculated by integration of P(t). In conclusion, the entropy production of a non-equilibrium state is finite P(t) > 0 and only vanishes in the case of the equilibrium state P(∞) = 0. Thus, quantum thermodynamics agrees with the second law of thermodynamics.