Beams carrying orbital angular momentum (OAM), have received extensive attention since Allen demonstrated it in 1992 [1]. The topological charge l is the eigen value of OAM, and such values can take any integer value. OAM beams have many applications such as optical communications [2,3,4,5], rotation detection [6,7,8], optical tweezers [9,10,11]. In addition to OAM, beams can also carry spin angular momentum (SAM) [12]. OAM is associated with the optical wavefront while SAM with polarization. The eigen value of photons’ SAM is σ = ± 1, on a macro level corresponding to the direction of circular polarization separately.

Optical retarder elements with azimuthal rotation of the principal axes such as q-plate can convert SAM to OAM [13, 14]. Q-plate is a polarization modulation device element made of column-to-liquid crystals. The value q is variable corresponding to the rotation angle of the principle axis. For the incident beams with the SAM states ± 1, the q-plate will introduce a geometrical helical phase to the incident light, thus the outputting beam carries OAM, which can be expressed as \(\left| {L\rangle \to {{\exp }^{i2q\varphi }}} \right|R\rangle\) and \(\left| {R\rangle \to {{\exp }^{ - i2q\varphi }}} \right|L\rangle\), with \(|L\rangle={\left( {1,i} \right)^T}/\sqrt 2\) and \(|R\rangle={\left( {1, - i} \right)^T}/\sqrt 2\). Such spin-to-orbital conversion has many applications [15, 16]. However, the q-plate cannot achieve arbitrary spin-to-orbital angular momentum conversion, and vortex order is related to the q value.

Recently, Devlin et al. design an optical element named as J-plate, employing the metasurface that breaks the limitations of the incident polarization and gets completely independent OAM states output [17]. They achieve arbitrary spin-to-orbital angular momentum conversion of light and produces complex structured light. These beams are called Poincaré beams which can be represented as the points on the surface of hybrid order Poincaré sphere (HyPS) [18,19,20,21], and many applications have been found in laser material processing [22,23,24], optical trapping [25], particle acceleration [26], image encryption [27], nonlinear optics [28] and so on. Nevertheless, parameters of the metasurface production are relatively fixed. It is difficult to achieve independent regulation of each unit. Besides, the output OAM value is still defined by the fabrication design.

In this letter, we show a scheme using two cascaded spatial light modulators (SLMs) and some plates to produce programmable J-plates for the arbitrary spin-to-orbital angular momentum conversion of lights, shown in Fig. 1. Compared with the previous literatures [19, 21, 29], it is the first time, to our best knowledge, to analyze the mathematics behind the J-plate and make programmable to quantify arbitrary spin-to-orbital angular momentum conversion. The gray background part in the test arm is the proposed programmable J-plate. Another reference arm is used for the detection of the output states. Without designing complicated metasurface, any variable value J-plates function can be performed. The experimental results are consistent well with expectations.

Fig. 1
figure 1

Experimental setup of the programmable J-plate. LD laser diode, HWP half wave plate, PBS polarized beam splitter, QWP quarter wave plate, SLM liquid–crystal spatial light modulator, L plano-convex lens, BS beam splitter, LP linear polarizer, M reflector, BB beam block, CCD infrared CCD camera

To simulate J-plate and make it programming, Jones matrix is employed first to describe the mathematics behind the system in Fig. 1. The most important point in the derivation process is the decomposition of incident elliptically polarized beams, which can be represented by a pair of orthogonal circularly polarization basis \(|L\rangle={\left( {1, - i} \right)^{\text{T}}}/\sqrt 2\), \(|R\rangle={\left( {1,i} \right)^{\text{T}}}/\sqrt 2\) as:

$$\left| {{\Psi _{{\text{in}}}}} \right\rangle =\alpha \left| R \right\rangle +\beta \left| L \right\rangle ,$$
(1)

where \(\alpha\) and \(\beta\) are the complex coefficients. Now consider the transfer to get independent OAM output when left circular polarization (LCP) and right circular polarization (RCP) incident, which read as follows:

$$\left| R \right\rangle =\left| L \right\rangle| +\left. m \right\rangle \quad \left| L \right\rangle =\left| R \right\rangle| +\left. n \right\rangle .$$
(2)

Here, we write the azimuthal phase factor \({{\text{e}}^{ {\text{im}}\varphi }}\) and \({{\text{e}}^{ {\text{in}}\varphi }}\) as \(|m\rangle\) and \(|n\rangle\) for brevity. Such conversion requires the use of polarization devices as half-wave plate (HWP) and quarter-wave plate (QWP), whose Jones matrices are:

