Introduction

Generating, manipulating, and detecting the optical state of polarization (SOP) is of paramount importance in many areas, such as optical communication1, sensing2, microscopy3, and quantum information and computation4. While progress in material growth and nanotechnology are enabling advances in active polarization control5,6,7, the measurement of light polarization remains limited by its intrinsic vectorial nature. Complete determination of a single SOP needs at least four individual measurements, each projecting the state on a distinct vector8,9,10. Conventional polarimetry methods replicate in time or space the polarization analyzer, which results in bulky optical setups, or in costly compact polarimeters based on metasurfaces11,12,13,14,15,16,17,18. While for uniformly-polarized light the need for several measurements is still affordable and can be mitigated by using specific optical devices19, it becomes a serious issue for beams with a spatial polarization structure.

Light with non-uniform polarization across the transverse plane exhibits non-separable correlations between polarization and spatial modes20. These vector beams recently have disclosed unique potentials in metrology21,22,23, communication24,25, optoelectronics26, optomechanics27, and quantum information28,29. However, their characterization still relies on bulky polarization optics30,31,32,33,34. Fast, accurate, and compact polarization measurement is crucial for exploiting vector beams in widespread applications.

In this article, we demonstrate compact single-shot measurements of multiple polarizations by photonic machine learning. We map the beam polarizations into a complex spatial distribution of intensity corresponding to a point in a high-dimensional feature space. Then, supervised learning extracts polarization information from the intensity data. The critical point is that we avoid projecting on a polarization basis and perform no direct operation on the polarization state. The method thus removes the need for polarization optics and engineered devices in polarization imaging. We report accurate measurements of various beams encoding multiple SOP, including the case in which the number of polarization modes is unknown and inferred by the measurements. An unexpected outcome is the experimental evidence of the double descent, a phenomenon that is attracting attention in machine learning35. The double descent increases the classification accuracy when the dimension of the feature space is large. This effect improves the observation fidelity of the multiple SOP and enables high-precision measurements.

Results

Single-shot polarimetry via light scattering and learning

Figure 1 reports our methodology. We show a representation of the SOP given by the four-component vector \(\left|s\right\rangle=\left|{S}_{1},\,{S}_{2},\,{S}_{3},\,{S}_{0}\right\rangle\), with Stokes parameters Si. The system phase space is the unit sphere, known as the Poincaré-Bloch (PB) sphere. A projective measurement returns the components of the incident state \(\left|s\right\rangle\) in a set of analysis vectors (Fig. 1a). Given a minimal set of four independent detected optical powers \(\left|p\right\rangle=\left|{p}_{1},\,{p}_{2},\,{p}_{3},\,{p}_{4}\right\rangle\), the measured state is obtained as \(\left|{s}_{m}\right\rangle={\hat{P}}^{-1}\left|p\right\rangle\), where \(\hat{P}\) is the instrument matrix9,10.

Fig. 1: Observing many polarizations in a single shot.
figure 1

a Conventional polarimetry relies on projective measurements: the state of polarization (SOP) \(\left|s\right\rangle=\left|{S}_{1},\,{S}_{2},\,{S}_{3},\,{S}_{0}\right\rangle\), a point on the Poincaré-Bloch sphere, is processed by distinct detectors, each analyzing one component. b In our single-shot method, the SOP is mapped onto a high-dimensional phase space (false-color map) where data were collected. The black box represents the transformation setup, i.e., any optical system with a polarization-dependent response: disordered media, nonlinear materials, optical devices, etc. The SOP is identified in the feature space by supervised learning. When measuring a vector beam composed by 1, 2, ..., D different polarizations, the projective analysis necessitates 4D measurements, while we use a single intensity distribution embedding all information.

In our single-shot polarimetry (Fig. 1b), the light beam interacts with a physical object that transforms the input polarization into a set of features. The object can be any polarization-dependent optical system, such as a diffractive element, a disordered medium, etc., and its details can be unknown to the observer. The feature set at the readout is composed of an ensamble of different observable quantities. Specifically, we consider the field intensity at different n spatial positions. An intensity measurement collects the values \(\left|x\right\rangle=\left|{x}_{1},\,{x}_{2},...,\,{x}_{n}\right\rangle\). The polarization state is determined by a linear operation as

