Diffractive optical elements, or DOEs, also known as Computer Generated Holograms, are flat optical components that are used to create different beam geometries or irradiance distributions.

A DOE, or CGH, works by harnessing the wave nature of light in which an input beam is no longer treated purely as a pencil of rays, but as a wave capable of self-interfering. The DOE is a piecewise array of modulating elements, or pixels, each one imparting a local phase delay whose magnitude can differ between pixels. Thus, a  beam traversing through a diffractive element and  travelling a certain distance, will change its overall shape by means of diffraction. This optical phenomena is basically  light interference among many wavelets that originate from the modulating elements in the DOE.

The relation between the precise structure of the DOE and the resulting irradiance distribution at some defined distance away from it, is described by a mathematical formalism that in most conditions can be regarded as very accurate.  Thus, for a specific target irradiance distribution or geometrical beam shape, one can calculate the desired DOE that will generate the desired target light field. This can be done by using the aforementioned mathematical formulae to simulate a back-propagation of the wave field. Nevertheless, this direct process will result in a DOE structure that contains a mixture of phase and amplitude modulating elements. In practice, and for throughput considerations, the DOE must alter only the phase of the incoming wave and not the amplitude of it. Furthermore, due to limitations in the manufacturing process of the component, the phase changes must be in discrete increments, that is, the optical path differences, or phase values, are quantised.

These constraints imposed by the manufacturing process called for specific design methods whose aim is to arrive at the best DOE structure that can deliver the desired irradiance distribution when considering the above constraints. Among the different optimisation algorithm for DOEs we can cite the following

• Direct binary search, which is a Monte Carlo method.
• Genetic algorithms.
• Iterative Fourier Transform.
• Error diffusion.

All these algorithms have their own merits and drawbacks. The most widely used algorithm is the Iterative Fourier Transform which is a variation of the Gerchberg-Saxton algorithm that is used in other fields and that has been adapted for the design of diffractive structures.  The resulting pattern is an array of pixels representing discrete phase delays that will be then etched onto a glass substrate that will become the DOE.