## Introduction

During the last decades, the development of laser technology has boosted our ability to control the properties of ultrafast light pulses. Nowadays it is possible to routinely generate coherent radiation from the near-infrared to the soft X-rays1, which can be emitted in the form of few-cycle femtosecond laser pulses2,3,4, or even attosecond pulses5. Furthermore, it is possible not only to tailor their spatiotemporal properties6,7,8, but also to structure ultrafast light fields in their angular momentum properties, including both polarization and orbital angular momentum9,10,11. The ultimate control of the angular momentum properties of ultrafast laser pulses has opened new routes for the study of chiral structures12,13,14, topological systems15,16,17 or magnetic materials18,19 at the ultrafast timescales.

One example of structured ultrafast light fields with tailored spatiotemporal and angular momentum properties are the so-called vector beams20. The paradigm of vector beams is constituted by radially (RP) and azimuthally (AP) polarized beams. In RP and AP beams, the polarization at each point of the beam transverse plane is linear, directed in the radial and tangential directions, respectively. Interestingly, RP beams allow to focus light below the diffraction limit21, which enables applications in different fields such as laser machining22,23 or particle acceleration24,25, among others. AP beams can induce longitudinal magnetic fields at the singularity of the electric field26, which offers potential applications in spectroscopy and microscopy27. Recently, it has been shown that they can be used to produce collinear vortices28.

Nowadays vector beams can be routinely produced as continuum waves in the infrared (IR) and visible regimes through the use of uniaxial and biaxial crystals29,30,31, spatial light modulators32, optical fibres33, electrically-tuned q-plates34 or azimuthally dependent half-waveplates fabricated by ultrafast laser nanostructuring of silica glass, also known as s-waveplates35, among others. Recently, the generation of short pulsed, femtosecond vector beams36,37 has gained interest due to their application in high harmonic generation and attosecond science38,39,40 or particle acceleration41. However, the advances of new laser sources and their applications are tied up to the development of characterization techniques. Since the 1990s, different techniques have been used for the temporal characterization of scalar—i.e., with constant linear polarization (LP)—ultrashort laser pulses42. In the last two decades, the problem of measuring spatiotemporal couplings in scalar beams has been tackled with new strategies43,44,45,46,47. In parallel, the reconstruction of time-evolving polarization pulses has also been addressed48,49,50,51,52,53. However, the necessity for the full spatiotemporal characterization of structured ultrafast laser pulses, which simultaneously includes both spatiotemporal and polarization properties, remained a challenge up to now.

In this work we implement a technique to characterize the arbitrarily space-time (and the space-frequency) polarization dependence of structured ultrafast fully polarized light pulses. In particular we perform the full characterization of infrared femtosecond vector beams generated through an s-waveplate, which allow us: (i) to measure the spatiotemporal quality of RP pulses; (ii) to shape and characterize time-dependent vector beams, structured through the use of polarization gates, and (iii) to monitor the focusing properties of structured vector beams. Our technique is based on two-fold spectral interferometry, both for the spatiotemporal reconstruction through spatially resolved spectral interferometry assisted by a fibre-optic coupler44, and for the polarization analysis through in-line bulk interferometry with a thick birefringent plate53. The complete knowledge of the vector beam amplitude and phase allows to reconstruct the polarization state of the beam profile (including intensity, polarization azimuth and relative phase between the polarization components) both in the space-frequency and space-time domains. We demonstrate that spectral interferometry is a powerful technique for the characterization of ultrafast vector beams, opening the route for a new set of characterization techniques of structured light waveforms, to be used in a diverse range of applications50,54,55 that make use of spatial and temporal polarization shaping.

## Results

### Technique for full spatiotemporal polarization measurement

An ultrafast vector beam can be either expressed in the space-frequency domain or in the space-time domain, being the representation equivalent as they are connected by the Fourier-transform. In the paraxial approximation, the vector beam propagating in the z-axis will be characterized by the polarization components in the xy plane, this is to say, $${\mathbf{E}} = ( {E_x,E_y})$$. In the spatiospectral domain (depending on the angular frequency $$\omega$$ and the transverse coordinates x and y), the electric-field components at a certain propagation distance z (observation plane) can be expressed as a function of their amplitudes ($$A_x$$ and $$A_y$$) and phases ($$\phi _x$$ and $$\phi _y$$), as given by