$$\left|{s}_{o}\right\rangle=\hat{\beta }\left|x\right\rangle,$$
(1)

where the \(\hat{\beta }\) operator is a 4 × n matrix, which we refer to as the calibration matrix of the instrument. Crucially, \(\hat{\beta }\) is not determined a-priori, but retrieved by experimental data via machine learning.

The key point of our single-shot method is the redundant mapping of a polarization state, determined by four observables, to a state belonging to a much larger space, defined by n observables. If n is very large, the redundancy makes the method very advantageous to measure light beams that encode many polarizations in distinct spatial optical modes (vector beams). We consider a beam containing D different polarization states. The corresponding multiple SOP can be expressed as \(\left|{{{{{{{\bf{s}}}}}}}}\right\rangle=\left|{s}^{1}\right\rangle \oplus \left|{s}^{2}\right\rangle \oplus ...\oplus \left|{s}^{D}\right\rangle\), where \(\left|{s}\,^{j}\right\rangle\) denotes the Stokes vector of the j-th mode. The observation of multiple SOP with conventional polarization tomography requires at least 4D projections or 4D generalized measurements34. On the contrary, we observe the state \(\left|{{{{{{{{\bf{s}}}}}}}}}_{o}\right\rangle\), composed of D individual SOP, with a single-shot measurement by using the higher-dimensional data vector \(\left|x\right\rangle\). The necessary calibration matrix \(\hat{\beta }\) of size 4D × n is determined by an initial training phase. The scheme is scalable with the dimension D of the multiple SOP, at variance with projective measurement setups where additional detectors are required. In our case, we can observe input states \(\left|{{{{{{{\bf{s}}}}}}}}\right\rangle\) of variable dimension by adopting a unique feature space. This property means we can obtain, through the same detected signal, additional beam parameters otherwise difficult to access.

Single-shot polarimetry is experimentally implemented by using the scheme illustrated in Fig. 2. The optical setup is composed of two parts: a generator that produces vector beams and a single-shot polarization analyzer that realizes the optical transformation and collects the resulting intensity (details in Methods). To generate multiple SOP we exploit a phase-only spatial light modulator (SLM). This allows shaping a large number of different polarizations on the wavefront of a single λ = 532 nm laser beam, with distinct states \(\left|{s}\,^{j}\right\rangle\) that correspond to spatially-separated modes with phase ϕj (see Supplementary Note 1). The single-shot analyzer exploits light scattering36. In fact, it is known that multiple scattering from random media can be harnessed to perform deterministic operations on an incident electromagnetic field37. The idea have resulted in optical instruments based on disorder, such as lenses38, polarimeters39, beam analyzers40, and compact spectrometers41, but also in effective schemes for optical computing42. In our experiment, we use light scattering from a glass diffuser to map the SOP into intensity data. The scattering medium spatially mixes the impinging optical field and transmits a disordered field. The resulting speckle pattern is imaged on a camera sensor with no polarization filters. The entire polarization content of the incoming beam is hidden within this intensity distribution. However, at variance from disorder-based photonic instruments39,40,41, our method does not require determining the transmission operator to perform the measurement. We simply get an image whose spatial details depend on the polarizations of the vector beam. By sampling the image, we obtain the output data \(\left|x\right\rangle\), which encodes the input polarizations into a higher-dimensional feature space. The mapping can be performed by any optical system sensitive to the input polarization such as optical fibers and nonlinear materials.

Fig. 2: Experimental setup.
figure 2

The vector beam generator is based on a phase-only spatial light modulator (SLM). Inset shows the vertical intensity component pV of a partitioned beam composed of four SOP. The apparatus for single-shot polarimetry is composed of a scattering medium (SM) and a camera (CCD). The collected spatial intensity distribution (false-color inset) is processed on 4M linear output channels that enable training via the readout weights \({\beta }_{i}^{j}\). HWP half-waveplate, QWP quarter-waveplate, LP linear polarizer, MS motor stages, L lens.

