Typically a traveling photon is described as being in a superposition of frequency modes $\hat{E} = \int g(\omega) a^\dagger_\omega d\omega + h.c. $ where often the $g(\omega)$ is some kind of pulse. Can $g(\omega)$ really be a pulse of any bandwidth? Putting it another way: Is the spectral profile of the pulse connected to the frequencies in some kind of way? For instance if these two things ($g(\omega)$ and $a_\omega^\dagger$) are independent, what stops me from having tiny attosecond pulses with small frequences associated with huge wavelengths (which won't physically span even a fraction of their wavelength across the distance of the pulse)?
Isn't that sort of contradictory? I guess if we're only paying attention to the energy of a photon and not really saying that the "wavelength" is physical then it makes sense to have a tiny pulse associated with small frequencies.