$$\begin{array}{l}E_x\left( {\omega ;x,y} \right) = A_x\left( {\omega ;x,y} \right){\mathrm{exp}}\left( {i\phi _x\left( {\omega ;x,y} \right)} \right)\\ E_y\left( {\omega ;x,y} \right) = A_y\left( {\omega ;x,y} \right){\mathrm{exp}}( {i\phi_{y}( {\omega ;x,y} )} )\end{array}$$
(1)

As we will discuss later, the amplitudes can be directly obtained from the corresponding measured spectra $$S$$ of the beam, i.e. $$A = \sqrt S$$, while the measurement of the phases conforms the core of the technique.

The technique that we have used to perform the complete spatiotemporal and polarization characterization is based on two-fold spectral interferometry. A scheme of the experimental setup is shown in Fig. 1. The laser output is divided into two replicas, one of them is used as a reference (known), while the other beam is shaped in its polarization components—using an s-waveplate optionally with retarder waveplates (in the case of the multiple-order plate, it introduces a delay $$\tau _{{\mathrm{PG}}}$$ between the fast and slow axes of the plate, due to the difference of dispersion as a result of the birefringence)—, conforming the unknown beam to be characterized. In the unknown beam arm, a thick birefringent plate is placed to introduce a delay $$\tau _{{\mathrm{YX}}}$$ between the horizontal and vertical polarization components of the beam. Afterwards, a linear polarizer is used to sample different polarization projections of the beam (0°, 45° and 90° with respect to the x-axis polarization direction). While the reference beam is collected by a fixed position fibre port (therefore not being scanned), the unknown beam is spatially scanned (in the transverse xy plane) with the optical fibre port in a motorized two-dimensional (2D) translation stage. Notice that it is needed to spatially scan the three projections (0°, 45° and 90°), as well as to scan the x-component interference with the fixed reference beam. In the present work, depending on the symmetry of the beam, we have performed in a general case the said scan forming a 2D grid (see Supplementary Note 7) or, when the polarization state does not depend on the radial coordinate, just varying the azimuthal coordinate θ (i.e. describing a circumference as shown in Supplementary Fig. 3). Both single-mode fibres are combined in a broadband fibre-optic coupler. The delay between the reference and the unknown beam, $$\tau _{{\mathrm{XR}}}$$, is adjusted and fixed with the longitudinal position of the reference fibre. The known reference phase is measured with a standard temporal characterization technique42 (e.g. in the present case, the spectral phase interferometry for direct electric-field reconstruction (SPIDER) technique56).

In order to perform the complete characterization, first we measure the spatially resolved spectral interferometry between the 0°-projection (x-component) of the unknown beam and the reference pulse, $$S_{x + {\mathrm{Ref}}}(\omega ,x,y)$$, by setting the linear polarizer horizontal. Then we obtain their relative phase using Fourier analysis57 (see details in Methods). Afterwards, we measure the spectrum profile of the same beam projection, $$S_x(\omega ,x,y)$$. As the reference phase is known, we obtain the spatiospectral (and spatiotemporal) amplitude and phase of the x-component of the unknown beam. This strategy44 has been shown to be very versatile by use in the measurement of diffractive focusing, nonlinear processes and few-cycle pulse characterization8,58,59,60, among others.