To understand the role of coupling between polarization and spatial degrees of freedom, we differentiate two cases. For D = 1, a necessary working condition is a scatterer that couples polarization and amplitude spatial modes. In fact, different input SOP have to result in distinguishable intensity distributions to obtain distinct measurement outcomes. Surprisingly, for vector beams (D > 1), coupling generated by the scatterer is no longer necessary. In this case, the partitioning of the impinging beam induces sufficient interaction (see Supplementary Note 2). In experiments, we vary the polarization-spatial coupling by testing glass diffusers of various roughness, which induce a different amount of depolarization43. We found comparable performance in all the considered samples. Hereafter, we report results in the case of small coupling, corresponding to transmitted light with a degree of polarization close to one (see Supplementary Note 3).

To extract polarization information from the intensity data, we use supervised learning. Among the various neural network architectures that have been proved convenient for optical systems44, we adopt the extreme learning machine (ELM)45. ELM allows fast and easy training with several thousands of network nodes, thus being especially suited to large-scale photonic implementations46,47,48,49,50,51,52,53,54. To apply the ELM algorithm, we construct a readout layer by a random selection of 4M output camera channels (Fig. 2b). Each channel has a linear weight \({\beta }_{i}^{j}\), with i = 1, ..., 4M and j = 1, ..., D, which form the calibration matrix in Eq. (1). Training consists in adjusting these parameters according to a labeled dataset via ridge regression (see Methods).

Machine-learning polarimeter

Figure 3 shows the single-shot polarimetry of a single SOP. We generate Ntrain samples randomly distributed on the PB sphere (Fig. 3a) and validate the calibrated single-shot analyzer on Ntest unknown SOP. As reported in Fig. 3b, the observed polarizations correspond to the input within a distance d = 0.014 ± 0.002 (see Methods). Each measured Stokes parameter Si is in remarkable agreement with its target value (Fig. 3c). The accuracy of the machine-learning polarimeter is investigated by varying the number of network channels M and the size Ntrain of the calibration dataset. Results in Fig. 3d show the behavior of the Stokes error E(Si). We find that single-shot measurements become extremely accurate when M increases (E(Si) = 0.0075).

Fig. 3: Polarization measurements by supervised learning.
figure 3

a Training dataset made by Ntrain randomly-selected polarizations. b, c Measured SOP and corresponding Stokes parameters (purple), along with their unknown values used for testing (orange). For clarity, only a subset of samples is shown. d Testing error E(Si) on each Stokes parameter versus the number of readout channels. The error peak (interpolation threshold) is direct evidence of the double-descent effect. e Distance between the measured and generated SOP varying the number of training samples and channels. f Accuracy matrix (see Methods) comparing single-shot (M = 200) and conventional polarimetry performed via multiple projections.

The observed error peak in Fig. 3d discloses the so-called double descent35. Above the interpolation threshold, the accuracy increases with the number of channels with no overfitting. We find that the interpolation threshold shifts with the training dataset size (Fig. 3d), with a maximum error for MNtrain. This point marks a critical condition in ELM made with physical systems48. Experimental observation of the double descent is made possible by the huge number of output nodes of our optical setup54. We exploit the effect to enhance the polarimeter precision. On the other hand, we underline that a few hundred channels are sufficient for effective measurements. Figure 3f shows the accuracy matrix \(\hat{a}\), which also includes the degree of polarization ν. The single-shot results match well data from a conventional rotating-waveplate polarimeter. With reference to single-qubit tomography55, we obtain a fidelity F(ρs, ρm) = 0.99 ± 0.01, where ρs and ρm are the density matrices obtained via single-shot and multiple projections.

Single-shot polarimetry of vector beams

In Fig. 4, we report single-shot polarization measurements of partitioned vector beams with four SOP. Calibration operates alike the single polarization case, but with Ntrain states of dimension D = 4. Figure 4a shows the intensity of an unknown multiple SOP generated by four random phases ϕi on four spatial modes. The effect of diffraction between adjacent SOP is visible. By collecting the transformed intensity image, we reveal the full polarization structure in a single shot, as shown by the polarization ellipses in Fig. 4b. Conventional projective polarization tomography (Fig. 4c) strikingly agrees with the single-shot observation. The overall uncertainty of the detection for D = 4 is evaluated in Fig. 4d by varying M up to 4M = 52,000 total channels. The error decreases with M, with localized peaks that indicate the interpolation threshold. The fidelity is confirmed by the overlap matrix \(\hat{a}\) in Fig. 4e, with \({{{{{{{\rm{Tr}}}}}}}}\left(\hat{a}\right)/4D=0.95\) accuracy.