$${M_{\frac{\lambda }{2}}}\left( \theta \right)=\left( {\begin{array}{*{20}{c}} {\cos \theta }&{\sin \theta } \\ {\sin \theta }&{ - \cos \theta } \end{array}} \right)$$
(3)
$${M_{\frac{\lambda }{4}}}\left( \varphi \right)=\left( {\begin{array}{*{20}{c}} {{{\cos }^2}\varphi +i{{\sin }^2}\varphi }&{\sin \varphi \cos \varphi (1 - i)} \\ {\sin \varphi \cos \varphi (1 - i)}&{{{\sin }^2}\varphi +i{{\cos }^2}\varphi } \end{array}} \right)$$
(4)

with \(\theta\) and \(\varphi\) the angle of the fast axis of HWP and QWP, respectively.

The two polarization components of the incident beams cannot be modulated by a single liquid crystal SLM due to the modulator properties. As for SLMs, only a specific linear polarization can be pure-phase modulated [30], while the corresponding orthogonal component is unaffected. Here for the horizontal linear polarization components, SLM1 in Fig. 1 is used for modulation and SLM2 is used for reflection. While for the vertical linear polarization components, SLM2 is used for modulation \({M_{\text{r}}}\) and SLM1 is for reflection. Based on the setup in Fig. 1, we can accomplish J-plate’s transformation process using Jones matrix with a cascade of wave plates and SLMs.

Process \(\left| {R\rangle \to } \right|L\rangle|+m\rangle\) is:

$$\left| L \right\rangle \left| {+\left. m \right\rangle } \right.={M_{\frac{\lambda }{4}}}\left( { - 45^\circ } \right){M_r}{M_{\frac{\lambda }{2}}}\left( {45^\circ } \right)M\left( {m\theta } \right){M_{\frac{\lambda }{4}}}\left( {+45^\circ } \right)\left| R \right\rangle .$$
(5)

Process \(\left| {L\rangle \to } \right|R\rangle|+n\rangle\) is:

$$\left| R \right\rangle \left| {+\left. n \right\rangle } \right.={M_{\frac{\lambda }{4}}}\left( { - 45^\circ } \right)M\left( {n\theta } \right){M_{\frac{\lambda }{2}}}\left( {45^\circ } \right){M_{\text{r}}}{M_{\frac{\lambda }{4}}}\left( {+45^\circ } \right)\left| L \right\rangle .$$
(6)

with Mr, \(M\left( {m\theta } \right)\) and \(M\left( {n\theta } \right)\) the Jones matrices of the reflective mirror, SLM1 and SLM2, respectively.

According to formula (5) and (6), we explain the experimental process shown by Fig. 1 in detail. A beam with the wavelength of 1.6 µm is incident into a polarized beam splitter (PBS), which can split the beam into two orthogonal linear polarizations (p and s-polarization). P polarization is the test beam, while s polarization is the reference beam. Rotatable QWP1 is located behind the PBS and used to generate arbitrary elliptically polarized beam, which can be regarded as the linear superposition of LCP and RCP components. The fast axis of QWP2 is oriented at 45° to convert the LCP and RCP components to horizontal and vertical polarization, respectively. HWP2 is oriented at 45° which is used to exchange horizontal polarization and vertical polarization. Different holographic spiral phase plates (SPPs) are encoded on SLM1 and SLM2 (Holoeye, PLUTO-TELCO-013-C). Note that for SLM1, the value of SPP is contrary to the design because the topological charge will be opposite after the reflection by SLM2. Therefore, the right circular part and left circular part of the incident beam carry different OAMs.

In addition to the basic needs, we also use two plano-convex lenses, L1 and L2 (focal length f1 = f2 = 100 mm) to form a 4-f system. SLM has different reflectivity for horizontal and vertical polarized beam. Therefore, 4-f system can effectively avoid the situation that the beam shifts from SLM1 to SLM2.

The fast axis of QWP3 is oriented at − 45° to convert the horizontal and vertical polarization to LCP and RCP. This ensures the same circular base analysis of the incident and exit. The test beam focused by lens L3 (focal length f3 = 200 mm) interferes with the reference beam through the beam splitter (BS). An infrared CCD camera (Xenics, Bobcat-320-star) is used to monitor the beam pattern. Besides, a beam block is inserted in the reference arm to measure the intensity of the test beam. Therefore, all these devices constitute a system that simulates a J-plate, get arbitrary SAM to OAM conversion and test results by interference.

As a proof-of-concept, we test different outputting states corresponding to different incident beam. SPPs with the orders − 3 and + 4 are encoded on SLM1 and SLM2, separately.

First, for circular polarization, QWP1 is oriented at 45° and 135° to create RCP and LCP. In this case, circular polarizations are modulated into different OAM modes as \(\left| {R\rangle \to } \right|L\rangle|+3\rangle\) and \(\left| {L\rangle \to } \right|R\rangle|+4\rangle\) .These results are in keeping with the expectation, as shown in Fig. 2. Three and four petals in interference patterns are shown, which can prove our theory.

Fig. 2
figure 2