Second, we acquire the 90°-projection of the unknown beam, $$S_y(\omega ;x,y)$$, by placing the linear polarizer vertically. Finally, with the linear polarizer at 45°, we measure an intermediate projection of the x and y components, $$S_{x + y}(\omega ;x,y)$$, which encodes their relative phase (see details in Methods). This allows us to accurately retrieve the phase of the y component, and thus, the frequency-dependent and time-dependent polarization53. The phase introduced by the birefringent plate is calibrated as described in the Methods Section. Since the fibre scans the transverse profile of the unknown beam, we retrieve the full spatiotemporal (and spatiospectral) polarization dependence of the beam. The measured polarization ellipses are fully characterized in terms of their ellipticity, $$\varepsilon' = b/a$$, and polarization azimuth angle χ (see inset polarization ellipse in Fig. 1), together with the measured dephase, $$\delta = \phi _y - \phi _x$$, that is related to the ellipticity and provides the handedness of the polarization (positive and negative values of the dephase $$\delta$$ stand for right- and left-handed polarization, respectively). We redefine the ellipticity as $$\varepsilon = {\mathrm{sign}}(\delta )\cdot b/a$$, so it provides the ellipticity and the handedness in a single parameter. A detailed explanation of polarization states and the calculation of $$\varepsilon$$, χ can be found in the Supplementary Note 1.

### Characterization of radially polarized laser pulses

First, we have characterized a femtosecond RP beam created through an s-waveplate placed after the output of a chirped pulse amplification Ti:sapphire laser (see Methods for further details). In the present case, the radial r and the azimuthal coordinate $$\theta$$ in the $$xy$$ plane are uncoupled in the detection plane, provided that the dependence on r is related to the transverse profile of the input beam, which can be considered Gaussian. In order to explore the polarization distribution of the beam along the azimuthal coordinate $$\theta$$, we scanned the xy plane through a circumference of radius R = 3 mm (corresponding to the half maximum of the beam intensity, see Supplementary Fig. 3) around the optical axis. In Fig. 2 we show the ellipticity (ε), polarization azimuth (χ) and intensity profiles (x-projection, and total) of the vector beam in the space-frequency (first row) and space-time (second row) domains. The x-projection of the spectrum or intensity (Fig. 2a, b) describes the expected lobes found when a RP beam passes through a linear polarizer horizontally oriented. The y-component is complementary so that the total spectrum and intensity (Fig. 2c, d) are almost constant across the circular scan. This spatial dependence is inherent to the spatial profile of our laser beam (as shown in Supplementary Note 3). Whereas the ellipticity $$\varepsilon$$ is found to be close to zero (Fig. 2e, f), the polarization azimuth $$\chi$$—which reflects the orientation angle of the LP field—describes the RP behaviour of the beam (Fig. 2g, h), corresponding to the $$\chi$$-varying LP beam created by the s-waveplate (i.e. the polarization at each point of the beam transverse plane is linear, directed in the radial direction). We find that the operation of the s-waveplate to imprint a RP profile can be considered homogeneous both in the spectral and temporal domains, despite the polychromatic nature of the pulse (notice that the whole spectral bandwidth extends over 25 nm). The full results are shown in Supplementary Note 4. Although in this work we opted to use a radially polarized beam, equivalent results (shifted 90° in the azimuthal coordinate) would be found if using an azimuthally polarized beam (Supplementary Note 5).

### Measuring shaped time-dependent ultrafast vector beams

In order to show the ability of our technique to characterize vector beams whose polarization distribution varies temporally in the femtosecond timescale, we structure a laser pulse through the use of polarization gates61. When combining an s-waveplate with different types and sets of waveplates, the resulting beam presents a strong spatiospectral and spatiotemporal coupling in its intensity and polarization parameters. One set of waveplates that is particularly interesting is the so-called narrow polarization gate, which is used to effectively generate shorter pulses in certain applications as e.g. isolated attosecond pulse generation61,62,63. In the Methods Section we detail the operation of the narrow gate using a multiple-order quarter-waveplate (QWM) and a zero-order quarter-waveplate (QW0).