Fig. 4: Single-shot polarimetry of four-parted vector beams.
figure 4

a A generated beam with D = 4. We show the spatially-resolved vertical intensity component pV. b Polarization ellipses observed in a single shot (M/D = 1000) and c via multiple projective measurements. d Distance of the j-th mode as a function of the number of channels M. Data have been shifted vertically for clarity; inset values are the minimum d for each curve. e Accuracy matrix of the single-shot polarimetry for D = 4.

We succeed in characterizing with high accuracy beams encoding up to nine SOP. This implies a single-shot reconstruction of a classical state \(\left|{{{{{{{\bf{s}}}}}}}}\right\rangle\) lying in a 27-dimensional phase space. To implement larger systems, we expand the spatial extent of the input and output optical planes. Figure 5a shows the intensity of a beam encoding multiple SOP with D = 9. The result of the single-shot detection agrees with the state we get  from multiple projections (Fig. 5b, c). The comparison, with the \(\hat{a}\) matrix having 1296 entries, gives a 0.91 overlap between the polarization states measured by using the two methods. The single-shot observation is hence performed with high precision, as also the measurement error in Fig. 5d indicates. Interestingly, we observe that the distance d decreases rapidly with M and gets stuck into a broad plateau. This behavior underlines the enormous complexity of the states that we are characterizing. Even if, in Fig. 5d, we do not observe any interpolation threshold, as more output channels would be necessary, the method still enables accurate measurements.

Fig. 5: Single-shot polarimetry of nine-parted vector beams.
figure 5

a Intensity pV measured when vertically projecting a generated beam with D = 9. The total state \(\left|{{{{{{{\bf{s}}}}}}}}\right\rangle\) belongs to a 27-dimensional phase space. b Single-shot measurement of the nine polarizations. c Polarization tomography by multiple measurements, for comparison. d Distance between the single-shot observations and generated SOP. Curves are shifted for visualization; the inset shows their value for 52,000 channels.

Measuring the number of polarizations

In the most general case of an unknown multiple-polarization state, its dimension D is also an unknown variable. We demonstrate that we can identify the dimensionality of the multiple SOP. To train the setup, the calibration dataset includes beams with a variable number of partitions, and D as an additional target parameter. Figure 6a reports the confusion matrix obtained for vector beams having three possible partition configurations (D = 1, D = 4, and D = 9), with M = 10,000. The dimension is found with an accuracy that exceeds 98%. In addition, the set of Stokes parameters is measured with precision comparable to cases of known dimension (E(Si) = 0.057). For D = 9, a comparison between the entire Si distribution is shown in Fig. 6b. Therefore, we not only perform single-shot polarimetry of beams encoding nine polarizations, but we carry out the measurement not knowing that the overall polarization vector has nine dimensions. It is important to note that dimension D is not directly measurable by using multiple projective measurements.

Fig. 6: Measurement of a beam of unknown polarization number.
figure 6

a Confusion matrix over Ntest = 2000 beams with three possible values for D. Insets are representative projective images in the three cases. D is determined with 98% accuracy. b Single-shot measured versus generated Stokes parameters for beams of nine parts, whose dimension has been automatically identified.

Discussion

We have experimentally demonstrated the measurement of multiple polarizations in a single shot without polarization optics. The result has been obtained with an original method that combines physical transformation between polarization and spatial degrees of freedom with machine learning to get unprecedented information in a single detection. This approach demonstrates photonic machine learning for a challenging optical application, i.e., polarization imaging.

Our measurement scheme has no bulky optical components and can operate at any wavelength. This allows to overcome the narrowband operation of all polarization cameras based on integrated devices and metasurfaces17,18. In our setup, both the scattering process and the learning procedure are efficient on a broad spectrum. As the transmitted intensity distribution is highly sensitive to the incoming spectrum, we expect our polarization imaging is able to operate on broadband light by training a wavelength-dependent instrument matrix \(\hat{\beta }(\lambda )\). The single-shot polarimeter is hence compact, without moving components, broadband, and does not require nanofabrication. Moreover, it provides direct access to properties of the vector field otherwise difficult to quantify, as we demonstrate by measuring the unknown number of polarizations within the vector beam. The device can be developed further by using unsupervised learning methods such as variational autoencoders that generate Stokes parameter distributions from the detected sparse data.

