- qspec.simulate.Polarization ( vec = None , q_axis = 2 , vec_as_q = True , instance = None )[source]
Class representing a polarization state of light. The property
Polarization.xholds the polarization vector in cartesian coordinates. The propertyPolarization.qholds the polarization vector in the helicity basis $(\vec{\sigma}^-, \vec{\pi}, \vec{\sigma}^+)$ for the given quantization axisq_axis.- Parameters:
-
- vecarray_like
The complex-valued polarization vector $\vec{\varepsilon}$ of an electromagnetic wave / photon. The user input is normalized to a vector with length 1. The default value corresponds to linear polarization in $z$-direction, such that
Polarization.x = [0, 0, 1]andPolarization.q = [0, 1, 0].- q_axisarray_like
The quantization axis used to transform
Polarization.xandPolarization.qinto each other. Must be an integer in{0, 1, 2}or a 3d-vector. The default isq_axis = 2(z-axis).- vec_as_qbool
Whether
vecis given in the helicity basis (True) or in cartesian coordinates (False). The default isTrue.- instanceqspec.simulate.Polarization | ctypes.LP_c_char
An existing
Polarizationinstance. If this is specified, the other parameters are omitted.