In this experiment, we used the RP beam described in the previous Section (created with the s-waveplate), to illuminate the narrow gate elements (i.e. the two waveplates, first the QWM with fast axes at 0° and second the QW0 at 45°). The narrow gate setup is depicted in the Methods Section. The global effect of the narrow gate is that of producing two circular polarization (CP) pulses delayed 100 fs (similar to the pulse duration) with opposite helicity. When using a RP vector beam, the constant orientation angle (polarization azimuth $$\chi$$) of the LP light entering the narrow gate depends on the azimuthal coordinate $$\theta$$, and thus the relative amplitude of both CP pulses depends on $$\theta$$. When both amplitudes are equal, this is for $$\theta = \pi /4 + m\pi /2$$ (being $$m$$ an integer), the narrow gate operates normally (see in Methods), producing LP in the centre and CP in the edges of the pulse in the time domain (Fig. 3a, b), whereas the spectral domain ellipticity (Fig. 3c, d) is close to $$\varepsilon \approx 0$$ (as measured in ref. 53). For the azimuthal coordinates $$\theta$$ in the RP beam where the linear polarization is parallel to the axes of the QWM (see example in Methods), i.e. $$\theta = m\pi /2$$, there is only one of the two CP pulses, either being the first (fast axis) or second (slow axis) pulse, which is seen in the temporal intensity (Fig. 3e, f), while both, the temporal and spectral ellipticities are $$\left| \varepsilon \right| = 1$$ (constant CP) with the corresponding handedness (left- and right-handed for the pre and postpulse respectively), as shown in Fig. 3a–d. For intermediate azimuthal coordinates $$\theta ,$$ the temporal ellipticity minimum ($$\varepsilon = 0$$) is shifted towards the less intense pulse, placed where the two overlapping pulses have the same amplitude (Fig. 3a, b). In the spectral domain, the x-projection of the spectrum is modulated presenting minima/maxima for $$\theta = \pi /4 + m\pi /2$$ for the wavelengths where the QWM introduces a dephase $$\pm \!\pi /2$$ (exact quarter-wave operation), so its combination with the QW0 results in a vertical/horizontal LP (Fig. 3g, h). Therefore, the whole evolution of the polarization shows a strong dependence in the space and time coordinates as seen in the polarization ellipses (Fig. 3i, j, and Supplementary Note 6). The effect of the combination of radial polarization and the polarization gate is also manifested in the spatiospectral dependence of the polarization azimuth (Fig. 3k, l). The comparison of the experimental results and our numerical simulations performed as described in the Methods Section is shown in Fig. 3. The good agreement between the experimental and theoretical results serves as a validation of our characterization technique. As found in the previous Section, here the small deviations of the experimental results are also due to the spatial profile of the laser beam.

### Focusing monitorization of time-dependent vector beam pulses

Many applications of vector beams, e.g. particle trapping, microprocessing, particle acceleration or nonlinear optics, are carried out at their focus position. Our characterization technique allows us to perform the full characterization both at the far-field and at the near-field. Here we analyse and compare the spatiotemporal polarization dynamics at the focus of the two previously presented vector beams, i.e. the RP vector beam (Fig. 4a–e) and the RP beam followed by the narrow polarization gate (Fig. 4f–t). In both cases, the beam was focused using an achromatic lens with a focal length of 50 cm. In these experiments the ultrafast vector beam presents a rich evolution both in the radial and azimuthal coordinates (r and $$\theta$$). Therefore, we did a 2D spatial scan along the transverse xy plane.

First, when using a purely RP beam, the ellipticity $$\varepsilon \left( {x,y,t} \right)$$ is ideally zero for every position x, y and time t. As shown before, although there is a spatiotemporal intensity modulation, there is no substantial temporal dependence of the polarization parameters of the beam. In Fig. 4c, we show the spatial profile at the focus position for a temporal instant that corresponds to the peak of the pulse. We notice that, instead of an ideally homogeneous ring shape of a RP, the measured beam presents spatial intensity modulations due to the above-mentioned inhomogeneities of the input spatial profile. On the other hand, the spatial distributions of the x and y polarization projections (Fig. 4a, b, respectively) correspond to that of a RP with the singularity at the centre (see the polarization azimuth $$\chi$$ profile in Fig. 4e). In the Supplementary Movie 1 we show that the structure of these magnitudes of the focused RP beam is preserved in time.