Polarized beams of different rotation directions generate different OAMs through optical systems. a, b Intensity image and interference image of the output beam. a RCP incident. b LCP incident

Second, for the linear polarization incident, beams can be decomposed into equal LCP and RCP. After the modulation, the outputting beams can be regarded as consisting of LCP and RCP carrying different OAMs. Such beams are the well-known vector vortex beams, which can be represented by the model HyPS of m = 3 and n = 4 (Fig. 3a). The experiment results are shown in Fig. 3b–e.

Fig. 3
figure 3

a The emitted beams correspond to some points lay on the HyPS. be Experimentally obtained intensity patterns through LP of points be

The longitudes of the output states on HyPS are equal to the phase difference between the two components, LCP and RCP [19]. Hence, changing the angle of the linear polarization can get longitude change on the HyPS equator, shown in Fig. 3. For these points on the equator, Fig. 3b–f shows the measured intensity patterns. Passing through the LP we can see a special image of the outputting Poincaré beams related to \(\left| {m - n} \right|{}(\left| {3 - 4} \right|=1\) here).

After observing the linear and circular polarized incident, we now talk about the most common situation that elliptically polarization incident. The horizontally polarized beam changes into elliptically polarization beam after passing through the QWP1, which reads by Jones matrix:

$$I\left( \beta \right)={M_{\frac{\lambda }{4}}}\left( \beta \right)\left( {\begin{array}{*{20}{c}} 1 \\ 0 \end{array}} \right)=\left( {\begin{array}{*{20}{c}} {{{\cos }^2}\beta +i{{\sin }^2}\beta } \\ {\sin \beta \cos \beta +i\sin \beta \cos \beta } \end{array}} \right).$$
(7)

Decomposing of Eq. (7) through the orthogonal circular polarization, one can get

$$\begin{aligned} I\left( \beta \right) & =\left( {\cos \beta \frac{{\cos \beta - \sin \beta }}{2}+i\sin \beta \frac{{\sin \beta - \cos \beta }}{2}} \right)\left| R \right\rangle \\ & \quad +\left( {\cos \beta \frac{{\cos \beta +\sin \beta }}{2}+i\sin \beta \frac{{\sin \beta +\cos \beta }}{2}} \right)\left| L \right\rangle . \\ \end{aligned}$$
(8)

With the rotation of QWP1, the incident elliptical polarization changes continuously. We capture the intensity and interference patterns when the angle β is varied from − 45° to + 45° at intervals of 10°, as shown in Fig. 4. These outputting beams consist of LCP and RCP in different proportions. One can see from Fig. 4 that the intensity and interference pattern changes constantly along the red line of HyPS. As the incident polarization changes, additional vortices are gradually revealed in the interference, which means the OAM state of outputting beam changes from 3 to 4. The experimental results are as same as the estimation.

Fig. 4
figure 4

The most common situation in elliptically polarized incidence. Experimentally obtained intensity and interference patterns. Different β of the QWP1 correspond to different exit states

To verify the variability of the system, we change the SPPs encoding on the SLMs which set \(\left| {R\rangle \to } \right|L\rangle|+3\rangle\) and \(\left| {L\rangle \to } \right|R\rangle|+6\rangle\). We measure different elliptical polarizations incidence and mark some points on HyPS to show the output beams’ states. The experiments show a gradual change process with good results, as shown in Fig. 5. Changing the phase distribution encoded on the SLM, we can get other results, such as non-integer two-beam OAM exit or different angle OAM array exit.

Fig. 5
figure 5

In the case of \(\left| {R\rangle \to } \right|L\rangle|+3\rangle\) and \(\left| {L\rangle \to } \right|R\rangle|+6\rangle\), changing the angle β of the QWP1 can get continuously changing output. Experimentally obtained intensity and interference patterns

Besides, verified J-plate can perform the desired SAM to OAM conversion from specified elliptically polarized inputs to two output states [17]. To simulate all the functions of the J-plate, we design an optical system to separately emit LCP and RCP carrying different OAMs. Spatially separating the two components allows us to observe easily and make independently measurements. Experiment is based on the original system. Special holograms are designed to achieve the separation of outputting beams, which are the phase superposition of SPPs and extra blazed gratings. Different from the produced J-plate, the angle between two components of the outputting beam is variable by changing the grating constant in our experiment. The diagrammatic sketch of experimental results is shown in Fig. 6.

Fig. 6
figure 6

Diagrammatic sketch of experiment to separate different polarization states

In conclusion, we design a system to simulate programmable J-plate and generate detachable OAM beams at any HyPS. We not only use SLM to complete all the functions of J-plate, but also change the system parameters and achieved arbitrary outputs. This flexible system can convert SAM to OAM and generate arbitrary vector vortex beam. It is possible to find applications in laser material processing, quantum communication, optical trapping and so on.