Background
So let's presume I have N density matrices and their corresponding Hamiltonian of each. Let the temperature of each i'th density matrix ρi be Ti of Hamiltonian Hi. Note, all the i Hamiltonians are indistinguishable (where I is a dummy index). We define
βi=1kbTi
Let's say these density matrices are put in physical contact and reach thermal equilibrium:
Nβf=N∑i1βi
where the f subscript represents the quantity after thermal equilibrium.
Now the below will be the partition of this ensemble of density matrices:
Zf=Tr e−βfρfHf
Even though this is attaining thermal equilibrium is irreversible process it can be approximated by infinitely many reversible ones given by unitary evolution under which the partition function is invariant.
Therefore:
Tr e−∑NkβkρkHk=Tr e−βfρfHf
where,
Hf=H1⊕H2⊕…HN
and
N∑kβkρkHk=β1ρ1H1⊕β2ρ2H2⊕…βNρNHN
Taylor expanding:
Tr (Ii−N∑kβkρkHk+(∑NkβkρkHk)22!+…)
=Tr If−βfρfHf−(βfρfHf)22!+…
Note: the mismatch of the first term is the identity of different Hilbert spaces.
Now, taking derivatives:
Tr ∂∂βj(I−N∑kβkρkHk+(∑NkβkρkHk)22!+…)G.M,N
=Tr ∂∂βj(If−βfρfHf+…)G.M,N
Using this one can determine ρf
Question
How does one completely solve for all βi? In the sense given intial conditions I can go to final conditions. So how does one go from final to initial? What is the matrix whose inverse is required?
Also does the above calculation mean once someone starts with a mixed state density matrix the 2'nd law of thermodynamics forbids getting rid of the "classical probabilities"?