Contrarily to this case, when focusing the RP beam after passing through the narrow gate, the beam exhibits a temporal/spectral polarization evolution together with the spatial dependence. In this second case the intensity ring is split into two lobes with time-dependent orientations, except for the centre of the pulse at t = 20 fs (the mean propagating time of the beam components passing through the fast and slow axes of the QWM), where the ring is recovered (Fig. 4m), as in the case of a focused RP beam (Fig. 4c). The x and y projections of this temporal snapshot of the intensity corresponds to two lobes oriented at ±45° (Fig. 4k, l). In the temporal leading edge of the beam—corresponding to the fast axis component at QWM—the two lobes are oriented in the x-axis for the total intensity as well as for the x and y projections (Fig. 4f–h). On the opposite, in the temporal trailing edge, the two lobes are oriented in the y-axis (Fig. 4p–r), as the slow axis of the QWM is oriented vertically. The complete temporal evolution is shown in Supplementary Movie 2, where the total intensity evolves from two vertical lobes until they completely fill the ring and then they split into two horizontal lobes. Thus, the x and y intensity projections consist in two spatial lobes evolving from vertical to horizontal but rotating in opposite direction. Regarding the ellipticity (Fig. 4i, n, s), the beam evolves from two dominating left-handed CP horizontal lobes (prepulse) to two dominating right-handed CP vertical lobes (postpulse), with a gradual growing of the latter in detriment of the initial lobes. In between the opposite handedness CP lobes there is LP with a gradual transition. For the temporal maximum (where the total intensity forms a ring), the polarization azimuth $$\chi$$ (Fig. 4o) of the LP contributions mentioned before is oriented at 0° (horizontal) at the azimuthal coordinate $$\theta = 45^\circ$$ and $$\theta = 225^\circ$$ (notice that for those positions the signal is zero for the y-projection of the intensity in Fig. 4l), and the LP oriented at 90° (vertical) at the azimuthal coordinate $$\theta = 135^\circ$$ and $$\theta = 315^\circ$$ (where the x-projection of the intensity in Fig. 4k is zero). The polarization azimuth $$\chi$$ also evolves gradually from the prepulse (Fig. 4j) to the postpulse (Fig. 4t), alternating the orientation of the LP regions described in Fig. 4i, n, s (see Supplementary Movie 2).

In the spatiospectral domain, the frequency dependence presents some similarities related to the time domain evolution. First, for the focused radially polarized beam, as the behaviour is achromatic, the results are constant in the spectral domain (as shown in Fig. 5a–e for 800 nm, and in the Supplementary Movie 3). For the radially polarized beam followed by a narrow gate (Fig. 5f–t), for some wavelengths (e.g. 795 nm) the x and y projections of the spatially resolved spectrum corresponds to two lobes with opposite orientations at ±45° in the xy-plane (Fig. 5f, g). Observing the spectral evolution (Supplementary Movie 4), for some wavelengths (e.g. 800 nm) the spatial profile of the x and y projections forms a ring (Fig. 5k, l), while for other wavelengths (e.g. 803 nm) the two lobes are crossed at $$\mp$$45° with respect to the 795 nm case (Fig. 5p, q). The total spectrum forms a ring for every wavelength (Fig. 5h, m, r). Also, the ellipticity pattern is frequency-independent (Fig. 5i, n, s), with two horizontal left-handed CP lobes and two vertical right-handed CP lobes and a gradual transition in between (LP at ±45° axes in the xy plane), similarly as described for Fig. 4n (temporal centre of the beam). As expected from the frequency-dependent x- and y-projections of the spectrum, the polarization azimuth also varies with the wavelength (Fig. 5j, o, t), being, e.g. for 795 nm (Fig. 5j), $$\chi = 0$$ in the $$+ 45^\circ$$ axis of the xy plane and $$\chi = \pm \!\pi /2$$ in the $$- 45^\circ$$ axis of the xy plane. For 803 nm (Fig. 5t) the polarization azimuth is oriented opposite to the 795 nm case.

## Discussion

Tailoring light beams in full dimensionality, i.e. both spatial and temporal shaping of the individual light waveforms on a femtosecond timescale, is nowadays possible. Our results demonstrate spectral interferometry as a suitable technique for performing a complete spatiotemporal and spatiospectral characterization of such ultrafast beams, whose polarization changes in time and space. The use of spectral interferometry is advantageous as the detection is fully linear (except for the reference measurement) and the data processing is fast, direct and univocal, as well as the acquired data being minimal for this level of measurements. The use of a birefringent plate and a fibre-optic coupler to implement a two-fold interferometer avoids using multiple standard interferometers and alignment of beam recombination.

