What is a mode in quantum optics? I am studying quantum optics and it is often cited the word "mode", in particular there are spatial and temporal modes.
I really don't know what they are. I know the general definition of modes for example looking at:
What is a mode?
but I don't know what spatial and temporal means, and why are they so important in quantum optics.
 A: First consider the idea of normal mode in classical mechanics: it is pattern of oscillation in which every part of a many-body system oscillates at the same frequency. Now take a natural generalisation to a continuous field, and in the case of the electromagnetic field you have a distribution of amplitude where the whole pattern is oscillating at a single frequency. Thus a mode is by definition monochromatic. And also, a mode is by definition extended in both space and time, so the terminology "spatial mode" and "temporal mode" can indeed be puzzling. I think that terminology is introduced in order to draw attention to the chief way in which two or more different modes are differing from one another. If they both have the same spatial distribution but different frequency then they are said to be different temporal modes. If they have the same frequency but different spatial distribution then they are said to be different spatial modes. I think in both cases this is a convenient shorthand, a way of saying
"modes of the same spatial pattern but differing frequency"
or
"modes of the same frequency but differing spatial pattern"
but in both cases the modes are neither purely temporal nor purely spatial, but spatio-temporal. However, one can of course write a monochromatic pattern of oscillation in the form
$$
f(t,x,y,z) = e^{i (\omega t + \alpha)} \phi(x,y,z)
$$
and then the function $\phi(x,y,z)$ may be called a spatial mode. This terminology is commonly adopted in discussing the field patterns inside an optical resonator for example. Also, if the resonator has a sense of direction, say circular symmetry with the symmetry axis along $z$, then the $x,y$ part is transverse and the $z$ part is longitudinal and sometimes you see people blurring the distinction between the spatial modes and the temporal behaviour, since for the eigenmodes of a cavity the two are linked.
The usage is not strictly uniform across the subject. Sometimes one sees the term "mode" applied to a dependence on time which is not simply sinusoidal; it is because the word, like may words in science, blurs over into its use in everyday speech and
people are not always careful with their definitions.
A: The term mode can sometimes be used quite loosely in quantum optics literature. Strictly speaking a mode is a solution of the equations of motion that satisfies all relevant boundary conditions. As such it is a solution that can exist independently without exciting any addition fields in the structure or space in which it exists. In a linear structure, modes would usually be monochromatic. However, if there are degeneracies, these modes can be combined to form a different set of modes.
In quantum optics, the term mode is often used to label disjoint Hilbert spaces. One can for instance have a situation where a quantum state is divided into different optical beams propagating in different direction. Such beams are respectively associated with disjoint Hilbert spaces. Therefore, the different beams may be regarded as different "modes" even if the physical spatiotemporal modes in the two beams are the same.
Hope this helps.
A: Formally, a mode in quantum optics is a solution of the electromagnetic wave equations, which can be populated with photons. This is, admittedly, quite abstract and not obviously connected to how the term is used in different sub-fields. I think, the best is, to learn it from examples.
Transveral modes
The simplest solution to Maxwell's equations is a plane wave $\vec{E}_0 e^{i(\vec{k} \cdot \vec{r} - \omega t)}$. One can consider it a mode. It's just not of any practical relevance, because it extends over all space and time – far beyond the experimental setup. But the nice thing about Maxwell's equations is that they are linear (as long as you stay away from nonlinear susceptibilities). Therefore, a linear combination of several solutions is also a solution. Prominent examples are the emission pattern of a dipole antenna or Gaussian beams. The latter one is typically used to describe the mode of a cavity, for example in a laser. You probably also heard of higher-order transversal modes in this context. All these Hermite-Gaussian, Laguerre-Gaussian, Ince-Gaussian etc. modes are just different solutions to Maxwell's equations. A nice example how they show up when the length of a cavity is scanned, can be found here.
Longitudinal modes
It is similar for the longitudinal modes of a cavity. They correspond to the frequencies $\omega$ which are resonant with the cavity. Of course, a mode can also be defined without a resonator. Take for example a laser pulse with Gaussian temporal envelope. In frequency domain, it is simply a linear combination of waves within a frequency band, with Gaussian weights of its constituents. This is just one example of how to express the temporal shape of a wave in terms of single-frequency waves by Fourier transform. If you take the transversal and longitudinal modes together, and add the polarization degree of freedom1, you can express any valid electromagnetic field as "mode".
Coherence
So far you might think that you can combine anything into a solution, and therefore the whole universe could be described by 1 single mode. To understand how anything can be multi-mode, we need to understand the principle of coherence. If the electric field at two different points in spacetime has a known phase relation, we say the field is coherent between them. So, if we know what's going on in the whole universe (the dream of every physicist), everything would be coherent. Unfortunately, even our most coherent lasers don't have a coherence time significantly longer than $1\,\text{s}$ (see here why), i.e. their phase can't be predicted more than $1\,\text{s}$ into the future.
Transversally, light can be incoherent if it is emitted by several independent sources. This video from Ben Bartlett shows how an extended light source in the center emits light. Because not all points in the source emit in phase, we see a complex interference pattern (speckle) with domains of constructive or destructive interference. The size of these domains is given by the transversal coherence length, i.e. by the length over which the phase can be predicted in the transversal direction. In the beginning the video shows the simulation on timescales of the optical cycle. From 0:09-0:17 it runs faster, on timescales of the coherence time of the source. One can see how the different regions of the source change their relative phase and therefore the domains of constructive/destructive interference shift. Finally, it speeds up to timescales much longer than the coherence time. This is the impression we have from incoherent light sources – just a homogeneous constant intensity.
Quantitatively, the coherence time of a light source is related to its spectrum by the Wiener–Khinchin theorem. The transversal coherence length can be calculated from its transversal size by the van Cittert–Zernike theorem. Basically, they both simply describe Fourier relations.
Modes within the turmoil
Even in these chaotic/thermal/incoherent light sources, people define modes. A mode is basically the volume of the 6-dimensional configuration space (position vector $\otimes$ momentum vector), within which the light is coherent. Most of the time, this boils down to coherence time and transversal coherence length, as in R. Dändliker – The concept of modes in optics and photonics (2000).
This is important for example for the experiment performed by R. Hanbury Brown & R. Q. Twiss (1956), because to observe the photon bunching, both detectors must look at the same mode. In this paper, photon bunching of a thermal light source is measured. To ensure spatial coherence, they pick up some light with a single-mode fiber2. They then filter the light spectrally to a bandwidth of $2\,\text{GHz}$ and can therefore detect photon bunching on a timescale of $\tau_c = 375\,\text{ps}$.
Last, but not least, modes have some interesting thermodynamic properties. With linear optics, you can't increase the average number of photons in a mode. There is no magical lens which combines the light from several modes into one. This is the reason why many nonlinear optical phenomena, which require a high number of photons within one mode, were experimentally demonstrated only after the invention of the laser, like the AC Stark shift or second-harmonic generation.
1: I'm neglecting the polarization as "7th dimension" of the configuration space here. For the connection between polarization, see this answer on the cross-spectral density.
2: It is called single mode, because the combination of its core size and the maximum divergence (given by the refractive index step between core and cladding) are chosen such that only 1 mode can propagate within the core. Higher-order transversal modes would have a too high divergence.
A: Easiest way to think of a mode is to think of it as an acceptable path for EM radiation ... and the easiest example is light.  (All modes of transmission of light are all paths that are integer multiples of the wavelength.)
Here are some examples:
Single mode fibre: it only accepts incoming photons of 0 degrees and only one path is allowed in the fiber.  Other photons will be reflected.
Multimode fiber: accepts more than one mode ... i.e. can accept light from a narrow or wide cone of light, multiple pathways in the fiber.
Glass window: almost all angles accepted, i.e. many many modes.  About 3.5% of photons are rejected at the front of the glass and 3.5% at the back. (Depends on smoothness and thickness of glass)
Treated glass window: can have more modes that regular glass due to antireflection coatings and/or thin films which are tuned for certain wavelengths (tuned means certain thickness and materials with certain refractive indexes).
Laser cavities: band gap of material is matched to cavity dimensions in terms of multiples of wavelength.
Double Slit Experiment: all photons are only permitted in bright areas ... these paths are the modes ... there are no modes or no photons in the dark bands.
Fresnel's equations of refection and transmission are a consequence of modes. Feynman's path integral is a method of calculating modes.  A mode can be thought of as a resonant (multiples of lambda) pathway for light.
All of the above are examples of spatial modes.  Temporal modes are used to describe emitted light qualities, if we had a perfect laser with a very thin cavity that emitted perfectly continuously we would have a single mode laser.  A laser diode does not emit continuously when closely studied, there are many areas in the semiconductor that are spontaneously lasing on there own, although it looks like one beam there are many sources inside that are stopping and starting ..... each emission is a separate mode .... laser diodes have many temporal modes (made up of many single temporal modes).
Without spatial modes (paths) there are no temporal modes (emission).