These findings empower compact single-shot polarimetry based on machine learning in a wide variety of contexts, from optical networking to biomedical devices. We foresee the extension of our single-shot approach to the entire electromagnetic spectrum56, to subwavelength and topological optical fields, and, more generally, to other optical degrees of freedom57, with applications where conventional instruments are useless, as in edge devices and photonic chips58. Moreover, partitioned vector beams of quantum light can encode many qubits. Therefore, our results may also open exciting perspectives in the quantum domain, with the possibility to benefit from single-shot polarimetry by machine learning.

Methods

Experimental setup

The experimental setup follows the sketch in Fig. 2. A continuous-wave laser beam with wavelength λ = 532 nm (LaserQuantum Ventus 532, 250 mW) is expanded and linearly polarized along the horizontal (H) direction (x-axis) with a linear polarizer (LP). The vector beam generator is composed of a reflective phase-only SLM (Hamamatsu X13138, 1280 × 1024 pixels, 12.5 μm pixel pitch, 60Hz frame rate) sandwiched between an input half-waveplate (HWP) and an output polarization system made by a quarter-waveplate (QWP) and HWP. The output waveplates are equipped with motorized precision rotation stages (MS) (25°/s maximum rotation velocity) that are programmed online. Their fast axes form respectively an angle α and β with the x-axis. The parameters α and β are varied with 2° resolutions during both training and testing. By grouping L × L SLM pixels, the modulator active area is divided into D squared input modes, with each mode having a phase ϕj in the [0, 2π] interval. The available phase levels are 210, distributed according to a linear phase response curve59. Polarization-modulated light is focused by a plano-convex lens (f = 150 mm) on a scattering medium (Thorlabs N-BK7 Ground Glass Diffusers, 1500 grit) positioned using a four-axis translational stage. The scattered field is collected by an imaging objective (NA = 0.25) and the transmitted speckle pattern is detected by a cooled camera (Basler a2A1920-160umPRO, 1920 × 1200 pixels, 160 fps) with 12-bit (4096 gray-levels) intensity sensitivity. Within the camera region of interest, 4M output channels are randomly pre-selected. The signal is obtained by binning over a few camera pixels (4 × 4 pixels) to reduce detection noise. Output channels have a size comparable to the spatial extent of a speckle grain. For reference measurements, a portion of the polarization-modulated beam is split and analyzed by using conventional polarimetry. A commercial rotating-waveplate polarimeter (PAX1000VIS, 0.25 accuracy) is used for a single SOP. For projective polarization imaging of vector beams, we use a custom rotating-waveplate analyzer composed of a QWP, an LP, and a CMOS camera (DCC1545M). Intensity projections are measured along the horizontal (H), vertical (V), diagonal (D), and right circular (R) components, i.e., pH, pV, pD, and pR are the detected power. An example of projective analysis for a partitioned vector beam is shown in Supplementary Fig. 2.

Training method

Calibration of the setup for single-shot polarization measurements is performed by generating Ntrain vector beams and by loading one-by-one the corresponding phase mask on the SLM. For the l-th training sample, the output waveplates of the vector beam generator are rotated to a couple of parameters αl and βl (Supplementary Note 1). The dataset \(\{{\phi }_{l}^{j},{\alpha }_{l},{\beta }_{l}\}\) is randomly generated to cover the entire phase space. When the polarization dimension D need also to be determined, the training set is composed of states whose number of polarizations varies within the dataset. Intensity values from the 4M output channels are stored (Supplementary Fig. 6). We increase linearly the number of selected channels when increasing the dimension. In the case of D = 9, for the feasibility of training, we consider a maximum value of M = 13,000. For the measurement of multiple SOP with an unknown polarization number, M additional channels are used to reconstruct D. The calibration weights \({\beta }_{i}^{j}\) are determined by applying the training algorithm to the entire set of acquired data. The obtained calibration matrix \(\hat{\beta }\) is used to measure Ntest random SOP. We use a ratio Ntest/Ntrain = 0.1.

Extracting polarizations from intensity data