Regarding the vector beam shaping, we show that the combination of spatially varying polarization with temporal polarization shaping can produce singular spatiotemporal polarization dependences. By using a radially polarized beam followed by a narrow polarization gate, we create a complex vector beam with different orientations of the polarization gate or constant circular polarization, depending on the azimuthal coordinate $$\theta$$ in the transverse plane. We show experimentally that the temporal evolution at the focus of such a beam presents rich dynamics in contrast to focused radially polarized beams. The typical ring mode of focusing is effectively shortened in time because of the narrow polarization gate, which could be used for example to manipulate or trap nanoparticles during shorter times. This can be advantageous when using few-cycle pulses, due to the dispersion in media for ultrabroadband pulses.

In conclusion, the technique presented here constitutes the full spatiotemporally resolved polarization measurements at the femtosecond scale. It can be applied for far-field and near-field measurements, allowing in situ diagnostics within the region of interest in most experiments. As a consequence, a complete characterization of ultrashort vector beams can now be performed, allowing, for example, for quantitative measurements of imperfections and small deviations of spatiotemporal polarization distributions from ideal vector beams (as shown in this work). Such accurate measurements can be of capital relevance in applications in particle trapping, extreme ultraviolet pulse generation through high harmonic generation, or particle acceleration, where the quality of the beam mode is fundamental.

Our results pave the way for the full characterization of the most complex waves created up to now. Some examples include ultrafast beams carrying both spin and orbital angular momentum, whose quality is very important if applied to high nonlinear processes such as high harmonic generation9, light beams with time-dependent orbital angular momentum properties10, synthetic chiral fields14 or bicircular fields composed of counter rotating fields of different frequencies19,64,65. The emergence of these complex beams has opened opportunities, for example, to resolve the enantiomeric response of chiral molecules or to perform ultrafast studies of magnetic materials. Further advances in these new directions of ultrafast science are ultimately related to the ability to develop characterization techniques of these new laser sources.

## Methods

### Experimental details

The laser beam employed to perform the measurements was delivered by a chirped pulse amplification Ti:sapphire laser system (Spectra Physics Inc.), with central wavelength at 797 nm and spectral bandwidth of 10 nm FWHM (full width at half maximum) at a repetition rate of 1 kHz. When compressed, the laser pulses have a duration of 100 fs FWHM.

The fibre coupler is made of broadband single-mode fibres centred at 800 nm, being both input arms almost equal-length so that their dispersion is compensated. The relative dispersion due to small difference (~1 mm) between both input arms is calibrated with spectral interferometry.

The thick birefringent plate used was a 3-mm calcite plate (Altechna) with the fast axis oriented vertically. The multiple-order waveplate QWM is a 3-mm quartz plate operating as quarter-wave for 806 nm. The zero-order waveplate QW0 is a 1.3-mm quartz plate designed for quarter-wave operation at 800 nm.

The spectra were acquired with a fibre-coupled spectrometer (Avantes). The spatial scan in the xy plane was done with a two-axes motorized stage (Thorlabs). The reference pulse was characterized with a home-made SPIDER measurement56.

The s-waveplate for 800 nm wavelength was fabricated by ultrafast laser nanostructuring of silica glass.

### Spectral interferometry and data analysis

In spectral interferometry, two delayed collinear pulses interfere in the spectral domain and their spectral fringes encode their relative phase as given in

$$S_{{\mathrm{total}}}\left( \omega \right) = S_1\left( \omega \right) + S_2\left( \omega \right) + 2\sqrt {S_1\left( \omega \right)S_2\left( \omega \right)} {\mathrm{cos}}\left( {\phi _1\left( \omega \right) - \phi _2\left( \omega \right) - \omega \tau } \right)$$
(2)

