Chapter 4 Field quantization in optics