In our setup, the scattering medium creates a mapping between the incoming polarization set and a higher-dimensional feature space. This general mechanism underlies physical implementations of ELM and kernel machines for neuromorphic computing47,49,52. In our case, the scheme is trained to perform physical measurements. To determine the calibration matrix \(\hat{\beta }\) by using 4M output channels, we consider a training set of randomly-selected Stokes vectors \(\{\left|{{{{{{{\bf{s}}}}}}}}\right\rangle \}\equiv {{{{{{{\bf{S}}}}}}}}\) as target vectors (Ntrain × 4D sized). The corresponding acquired intensity matrix is \(\{\left|{{{{{{{\bf{x}}}}}}}}\right\rangle \}\equiv {{{{{{{\bf{X}}}}}}}}\), with size Ntrain × 4M (MD). Training corresponds to solving numerically the ridge regression problem:

$$\arg {\min }_{\hat{\beta }}(\parallel {{{{{{{\bf{X}}}}}}}}\hat{\beta }-{{{{{{{\bf{S}}}}}}}}{\parallel }^{2}+{c}^{-1}\parallel \hat{\beta }{\parallel }^{2}),$$
(2)

where parameter c controls the trade-off between the training error and the regularization. A solution is given by45

$$\hat{\beta }={\left({{{{{{{{\bf{X}}}}}}}}}^{T}{{{{{{{\bf{X}}}}}}}}+c{{{{{{{\bf{I}}}}}}}}\right)}^{-1}{{{{{{{{\bf{X}}}}}}}}}^{T}{{{{{{{\bf{S}}}}}}}},$$
(3)

where I is the identity matrix. Inversion involves the 4M × 4M matrix XTX, which makes the method scalable as M is selected by the observer. Therefore, given an unknown multiple SOP and the corresponding single-shot intensity vector \(\left|x\right\rangle\), the observed state can be expressed as

$$\left|{{{{{{{{\bf{s}}}}}}}}}_{o}\right\rangle={\left({{{{{{{{\bf{X}}}}}}}}}^{T}{{{{{{{\bf{X}}}}}}}}+c{{{{{{{\bf{I}}}}}}}}\right)}^{-1}{{{{{{{{\bf{X}}}}}}}}}^{T}{{{{{{{\bf{S}}}}}}}}\left|x\right\rangle .$$
(4)

An explicit expression for xi is reported in Supplementary Note 2. In the case of a single SOP, the measured Stokes parameters from single-shot intensity data are

$${S}_{i}=\mathop{\sum }\limits_{k=1}^{M}{\beta }_{k}{x}_{k}.$$
(5)

Each Si is hence decoded through M weights. An example of both the acquired intensity and calibration matrix (c = 1) is reported in Supplementary Note 4.

Analysis of the measurements

To quantify the accuracy of the single-shot polarimeter, as a testing error on the i-th Stokes parameter, we use the mean-absolute-error (MAE) \(E({S}_{i})=\left\langle|{S}_{i}^{s}-{S}_{i}^{g}|\right\rangle\), in which the apex stands for single-shot (s) and generated (g), and the average is over Ntest samples. Instead of S0, we report the degree of polarization \(\nu=\sqrt{{S}_{1}^{2}+{S}_{2}^{2}+{S}_{3}^{2}}/{S}_{0}\), which quantifies the amount of unpolarized light. The distance between two SOP on the PB sphere is computed as \(d=\sqrt{{\sum }_{i}E{({S}_{i})}^{2}}\). The accuracy values with respect to projective measurements are aij = 1 − Oij, with the overlap \({O}_{ij}=\left\langle|{S}_{i}^{s}-{S}_{i}^{m}|\right\rangle\), with apex m stands for multiple measurements. It is worth noting that this comparison includes also the inaccuracy of the SOP generator and the uncertainty of the conventional polarization analyzer (Supplementary Fig. 2). For beams with a single SOP, the fidelity is computed in analogy with quantum state tomography as55\(F({\rho }_{s},{\rho }_{m})={{{{{{{\rm{Tr}}}}}}}}{\left(\sqrt{\sqrt{{\rho }_{m}}{\rho }_{s}\sqrt{{\rho }_{m}}}\right)}^{2}\), where the density matrix is \(\rho=1/2({\sum }_{i}{S}_{i}\hat{{\sigma }_{i}})\) with Pauli matrices \(\hat{{\sigma }_{i}}\).

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.