The relative phase can be extracted by Fourier-transform Spectral Interferometry (FTSI) analysis of the fringes57, which is detailed in Supplementary Note 2. The pulse delay $$\tau$$ must be high enough to separate the signals in the time domain after Fourier-transform, as well as small enough to yield spectral interferences within the spectrometer resolution. Note that we perform a two-fold interferometer. On one hand, the delay introduced by the birefringent plate between the x- and y-component of the unknown beam is 1.8 ps, determined by the plate thickness and material (3-mm calcite). In the spectral interferometry between the reference pulse and the x-component of the beam, we manually introduced a 2 ps delay. The spectral bandwidth of the unknown pulse must be less or equal than the reference spectrum that interfere, and their relative amplitude must be of the same order to obtain better contrasted fringes. Note that we subtract the individual spectra $$S_1\left( \omega \right)$$ and $$S_2\left( \omega \right)$$ before applying the FTSI algorithm to improve the reconstruction for lower contrasts (details in Supplementary Note 2). The spatial resolution of the technique is related to the mode-field diameter of the single-mode optical fibre, being in the present case 4 μm. The resolution of the motorized 2D translation stage is 1 μm.

As the reference pulse is characterized—and hence, the phase $$\phi _{{\mathrm{Ref}}}\left( \omega \right)$$ is known—the phase of the horizontal projection of the unknown vector beam, $$\phi _x\left( {\omega ;x,y} \right)$$, is obtained from the spatially resolved spectral interferences with the reference pulse, given by

$$S_{x + {\mathrm{Ref}}}\left( {\omega ;x,y} \right) =\, S_x\left( {\omega ;x,y} \right) + S_{{\mathrm{Ref}}}\left( \omega \right) \\ + 2\sqrt {S_x\left( {\omega ;x,y} \right)S_{{\mathrm{Ref}}}\left( \omega \right)} \cos\left( {\phi _x\left( {\omega ;x,y} \right) - \phi _{{\mathrm{Ref}}}\left( \omega \right) - \omega \tau } \right)$$
(3)

Then, from the interference between the projections at 45° of the $$x$$ and y components of the unknown beam, the phase of the vertical projection of the unknown vector beam, $$\phi _Y\left( {\omega ;x,y} \right)$$, is obtained as

$$S_{x + y}\left( {\omega ;x,y} \right) = \, 1/2S_x\left( {\omega ;x,y} \right) + 1/2S_y\left( {\omega ;x,y} \right) \\ + \sqrt {S_x\left( {\omega ;x,y} \right)S_y\left( {\omega ;x,y} \right)} \cos\left( {\phi _y\left( {\omega ;x,y} \right) - \phi _x\left( {\omega ;x,y} \right) + \phi _{yx,{\mathrm{BP}}}\left( {\omega ;x,y} \right)} \right)$$
(4)

where $$\phi _{yx,{\mathrm{BP}}}$$ is the relative phase of the birefringent plate eigenaxes. The calibration of this phase is described in the following subsection. Notice that this relative phase is directly responsible for the introduction of the delay $$\tau _{{\mathrm{YX}}}$$ used for the interferometry.

In general, the delay $$\tau$$ introduced by a birefringent plate with thickness $$d$$ and with extraordinary and ordinary refractive indices $$n_{\mathrm{e}}$$ and $$n_{\mathrm{o}}$$, respectively, can be calculated as

$$\tau = \frac{{\mathrm{d}}}{{{\mathrm{d}}\omega }}\left[ {\phi _{\mathrm{o}}\left( \omega \right) - \phi _{\mathrm{e}}\left( \omega \right)} \right] = \frac{{\mathrm{d}}}{{{\mathrm{d}}\omega }}\left[ {\left( {n_{\mathrm{o}}\left( \omega \right) - n_{\mathrm{e}}\left( \omega \right)} \right)\frac{\omega }{c}d} \right] \approx \left( {n_{\mathrm{o}} - n_{\mathrm{e}}} \right)\frac{d}{c}$$
(5)

