Quantization of electromagnetic field: from free-space to media

When studying the quantization of the electromagnetic field, one seems to always derive everything for free space (no charges/currents). This involves solving Maxwell's equations to find modes (in this case plane waves) that are occupied by photons.

How does this translate to situations where one also has a medium (e.g. waveguide, cavity,...)?

In practice, I see people calculating EM modes by solving Maxwell's equations as if they were classical, and then stating that this is the mode a photon can occupy. I see this is the case for free space, but I wonder what the theoretical basis is to get to the case of non-free space.

• The question can be interpreted in different ways, which call for different kinds of answers. Are you asking how to quantize the EM field in the presence of prescribed charges/currents or boundary conditions? In this case, those things can be treated as classical "background data," but then they can't be influenced by the EM field. Or do you also want the charges/currents to be influenced by the EM field? In that case, you're essentially asking for (possibly nonrelativistic) quantum electrodynamics, because the charges/currents must themselves be quantum to react to the quantum EM field. Commented Apr 10, 2021 at 17:10
• Thanks for your comment. Framing the question right is probably part of the answer. Classical Maxwell equations include charges/currents, which influence + are influenced by the EM field. In the classical case, interaction with materials is abstracted away by permittivity/permeability. I am wondering about the quantization in case e.g. a dielectric is present which has certain boundary conditions (such as a waveguide)? Can (classical) permeability/permittivity still be used in this case? This is probably the first case you describe. What's the reasoning towards classical "background data"? Commented Apr 10, 2021 at 17:35
• In a material there are also interactions with charges (e.g. electrons), so what you mean in the the first case you descibe, is that these interactions are still treated in a classical way (this then being an assumption)? And then we also end up working with permittivity/permeability of the material, solving for 'classical EM modes' which are included in the E/B-field operators just like in free-space case? Would there somewhere be a formal description of how canonical quantization happens in this case? Commented Apr 10, 2021 at 18:17
• To handle EM fields inside a non-empty medium, I think we'd need to use a model in which those "bound" charges/currents/spins can respond to the EM field, but maybe there's an easier way to do that than full quantum electrodynamics. The books Macroscopic QED: Quantum electrodynamics in material media and Methods of Quantum Field Theory in Statistical Physics might be helpful. Commented Apr 11, 2021 at 0:25
• Could you elaborate/point to a source for "things can be treated as classical 'background data', but then they can't be influenced by the EM field"? And when you talk about influencing, do you mean state transitions or also more classical interactions (like vibration) which are included in permittivity/permeability? Commented Apr 11, 2021 at 6:07