{'fraction_non_alphanumeric': 0.027865555874748635, 'fraction_numerical': 0.01545532892846883, 'mean_word_length': 4.303473491773309, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Polarization

We discuss an optical system that encodes an input signal to a polarization state, using a spatial light modulator (SLM). Using two SLMs the optical system multiplexes two 2D signals in the polarization domain, and we demonstrate the multiplexing of two binary images. The encryption and decryption of two binary images using an XOR operation is also presented.


Introduction
There has been a great deal of interest recently in spatially encoding the polarization state of coherent light. Simon and Mukunda 1 and Bagini et al. 2 proved that an arbitrary nonabsorbing optical element acting on the polarization of a wave can be synthesized by using two quarter-wave plates and one half-wave plate. Based on this principle, polarization encoding schemes that use liquid crystal spatial light modulators (SLMs) to generate arbitrary states of elliptical polarization and to rotate the principal axis of that elliptical polarization have been proposed. [3][4][5] Thus the polarization of light has been used to process and relay information. Polarization multiplexing has been used to improve the capacity of holographic memories by using materials that can maintain the polarization state of the recorded beam during readout. 6 Polarization encoding techniques have been used for image encryption applications [7][8][9][10][11][12] and to perform optical logic operations such as XOR and XNOR. 13 In this paper we discuss and experimentally demonstrate an optical system that can encode 2D signals (images) as distinct polarization states. An optical system with a single SLM can be used to transform a single signal space to a polarization space. Using two SLMs, an optical system can therefore perform a transformation from the two input signal spaces into a polarization space. If each of the input signals can assume N values, and the optical system can generate distinct polarization states for each N 2 combination of the two input signal values, then the resulting output signal can be a multiplexed version of the two input signals. Such a system is presented here.
By performing suitable transformations, one can also perform algebraic operations on the input signals. We implement an XOR operation that is of particular interest for image encryption applications. By measuring the azimuth and angle of the output polarization states by using an analyzer and a CCD camera, the output signal can be represented as a Jones vector. Finally, we present some experimental results as a first proof of concept.

A. Encoding as Polarization States
Consider the optical system shown in Fig. 1(a). This optical system consists of some polarization elements-linear polarizers, wave plate retardersand a programmable birefringence device (SLM). A linear polarizer transforms any polarization state at its input to a linear polarization state in the direction of its transmission axis. A wave plate transforms the polarization of light without losses. Following Nicolás et al., 14 all the linear polarizers and wave plates are lumped together and shown as polarization elements (PEs) in Fig. 1(a). The state of the optical system shown in Fig. 1(a) is determined by the configuration of the PEs and the device settings of the SLM. An input signal (image) is transformed to a gray level value and displayed on the SLM pixels. Each gray level displayed on the SLM has associated with it some polarizing effect (anisotropy). Depending on the state of the optical system, the polarization of the input light is transformed to a new polarization state. Let the 2D input signal (image) be represented by m discrete samples (pixels). For our discussion we examine a pixel of the optical system and the corresponding sample (pixel) of the signal (image). Let T g represent the mapping that transforms a signal s i to a gray level state g of the SLM: where S i is the input signal space which is the set of possible values that the input signal can assume, and G is the set of all gray level values that can be displayed on the SLM. For a given state of the optical system and SLM pixel state (the gray level displayed on a SLM pixel) g, the optical system transforms the polarization state of input light p to a new polarization state p o given by where P is the polarization space, which is the set of all possible polarization states. Each element in this set is a 2 ϫ 1 normalized Jones vector. M SLM g represents a 2 ϫ 2 Jones matrix that characterizes the polarization effects of the SLM for a gray level g and can be determined by the method outlined in Nicolás et al. 14 M PE represents a 2 ϫ 2 Jones matrix of the PEs generated by multiplying the combined Jones matrices of the individual parts. From Eqs. (1) and (2) it can be seen that for a given state of the optical system and polarization of input light p, the optical system transforms the input signal s i to a polarization state p o . If T p represents this transformation then Figure 1 (b) shows the equivalent transformation performed by the optical system in Fig. 1(a). The input signal s i is transformed to a gray level state g of the SLM. For a given gray level state g, the optical system transforms the input polarization state p to a new state p o . The optical system functions as a polar-  ization encoder, as shown in Fig. 1(c), encoding a signal s i into a corresponding polarization state p o .

B. Multiplexing Two Signals
Figure 2(a) shows an optical system (OS) that is a cascade of two of the optical systems shown in Fig. 1(a) inside the boxes. Each of these subsystems denoted by OS 1 and OS 2 can be analyzed as in Subsection 2.A. We denote the variables associated with OS 2 by "^" to distinguish them from OS 1 . Let T g represent the mapping that transforms a signal ŝ i to a gray level state ĝ in OS 2 : For a given state of the optical system OS 2 and a pixel state of SLM2 ĝ, the polarization state of light input to OS 2 , p, is transformed to a new state p o given by In Eq. (5), p, the polarization state of light input to OS 2 , is the output polarization state p o of OS 1 . M SLM ĝ represents a 2 ϫ 2 Jones matrix that characterizes the polarization effects of the SLM for a gray level ĝ. M PE represents a 2 ϫ 2 Jones matrix that characterizes the PE of OS 2 . For a given state of the optical system and polarization of input light p o , the optical system OS 2 can be seen to be transforming the input signal ŝ i to a polarization state p o . If T p represents this transformation, then Figure 2(b) shows the transformation performed by the optical system shown in Fig. 2(a). The signals s i and ŝ i are transformed to a polarization state p o by the optical system. If T denotes this transformation then Figure 2(c) shows the functional diagram of the optical system as a multiplexer, i.e., multiplexing two signals s i and ŝ i into a polarization state p o . If the optical system can generate distinct polarization states p o for every ordered pair in the Cartesian product set S i ϫ S i , or, in other words, if every element in the set S i ϫ S i has different images in P, then it is possible to multiplex the two input signals s i and ŝ i . If T o represents the transformation that maps the output polarization state p o to an output signal state s o then and S o represents the output signal space, which is the set of possible values that the output signal from the optical system can assume. The transformations T and T o are illustrated in Fig.   3 for the case when both input signals are binary valued. When there is a bijection between the polarization space and a subset of the output signal space as shown in Fig. 3(a), i.e., when each polarization state is mapped to a distinct value of output signal, then the output is a multiplexed signal of the two inputs.
One could also implement algebraic operations on the input signal space by choosing an appropriate transformation T o . In Fig. 3 (b) we present an XOR operation, , acting on the two binary input signals where

Experiments
A. Optical System Figure 4 shows the optical system used for our experiments. Light from a coherent laser source ͑ ϭ 532 nm͒ is passed through a polarizer P (PE in Fig. 2) with its axis at 30°to the reference laboratory axis (i.e., to the polarization axis of the laser light). The two SLMs (Holoeye Model LC 2002, 832 pixels ϫ 624 pixels, pixel pitch of 32 m), 15 are cascaded by using a unit magnification imaging system imple-  mented by using two lenses. A spatial filter is placed in the Fourier plane of the system to pass only the zeroth order from SLM1. This is done to make the output signal of the optical system spatially uniform. A wave plate (retardance ϭ 90°at ϭ 532 nm) is placed between the two SLMs (PG2 in Fig. 2). The configuration of the PEs was chosen to generate four polarization states that are well separated. The signal-to-noise ratio (SNR) of the optical system will depend on the separation of the polarization states, as discussed later. The fast axis of the retarder is at an angle of 22.5°to the reference axis. An analyzer along with a CCD camera is used to convert the output optical signal to an electrical signal as described in Subsection 3.B. A lens images the plane of the second SLM to a CCD camera (Imperx Model IPX-1M48, 1000 pixels ϫ 1000 pixels, pixel size of 8 m). 16

B. Measurement of the Output Polarization States
We use the Jones vector ͫ ͱI cos ͱI sin e iͬ to represent the polarization states, where I is the total intensity, and and are the azimuth and angle of the polarization state. 14,17 Figure 5(a) shows the representation of this polarization state on a Poincaré sphere. Figure 5(b) shows the relation of and in terms of the elliptical parameters ␣ (azimuth) and ⑀ (ellipticity angle). By performing three intensity measurements with an analyzer, we can estimate and and thus identify the Jones vector of the field. The intensity measured when the axis of the polarizer is to the reference axis is given by 17 I ϭ I ͩ cos 2 cos 2 ϩ sin 2 sin 2 ϩ sin 2 sin 2 cos 2 ͪ .
The three intensity measurements are performed with the polarizer axis at angles of 0°, 45°, and 90°. The measured intensities are given by the equations I 0 ϭ I cos 2 , I ͞2 ϭ I sin 2 , The intensity I can be found by adding I 0 and I ͞2 and needs to be measured only once. The values of and that characterize a polarization state are given by The above measurements determine between 0°a nd 90°and between 0°and 180°. To determine between 0°and 360°, an additional quarter-wave plate is used. The axis of the polarizer is set at a 45°a ngle, and the fast axis of the wave plate is along the reference axis. The measured intensity in this case is given by

C. Classification of Polarization States
The system is characterized by measuring the polarization states corresponding to each element of the output set S i ϫ S i . For our study we chose binary valued images as our input. The system then generated four distinct polarization states for each of the four elements in the set S i ϫ S i . Two image patterns, as shown in Figs. 6(a) and 6 (b), are displayed on the two SLMs. The gray level values corresponding to the signal values 1 and 0 are, for SLM1, 0 and 170, and for SLM2, 0 and 255, respectively. The output signal intensity (total image area) was measured by 500 pixels ϫ 500 pixels of the CCD (with a sampling interval of 8 m). Spatial intensity measurements of 250 ϫ 250 ͑25% of the image area) were performed for each state. Each measurement was averaged over ten frames captured at different times. The polarization states were calculated from the intensity measurements. The histograms of the measurements of the (angle) and the (azimuth) for each of the four polarization states are shown in Fig. 7. The estimated polarization states are shown as a 2D histogram in Fig. 8. There is some variation in the estimated values of and , as shown by the histogram plots in Figs. 7 and 8. This appears to be primarily due to the noise generated both randomly and systematically within the optical system. The principal random sources of noise 18 are the optoelectronic equipment (the SLM and the CCD) and the environment. Thus thermal noise, shot noise, relative intensity noise, and SLM internal noise are the main sources of random noise. The main source of systematic errors appears to be due to the spatial nonuniformity in the SLM pixel response, pixel-to-pixel mismatch between the two SLMs, misalignment errors, and lens aberration errors. 18 If there are k equally likely polarization states in the output, based on the estimated values of and we calculate the SNR by using a metric similar to the Fischer ratio 19 In Eq. (14) , i and v , i denote the mean value and variance of the ith polarization vector P i , d͑ , i , , j ͒ denotes the Euclidean distance, and L denotes the number of distinct pairs of polarization states equal to k C 2 . The mean and variance of the four polarization states measured for the two image patterns shown in Figs. 6(a) and 6(b) are given in Table 1. Using these values, the estimated SNR of the optical system is 1.66. It may be noted that for a given noise in the optical system, the SNR can be maximized by choosing the polarization states that maximize the Euclidean distance between these states. The polarization states achieved in turn depend on the operating characteristics of the SLM and the configuration of the polarization elements used.
We used the measured polarization states to develop a three-layer feed forward backpropagation neural network trained by using the Levenberg-    Marquardt algorithm. 20 The two hidden layers have five neurons each with tan-sigmoid transfer functions where neurons take an output between Ϫ1 and ϩ1 for inputs ranging from Ϫϱ to ϩϱ. The output layer has two neurons with linear transfer functions. The trained network is used to classify a polarization state generated by the optical system for different sets of input signals. Postprocessing was carried out after classification. Each SLM pixel corresponded to 4 CCD pixels ϫ 4 CCD pixels, hence the image recorded by the CCD was downsampled by a factor of 4 by averaging over each of these nonoverlapping blocks of 4 pixels ϫ 4 pixels. A median filter 21 with a window size of 7 ϫ 7 was applied to the data to reduce the high spatial frequency noise prior to downsampling. Figures 6(c), 9(c), and 10(c) show the multiplexed outputs of the optical system for the input signals shown in Figs. 6(a) and 6(b), 9(a) and 9 (b), and 10(a) and 10(b), respectively. The four polarization states in all these output images are represented in the figures as four different gray levels.

