Effect on the partition function upon the mixing of two ideal gases
The fact that $Q_{\mathrm{initial}} = Q_{A}Q_{B}$ implies that the two subsystems, respectively consisting of gas A and gas B, are independent. Because $\log Q_{\mathrm{initial}} = \log Q_{A} + \log Q_{B}$, it follows that various extensive thermodynamic quantities (e.g., internal energy, free energies, entropy) of the total system are simply given by the sum of the corresponding quantities of the subsystems.

The partition functions are doubled because each gas occupies double the initial volume after mixing, i.e., $V \rightarrow 2V$.