where $$c$$ is the speed of light and we have assumed that the refractive indices are not dispersive. The expression in Eq. (5) is applied to the thick birefringent plate used to introduce $$\tau _{{\mathrm{YX}}}$$ for interferometry, as well as for the QWM introducing $$\tau _{{\mathrm{PG}}}$$ in the polarization gate.

The spatial scans of the individual spectra, $$S_x$$ and $$S_y$$, are optional as they can be obtained with the FTSI algorithm from the measurement of $$S_{{\mathrm{Ref}}}$$ and the spectral interferometry scans given above, i.e. the spatially resolved interferences $$S_{x + {\mathrm{Ref}}}$$ and $$S_{x + y}$$ of Eqs. (3) and (4), respectively. Nevertheless, as they can be directly measured, we acquired them, since the performance of the FTSI algorithm is improved when subtracting the individual spectra from the interferences before data processing.

### Calibrations

The global dispersion of the birefringent plate can be calculated from the thickness and the refractive index using Sellmeier equations. However, the accurate knowledge of the relative phase between the fast and slow axes is critical for the correct retrieval of the beam polarization. This calibration depends on the thickness and alignment of the birefringent plate. In order to calibrate the system we used a linearly polarized pulse, with no time-evolving polarization, at 45° before the birefringent plate53. From its own interferences, with the projection $$S_{x + y}$$, we retrieved accurately the relative dispersion of the birefringent plate. In our measurements, we repeated this calibration after any realignment. We also found that the calibration of the birefringent plate did not depend on the transverse spatial position. Furthermore, with the same calibrating pulse (linearly polarized at 45°), we measured $$S_x$$ and $$S_y$$ at the same sampling position, to calibrate the amplitude response of the system, which we used to correct the measurements of the individual spectra, $$S_x$$ and $$S_y$$, of the unknown beam.

### Models for the simulations

To simulate the shaped vector beam shown in this work, we started from a homogeneous beam, plane wave, using the experimental spectral amplitude of the laser output. To model the zero-order and multiple-order quartz waveplates, we firstly calibrated their thickness and retardation (if previously unknown) using spectral interferometry in combination with our detection (birefringent plate, linear polarizer and spectrometer). In the simulations, we calculated the dispersion of their eigenaxes from Sellmeier equations and then we imposed the known retardation for the corresponding operation wavelength. Naturally, we applied every element considering the described orientations.

For the s-waveplate, we modelled it as a half-waveplate with the fast axis orientation depending on the azimuthal coordinate $$\theta$$. As a reference, when the s-waveplate is oriented to create RP from input horizontal linear polarization, the fast axis orientation is $$\theta /2$$. We operated in the space-frequency domain, and at the end we obtained the space-time dependence by Fourier transformation.

### Generation of the narrow polarization gate

The experimental implementation for the narrow polarization gate61 consists of using two consecutive quarter-waveplates, the first multiple-order QWM and the second zero-order QW0, with relative eigenaxes at 45°. In the scheme of Fig. 6, the fast axes of QWM and QW0 are located at 0° and 45°, respectively. To operate as a narrow gate, the system is illuminated with LP pulses at 45° with respect to QWM (upper drawing). The thickness of the QWM introduces a delay (of the order of the pulse duration) between the $$x$$ (fast) and $$y$$ (slow) polarization projections. After the QWM, there is a superposition of both delayed pulse projections, producing LP at 0° and LP at 90° at the leading and trailing edges of the pulse, respectively. Due to the dephase of the QWM, there is CP in the centre of the pulse (same amplitude of the projections). When this pulse impinges on the second waveplate (QW0), the leading and trailing edges of the pulse switch to left- and right-handed CP, respectively, while the CP is converted to LP, producing a sharp minimum of ellipticity in the centre of the pulse, known as narrow polarization gate53,61,62,63. Contrarily, if the input light before the waveplates has LP at 0° (lower scheme in Fig. 6), this is preserved after QWM (having a neutral axis at 0°). The LP is converted to constant CP after QW0 because the 45°-angle between the LP pulse and the eigenaxes of the waveplate. For other input LP pulses, the narrow gate will operate differently, as we show and discuss in the corresponding Results Section when the input beam is radially polarized.