Based on the density operator's coherent state representation [Phys. Lett.A252, 281 (1999)], we extend the well-known Bose distribution's partition function Ξ [Formula: see text] for ideal photon gas [Formula: see text] to that of an assembly of photon gas interacting with nonlinear medium described by the Hamiltonian [Formula: see text], where A=(a1,a2,…,an), Ω is a symmetric matrix, and we report that the corresponding partition function is [Formula: see text] As a result, the generalized Bose distribution and thermodynamic functions are derived.