LabView Code for Generating Arbitrary Optical Beams


This package is built to control the transverse degrees of freedom of a photon or electromagnetic field. It provides an easy to use interface and control for all the different variables of photon and spatial light modulator (SLM). To work the package one must set the number of columns and rows in the amplitude matrix; these correspond to the pixel dimensions of the SLM. Afterwards the mode, which you want to generate on the SLM can be made, it can either be an LG, HG or Vortex mode and you can choose the values for different parameters such as m, n and relative phase between superpositions.  The weight allows you to do weighted superposition of different modes. Since the laser does not always fall on the exact middle of the SLM there are two different ways to move the hologram of the SLM, you can either change the x and y center of the SLM (3rd panel to the right on the top row) you can also move the top left of the hologram (4th panel to the right on the top row). The x and y angle control the angle of the blazing function and they can be changed for optimizing the output of the SLM. The masking that comes with the program is by Karimi et al [1,2] which provides an exact  solution for intensity and phase encryption for an SLM. Because some SLM‘s come with calibration files, this program allows the user to upload these files to create a more accurate hologram. Not all SLMs operate optimally at a grey scale of 255, so an option to scale the grey scale is provided. Also provided in the program are visual representations of the field intensity and phase in addition to the pattern on the hologram. The package is available for download in a .llb file.  To use it all one must do is click on the link and open the library.
This package was built by Filippo Cardano [1], Hammam Qassim with some minor modifications by Nicolas Bent [2].  A thanks go to Miles Padgett group which supplied us with some of the sub VI’s used in the program.
Related publication
  1. Test of mutually unbiased bases for six-dimensional photonic quantum systemsScientific Reports 3, 2726 (2013).
  2. Exact solution to simultaneous intensity and phase encryption with a single phase-only hologramOptics Letters 38, 3546 (2013).


Quantum Optics Mathematica Package


This package is built to manipulate the spin angular momentum (SAM) and orbital angular momentum (OAM) of light with optical components such as: Wave-Plates (WP), Beam Splitter (BS), Polarizing Beam Splitter (PBS), Q-Plate (QP), Pitch-Fork Hologram (HOLO), Mirror (M), Optical Fiber (OF), Dove Prism (DP), and Mach-Zehnder Interferometer (MZ). The photon state in our package has been considered as a Ket p[s,m], where p is the photon linear momentum and can takes two values of u and d associated to the beam which is going up and downs is the photon polarization state and can takes any superposition of the six values of {H,V,L,R,A,D} correspond to Horizontal, Vertical, Left-circular, Right-circular, Anti-diagonal and Diagonal polarization states, respectively.

Finally m = {…,-2, -1, 0, 1, 2, …} is the orbital angular momentum of the photon.

The beta-version of the Quantum Optics Mathematica package is available for download via this page.

In order to install the package follow the below steps:

  1. Download the beta-version of the package.
  2. Unzip it.
  3. Put the unzip folder inside the Applications folder of your $UserBaseDirectory, i.e. $UserBaseDirectory/Applications of your PC. You must then run Mathematica and type $UserBaseDirectory, then press Shift+Enter. 
  4. Close Mathematica program.
  5. Lunch Mathematica again, and go to palette on the side bar and look for the Quantum Optics Palette (see the image).
  6. In order to load the package just run the first bottom, i.e. Needs[“QuantumOptics`Photon”].
  7. Enjoy!

Here find useful examples of the package elements.

This package has been created by Prof. Ebrahim Karimi and Prof. Enrico Santamato. Using and publishing this package for non-commercial purposes is free. However, users should address the package in case of scientific researches.