The problem lies with constructing the partition function of a system whose degrees of freedom are field quantities, rather than energetic quantities. In the classical Boltzmann formulation, the partition function is a sum over exponentials whose arguments are functions of the energies of the corresponding microstates:

The partition function ultimately goes into the calculation of how
likely it is that a system will be in a given state subject to
constraints and may determine important system parameters such
as total energy and entropy.

Importantly, in the equation above, the energy

*Es*of each microstate is a sum of the energies of each degree of freedom in the system. For example, the energy associated with a microstate of a container of gas is the sum of all the energies of the gas molecules in that microstate. However, if the degrees of freedom of the system are best described by field quantities, then the energy of a given microstate becomes nontrivial. Fields are represented by two numbers (real and imaginary parts) and*the energy carried by the total field is not simply the sum of the energies corresponding to each degree of freedom taken alone*.
This result is commonly known in optics. Irradiance (which intuitively may thought of as how much energy a beam carries) is the time-averaged square of the electric field. Two beams that are coherent and allowed to interfere with one another will produce a different irradiance than two incoherent beams. As another example, electrical engineers know that the power delivered to a device is a product of current and voltage, which are also field quantities. The power thus becomes a function of the phase lag between the two.

The conclusion is that the energy of a microstate now depends on the sum of field quantities, which depends on quantities like their relative phase and state of coherence. This makes the

*Es*appearing in the equation above much more difficult to calculate.
I have just discovered the topic of statistical field theory, which apparently deals with the statistical mechanics of fields, but it looks a bit difficult and may require a large amount of time to grasp its concepts.