Encryption and Decryption by an XOR Operation
The multiplexed signals shown in Figs. 6 -9 contain complete information about the individual signals. In other words, it should be possible to retrieve (demultiplex) the two signals from the multiplexed signal. In the case where the output signal is an XOR of the two input signals [as shown in Fig. 3(b)], it is possible to retrieve one signal only with complete knowledge of the other signal. This is of interest in applications    10(b). This XOR operation is done digitally. The decrypted signal found by using the correct key is shown in Figs. 11 (b) and 12 (b). In Fig. 11 (b), 5.88% of the pixels are in error. Figure 11(c) shows the same decrypted image after applying a median filter with a window size of 7 ϫ 7. The bit error rate has been reduced to 3.34%. In Fig. 12 (b), 12.63% of the pixels are in error. Figure 12(c) shows the decrypted image after applying a median filter with a window size of 7 ϫ 7 with the results that the bit error rate is reduced to 7.91%. Figures 11 (d) and 12(d) highlight the distribution of the error pixels in Figs. 11(c) and 12(c), respectively.

Conclusion
We have demonstrated an optical system based on the use of SLMs that is capable of multiplexing two signals in the polarization domain. We described the optical system as performing a transformation between signal space and polarization space. For a given noise in the optical system, the SNR can be maximized by generating polarization states that are well separated. The upper limit for the number of distinct polarization states that can be achieved is determined by the noise in the optical system. The polarization states used in this paper are not optimized to achieve maximum Euclidean distance separation. Such an optimization procedure would involve a search procedure over a set of parameters to maximize a cost function chosen as the Euclidean distance between the states. The parameters would be the configuration states of the polarization elements and the Jones matrix elements of the SLM at the chosen operating point.
Using such a system one can also perform algebraic operations on the input signal space. We demonstrated an XOR operation that is of interest in image encryption applications. We have also discussed and experimentally demonstrated the conversion of the resulting output optical signal and its capture by using an analyzer and a CCD to detect the polarization states. We note that the polarization encoding and multiplexing system discussed here could find applications in holographic data storage where polarization multiplexing could be used to increase the storage capacity of recording materials that maintain polarization between recording and readout. 6 -9