## Abstract

Generation of particular polarization states of light, encoding information in polarization degree of freedom, and efficient measurement of unknown polarization are the key tasks in optical metrology, optical communications, polarization-sensitive imaging, and photonic information processing. Liquid crystal devices have proved to be indispensable for these tasks, though their limited precision and the requirement of a custom design impose a limit of practical applicability. Here we report fast preparation and detection of polarization states with unprecedented accuracy using liquid-crystal cells extracted from common twisted nematic liquid-crystal displays. To verify the performance of the device we use it to prepare dozens of polarization states with average fidelity 0.999(1) and average angle deviation 0.5(3) deg. Using four-projection minimum tomography as well as six-projection Pauli measurement, we measure polarization states employing the reported device with the average fidelity of 0.999(1). Polarization measurement data are processed by the maximum likelihood method to reach a valid estimate of the polarization state. In addition to the application in classical polarimetry, we also employ the reported liquid-crystal device for full tomographic characterization of a three-mode Greenberger–Horne–Zeilinger entangled state produced by a photonic quantum processor.

© 2021 Optical Society of America under the terms of the OSA Open Access Publishing Agreement

## 1. Introduction

Direction, phase, and coherence of electromagnetic wave oscillation, i.e. its polarization state, represents an important feature determining the interaction of light and matter. Light reflection and scattering are fundamentally affected by incident polarization [1]. Manipulating the state of polarization can significantly improve optical resolution [2] and visualization of anisotropic structures in biomedical imaging [3,4]. Polarization modulation enhances information capacity in optical communication [5] and represents a building block of quantum communication and quantum information processing [6,7]. Precise generation and detection of the polarization state represent the crucial tasks in a vast number of applications. Electrically tunable birefringent elements like liquid crystals, Pockels cells, and integrated electrooptical modulators are often employed to control polarization in such applications. Pockels based polarization modulators were successfully applied in optical switches [8] and loop-based photonic routing, where high transmittance is of paramount importance [9–11]. They offer high-speed operation and an acceptable extinction ratio, but their application is rather cumbersome due to their size and the necessity of high-voltage driving. Integrated devices achieve even wider bandwidth enabling ultra-fast polarimetry [12]. They possess significant losses and their calibration might be challenging, though, mainly due to unavoidable waveguide coupling. Liquid crystals allow low-loss free-space polarization addressing using low-voltage control signals. Their operation is faster than mechanically manipulated birefringent elements, which has proven beneficial in polarimetry [13–16] and spectrometry [17,18]. Liquid crystal devices have also been successfully employed in polarization and phase modulation [19–25] and switching [26,27]. Moreover, the absence of moving parts improves the robustness and lifespan of the device [25,28].

In a vast majority of the polarimetric applications reported so far, nematic liquid crystals are used in custom devices acting as variable retarders [13,14,19,21,25]. Incompatibility of these devices with the common *twisted* nematic liquid crystal (TNLC) configuration widely utilized in display technology makes their broad application difficult. Another complication stems from the fact, that additional wave plates or birefringent compensators are often utilized to change the overall polarization transformation. Peinado et al. reported a polarimeter using a quarter-wave plate and a single tilted twisted nematic element in reflective geometry [16]. The device was optimized to project an unknown polarization state to four polarization projections symmetrically placed on the Bloch sphere (Poincaré sphere), i.e. the vertices of a regular tetrahedron inscribed into the sphere. This minimum information measurement, also termed the minimum tomography [29,30], was shown to be efficient but prone to noise and measurement errors [31–35]. Furthermore, a TNLC device applies a complex combination of rotation and retardation to incident polarization state, and the exact theoretical description of the device operation and its calibration remains a significant challenge [36,37].

Here we present a TNLC device based on a commercially available TNLC display with minimal modifications. The construction of the *TNLC device* is described in Section 2. In Section 3, we show that the theoretical model of a twisted nematic liquid crystals cell has a limited ability to predict the polarization changes. The novel calibration method, described in Section 4, *does not require* a theoretical model and yields unprecedented accuracy. We show how to calibrate the TNLC device to prepare an arbitrary polarization state and perform arbitrary polarization projection. The calibration stage is boosted by a genetic algorithm and other possible improvements are also discussed. In section 5, we test the TNLC device by preparing more than a hundred polarization states covering the Bloch sphere uniformly with an unprecedentedly high average fidelity of 0.999(1), including six eigenstates of Pauli operators and four states needed for the minimum tomography. Also, we show depolarized state preparation with degree of polarization 0.03(1). The presented device is ready to be used as a polarimeter, performing the polarization state tomography. In Section 6 we briefly review the polarization state tomography, and then we test the performance of the TNLC-based polarimeter. Furthermore, the TNLC device is employed in full quantum tomography of three-qubit Greenberger–Horne–Zeilinger entangled state produced by photonic quantum Toffoli gate.

## 2. Construction of TNLC device

The presented polarimetric device consists of three TNLC cells extracted from commercially available displays. We tested several commercially available displays, namely TN reflective display *Lumex LCD-S101D14TR*, super-TN (STN) reflective display *RS Pro 5080PHR*, transmissive TNLC display *OCZ Vrchlabi 2027*. We also tested transmissive STN pixel display *OCZ Vrchlabi 2001* and reflective STN pixel display *DOG XL*. Due to their limited fill factor, the transmitted polarization state is spatially modulated and effectively depolarized. We therefore find them inappropriate for the presented application. We selected display *Lumex LCD-S101D14TR*, which has 7 segments (cells) and dimensions 33$\times$50 mm, see Fig. 1(a). This particular model was chosen as a trade-off between the size of the segment and the overall compactness of the whole device. The TNLC reflective display cannot be directly used in transmission geometry or even to perform a unitary transformation. Therefore, we first removed reflective layers, protective films, polarizing sheets, and also other auxiliary layers from the displays. Using a micrometer screw gauge, we measured the thickness of the LC layer to be $6\pm 2 \mu \textrm {m}$. The number in parenthesis represents one standard deviation at the least significant digit.

We mounted the TNLC glass cells on printed circuit boards and stacked them, as shown in Fig. 1(b,c). The main circuit board contains a driver consisting of a microcontroller, 16-bit digital-to-analog converter, and a voltage amplifier [38]. The microcontroller receives serial commands from a computer and controls the digital-to-analog converter. The produced control voltage signal is a symmetric square wave with frequency 1 kHz and 50$\%$ duty cycle. The square wave amplitude spans from 0 to 10 Vpp and effectively controls the action of the liquid crystals. For brevity, we refer to the control voltage amplitude simply as the *voltage*. The voltage is applied between the central segment electrode, denoted G in Fig. 1(a), and the common back electrode (COM) of the TNLC cell. The central segment has a 15$\times$4.5 mm approximately rectangular clear aperture, which is perfectly sufficient for collimated optical beams with mode field diameter up to 2.5 mm. The device can address the polarization state of several parallel optical beams arranged in a line or a matrix in complex quantum information processing circuits [39–41].

The transmittance of the single cell is 84% and the transmittance of the whole device is 59% at wavelength 810 nm. Limited transmittance is not an obstacle for classical polarimetry. At the single-photon level, the presented transmittance is also sufficient, as we demonstrate in Section 6. Antireflective coating TNLC cells could increase the transmittance of a single cell up to $90\%$, increasing the overall transmittance to $73\%$. Only in loss-sensitive scenarios, for example measurements involving squeezed light, the limited transmittance becomes an obstacle.

## 3. Characterization of a single TNLC cell

Let us start with a brief review of the Dirac notation, used here to describe the polarization, and connect it to the traditional description of polarized light. We describe pure polarization states with a *ket state*, denoted with symbol $|{\cdot }\rangle$, which is equivalent to the normalized Jones vector. It holds that $|{J}\rangle = \frac {\mathbf {J}}{||\mathbf {J}||}$, where $\mathbf {J} = J_{x}\mathbf {x} + J_{x}\mathbf {y}$ is the Jones vector and $\mathbf {x}$ and $\mathbf {y}$ are orthonormal vectors, both normal to the direction of light propagation. The choice of basis is arbitrary, and the vector can be written as a superposition of any two orthonormal basis states. We choose basis states $|{H}\rangle$ and $|{V}\rangle$ corresponding to horizontally and vertically polarized light to keep the close correspondence between Jones vector and ket states. Explicitly, the correspondence is $|{J}\rangle = \left (J_{x}|{H}\rangle + J_{y}|{V}\rangle \right )\left (|J_{x}|^{2} + |J_{y}|^{2}\right )^{-1/2}$.

Density matrix $\rho = \sum _{\lambda } p_\lambda |J_\lambda \rangle \langle J_\lambda |$ composed as an incoherent mixture of pure states $|{J_{\lambda }}\rangle$ with a probability distribution $p_\lambda$ also describes polarization of light, but in comparison to ket-vectors, it can also describe partially polarized light. Term $|J_\lambda \rangle \langle J_\lambda |$ is the outer product of $|{J}\rangle$ and its Hermitian conjugate, a $2\times 2$ complex trace-normalized Hermitian matrix. Any polarization density matrix can be expanded using the identity $\mathbb {I}$ and the Pauli matrices, $\sigma _1,\,\sigma _2,\,\sigma _3$, $\rho = (\mathbb {I} + \sum _{j=1}^{3} u_j \sigma _j )/2$, where ${\textbf u}=(u_1,u_2,u_3)$ is the *Bloch vector*. Compared to the Stokes vector, the Bloch vector does not contain information about the optical intensity, and its size is upper-bounded to one. We represent the polarization states geometrically using the *Bloch sphere*. A Bloch vector contains Cartesian coordinates of a point within the sphere. A point on the surface of the Bloch sphere, described with longitude $\theta$ and latitude $\phi$, corresponds to a pure state $|{J}\rangle = \cos (\frac \theta 2)|{H}\rangle + \exp (i\phi )\sin (\frac \theta 2)|{V}\rangle$. In this representation, left- and right-handed circular polarizations lie on the south and north pole of the sphere, respectively. All linear polarizations lie on the equator of the sphere. A point inside the sphere describes a partially polarized state. We quantify its *purity* as $P = \textrm {Tr}(\rho ^{2}) = \frac {1}{2}\left (1 + ||\mathbf {u}||^{2}\right )$. The length of Bloch vector, $||\mathbf {u}|| = \sqrt {\sum _{j=1}^{3}u_j^{2}}$, in the expression for purity is the classical degree of polarization (DoP). *Fidelity* $F = [\textrm {Tr}\sqrt {\sqrt {\rho _u}\rho _v\sqrt {\rho _u}}]^{2}$ of density matrices $\rho _u$ and $\rho _v$ quantifies their similarity. It can be expressed in terms of the corresponding Bloch vectors, $\mathbf {u}$ and $\mathbf {v}$, as $F = \frac {1}{2}\left ( 1 + \mathbf {u}\cdot \mathbf {v} + \sqrt {(1-||\mathbf {u}||)(1-||\mathbf {v}||)} \right )$. The fidelity is connected to the angular deviation of the Bloch vectors $\vartheta = \frac {1}{2}\arccos \left ( \frac {\mathbf {u}\cdot \mathbf {v}}{||\mathbf {u}||\,||\mathbf {v}||} \right )$ via the dot-product term.

The polarization transformation introduced by a device is described with matrix $M$ acting on a density matrix of the input state, $\rho _\textrm {out} = M \rho _\textrm {in} M^{\dagger }$, where $\dagger$ stands for Hermitian conjugation. The transformation matrix $M$ of an ideal TNLC cell can be derived using a sequence of thin wave plates, each introducing a small phase delay and oriented at linearly increasing azimuth angle [42]. The transformation reads

*retardance*) is almost constant up to a threshold voltage and decreases for larger voltages. The retardance is usually approximated using an $\arctan {}$ function [43]. We propose to model the retardance more precisely using a logistic function, where $A$, $B$, $C$, $D$, and $E$ are constants and $V$ is the voltage applied on the TNLC cell.

Let us show how a single TNLC cell transforms a polarization state, according to the model, and compare it with experimental data. We prepared state $|{H}\rangle$ on the input of the tested TNLC cell and changed the control voltage amplitude. For each voltage, we measured the output polarization state using a reference polarimeter. We plot the phase delay introduced by the cell in Fig. 2 as a function of voltage. The least-square fit with the proposed logistic function in Fig. 2 clearly describes the measured data better than the approximation with $\arctan$. This measurement was repeated for four known angular positions $\beta$ of the TNLC cell, namely $\beta = 0$ deg, 15 deg, 30 deg, and 45 deg. See Fig. 3(a) for a scheme of the experimental setup used in this measurement. We performed a least-square fit of the measured data to obtain seven independent parameters of the TNLC model $A=-7.8$, $B=0.076$, $C=176.16$, $D=-2.9$, $E=-2.9$, $\varphi =-5.16$, and $\alpha =-2.6$.

In Fig. 3(b), we compare measured data with the theoretical predictions based on fitted parameters. The prepared and expected states are depicted using the Bloch sphere, which is plotted in the Hammer map projection [44]. Clearly, a single TNLC cell covers only a curve on the Bloch sphere. To transform state $|{H}\rangle$ into an arbitrary pure polarization state, one needs to introduce additional independent polarization transformations. This is the reason why the reported TNLC device consists of three TNLC cells controlled with independent voltages. Furthermore, the model deviates from the measured data even though it was fitted to the same data. Parameters of the model vary between individual TNLC cells, which represents a complication in modeling multi-cell devices. The accuracy of the model could be further improved by considering edge effects in the vicinity of aligning layers [36,37] and accounting for other imperfections, such as multiple reflections, depolarization effects, and thickness inhomogeneity. However, no model with sufficiently high fidelity with the experimental data covering all possible states has been reported. Also, it is very complicated to make an inverse of such a complex numerical model. In the following section, we introduce a novel calibration method that solves both issues.

## 4. Calibration of TNLC device

We aim for the device able to prepare an arbitrary polarization state with high precision. The calibration of the TNLC device consists of finding control voltages $V_1, V_2$, and $V_3$, one for each TNLC cell, for which the device transforms the pure input state $|{H}\rangle$ to the pure particular target state $|{\psi }\rangle$.

The calibration is thus formulated as *maximization of the fidelity* $F = |\langle {\psi }|M(V_1, V_2, V_3)|{H}\rangle |^{2}$, where $M$ is transformation introduced by the TNLC device, over the three control voltages. The fidelity $|\langle {\psi }|M(V_1, V_2, V_3)|{H}\rangle |^{2}$ is proportional to the intensity of projection onto the target state, which is directly experimentally measurable. The maximization *does not rely* on the theoretical model, and various methods could be used to solve it. Straightforward methods, like brute-force search or random sampling, are time-consuming as they require many measurements. Therefore we choose a genetic algorithm [45] to speed up the calibration.

The initial population is created as three-element random-voltage vectors, and a fitness function is the detected photocurrent. We sequentially apply these voltages settings and directly measure the value of the fitness function. We choose voltages with the largest fitness from this first generation and crossover them to produce “child” voltages, which replace the voltages of lesser fitness. As a crossover method, we chose the arithmetic mean of the corresponding voltages. A random mutation in range of $\pm 500$ mVpp is also applied to a randomly chosen component of the voltage vector. These steps are repeated until the fitness changes less than one part per thousand, which is roughly an order of magnitude larger than the uncertainty of the intensity measurement. Further iterations would slightly improve the precision at the expense of the longer time needed for the calibration. Although the TNLC theoretical model (1)–(3) is neither perfect nor required, it can be used to speed up the search by providing a rough initial estimate of the voltage values for the first generation of the genetic algorithm. Even faster calibration might be obtained using black-box optimization methods [46]. As the last step of the calibration, we generate 120 random voltage vectors around the fittest voltage vector using a normal distribution with a half-width of 0.1 Vpp. We prepare states using these voltages and measured them using a reference polarimeter. Finally, we select the optimum voltages that produce the target state with the highest fidelity.

The optimum voltages slightly vary for the TNLC cells extracted from different TNLC displays, even when selected from a single manufacturing batch. The voltages are also affected by offsets of voltage regulators and digital-to-analog converters incorporated in the electronic drivers, see Sec. 2. Consequently, the calibration has to be performed independently for each TNLC device. A detailed calibration sheet with optimum voltages for various target states and several TNLC devices assembled in our lab is available on GitHub [38].

The experimental setup for the calibration is depicted in Fig. 4(a). An 810-nm continuous-wave laser light passes the first horizontal polarizer (calcite crystal with extinction ratio exceeding $1\;:\;10^{4}$), and then it passes the TNLC device. The output polarization state is projected onto the desired state $|{\psi }\rangle$ in a detection block, consisting of half- and quarter-wave plates followed by another horizontal polarizer (another calcite crystal). The photodiode measures the optical intensity, which is proportional to the fitness function. The wave plates are mounted in motorized rotation stages (Newport PR50CC) with the angular speed of 20 deg/s and typical bi-directional repeatability $\pm 30$ mdeg. The angular positions of these wave plates control which projection we measure. We also use the waveplates to realize projections to six eigenstates of Pauli matrices, $|{H}\rangle$, $|{V}\rangle$, $|{D}\rangle$, $|{A}\rangle$, $|{R}\rangle$, and $|{L}\rangle$. Section 6 explains how to use these projections to reconstruct a quantum state. For now, we state that the *analysis and detection* block serves also as a reference polarimeter.

In addition to *preparing* arbitrary pure polarization state, the TNLC device can *project* a state onto an arbitrary pure state. Just by simple reversion of the calibration setup, depicted in Fig. 4(b), we could maximize $F = |\langle {H}|M(V_1, V_2, V_3)|{\psi }\rangle |^{2}$ using the same algorithm. The presented calibration can be performed for an arbitrary wavelength within visible and near-infrared regions.

## 5. Precise preparation of arbitrary polarization

We first test the presented TNLC device calibration on a set of six eigenstates of Pauli operators. We measured the prepared state with the reference polarimeter. The Bloch parameters of the prepared states are shown in Table 1. The prepared states show high purity, $P = 0.999(2)$ on average, and are very close to the ideal target states. The number in parenthesis represents one standard deviation at the last decimal digit [47]. The average fidelity of the observed state to the ideal target states reaches $F = 0.999(1)$ with the corresponding average angular deviation of 1.1(3) deg. We believe that the very small remaining discrepancy is mainly due to the stopping criteria of the calibration search (one part per thousand) and also inaccuracies of the reference polarimeter, such as retardation error of the waveplates or their misalignment.

We observed perfect stability in time and low sensitivity to temperature changes under common laboratory conditions. The cell’s temperature variation within $\pm 3^{\circ }$C did not cause any measurable changes in the calibration. Similarly, central wavelength variation within $\pm 5$ nm does not introduce any measurable changes.

We chose the six eigenstates of Pauli operators because they are traditionally used in polarization state tomography, which we will show in Section 6. Another important tomographic set of states forms the vertices of a regular tetrahedron inscribed into the Bloch sphere. We searched for the states that maximize the tetrahedron volume and reached the ratio of the measured volume to the volume of the regular tetrahedron $V_{\textrm {meas}}/V_{\textrm {ideal}} = 0.9987(5)$.

Furthermore, we prepare 120 states, quasi-uniformly distributed over the Bloch sphere. Figure 5 visually compares the prepared states with the ideal target states. It clearly shows that the presented device can produce an arbitrary pure state with high precision. The prepared states were again almost pure, with average purity $P = 0.999(2)$. The average fidelity of 0.999(1) and the corresponding average angular deviation of 0.5(3) deg indicate the precise preparation of arbitrary pure state achieved by the presented device.

In addition to the pure polarization states, it is also beneficial to prepare partially mixed states, i.e., states with an arbitrary degree of polarization DoP. Depolarization can be achieved by ensemble averaging of a polarization state in spatial, frequency, or time domain [22]. Often, the maximally depolarized state is prepared and then superimposed to a pure state to form a source with continuously tunable DoP. In the case of a voltage-controlled TNLC cell, a specific voltage applied to the TNLC cell performs corresponding unitary operation. Therefore, time multiplexing of various control voltages within the single acquisition time must be used. We demonstrate the preparation of a maximally mixed state by uniformly cycling through the polarization states H, V, D, A, R, and L during the measurement time. Note that the acquisition is paused during the time needed to switch from one prepared state to another. The resulting prepared state possesses the purity 0.5004(3) and the corresponding DoP 0.03(1).

The reported TNLC device is made from thick TNLC cells and is not optimized with respect to its speed. However, to present the full characterization of the TNLC device, we measured its time response, for which we used the setup shown in Fig. 4(b). The wave plates prepare a pure input state which is then projected onto another pure state using the tested device. The corresponding projection intensity is detected with a photodiode. To study the time response, we switch the projection and sample the transition in the detected photocurrent using an analog-to-digital converter with an 18-bit resolution acquiring approximately 1000 samples per second.

Specifically, we measured the transition times of all the projections onto Pauli operators eigenstates (H, V, D, A, R, L). We prepared a corresponding input state for an initial projection to obtain a maximal optical intensity at the detector. Then we switched the projection. We define the *transition time* as the time from the issued command to the moment when the intensity deviation from its final value stays under $1\%$ of the total intensity ($0\%$ to $99\%$ transition time). We chose this value to ensure a stable operation after the transition. The measured transition times are shown in Table 2, and the time traces of all 30 transitions are shown in Fig. 6.

The particular transitions, such as H$\rightarrow$V, are rather fast and suitable for rapid polarization switching, but there is a transition exceeding 600 ms, namely L$\rightarrow$H. Specially designed nematic liquid crystal retarders and switches typically specify faster switching, particularly those with a thinner liquid crystal layer and a single optimized polarization transition. Also, their transition times are often specified as $10\%$ to $90\%$ or even $20\%$ to $80\%$, which is not sufficient for precise settling of the induced polarization transformation in polarimetry.

## 6. TNLC polarimeter

The presented device is compact, robust, and capable of precise polarization manipulation with less than one second transition times. Here, we utilize the developed TNLC device to create a polarimeter based on *polarization state tomography*. The polarization state tomography finds its applications mainly when we deal with single-photon signals or measure multi-photon polarization states. In these applications, the classical polarimetry techniques are not sufficient. The presented polarimeter outperforms conventional rotating-waveplates-based polarization tomography in speed, precision, and versatility.

Let us first briefly review the principle of polarization state tomography. The goal of the polarization state tomography is to unambiguously reconstruct an unknown state $\rho$ from a set of measurements. Let us start with the strong signal and six-state tomography. We assume that the light has intensity $I_0$ and unknown polarization. Recall that any density matrix could be decomposed as a sum of Pauli operators multiplied by Bloch vector components $\rho = (\mathbb {I} + \sum _{j=1}^{3} u_j \sigma _j )/2$. The projections onto eigenstates of these operators, $|{H}\rangle$, $|{V}\rangle$, $|{D}\rangle$, $|{A}\rangle$, $|{R}\rangle$, and $|{L}\rangle$ contains information about the polarization. Specifically, the measured intensities of these projections are

These six equations contain three unknown parameters $u_i$ of the polarization state. In the previous section, we showed that our device is capable of realizing these projections. One can obtain the parameters $u_i$ from (4–9) by straightforward inversion,

In the presence of measurement noise, the linear inversion may introduce artifacts. For example, the reconstructed density matrix can have negative eigenvalues, leading to a degree of polarization greater than one. We call such a density matrix *unphysical*.

To avoid these problems, we use a maximum-likelihood reconstruction method [48–51]. The method searches for a valid quantum state that would reproduce the measured data with the maximum likelihood. It guarantees that the reconstructed state is always physical. Instead of optical intensities $I_i$ of projection $\langle {\pi _i}|\rho |{\pi _i}\rangle$, we work with relative frequencies $f_i$, which correspond to normalized intensities $f_i = \frac {I_{i}}{\sum I_{i}}$. The logarithm of likelihood of observing relative frequencies $\{ f_i \}$ given the input polarization state $\rho$ is proportional to

The likelihood quantifies the degree of belief in the hypothesis that for the particular set of observations the polarization is in state $\rho$. We can work with the logarithm of the likelihood with neglected multiplicative factors because if the likelihood is maximized, then any monotonically increasing function of the likelihood is also maximized.

The density matrix $\rho$, which maximizes the likelihood, satisfies the extremal equation [48,50,51]

whereEquation (14) leads to an iteration that maximizes the likelihood. The iteration reads

starting from $\rho _0 = \mathbb {I}/2$ and stopping when the change in one step gets small enough, $\textrm {Tr}|\rho _{i+1} - \rho _i|^{2} < \epsilon$. The derivations of the extremal and iterative equations are covered in Ref. [48,50,51]. So far, we have used projection measurement operators $\Pi _{i} = |{\pi _i}\rangle \langle {\pi _i}|$, namely $|{H}\rangle \langle {H}|, \dots , |{L}\rangle \langle {L}|$. Let us note that the polarization tomography is not restricted to these particular projections and*any tomographically complete*set of positive measurement operators (POVM) is applicable. The method also applies to single-photon signals, for which the detected intensity $I_i$ is replaced with the recorded number of detection events in a given projection. We provide a Python script for the maximum likelihood reconstruction on GitHub [38]. Examples of waveplate-based and TNLC-based polarization tomography are also included.

We test the TNLC polarimeter by comparing its readings to the known input polarization states. We prepared the input polarization states using waveplates and measured them using the tested TNLC polarimeter. Namely, we prepared the six eigenstates of Pauli operators. The TNLC polarimeter was calibrated to perform the projections onto Pauli eigenstates as well as the four states required for minimal tomography [29]. As a reference, we replaced the TNLC polarimeter with a pair of waveplates and performed the standard six-state tomography.

The resulting fidelities and angular deviations averaged over the six tested states are summarized in Table 3. The individual sample states analyzed using the presented TNLC device with the six-state tomography and the four-state tomography are visualized in Fig. 7. The six-state tomography outperforms the four-state minimal tomography consistently. The results produced by the TNLC polarimeter agree excellently with the results provided by a reference waveplate-based polarimeter. Note that the used reference polarimeter is not the same polarimeter we used for TNLC device calibration.

Now we show that the presented TNLC polarimeter outperforms the equivalent scheme with waveplates in terms of speed. The ordering of the projections in the tomographic measurement does not affect the result of the measurement but influences its duration [52]. Based on the transition time characterization (Table 2), we can select the optimum sequence ordering of the six-state protocol, which is H, R, L, A, D, V, and back to H to prepare the TNLC device for another tomography cycle. The transition of the optimum sequence takes 1.17 s. For the minimal tomography [29], only four states are required. The transitions times between them are longer than in the six-state scheme. It takes approximately 1.2 s to cycle through these four states. Consequently, we recommend to using six-state tomography with the presented device.

We compare these values with the total time required by our reference waveplate-based polarimeter. The reference polarimeter uses motorized mounts with a typical speed of 20 deg/s (Newport PR50CC), and the optimum sequence reads H, L, A, R, V, D, and back to H. The sequence takes 12.9 s, which is an order of magnitude slower than using the TNLC device. The optimal sequence ordering can significantly speed up the whole measurement process, especially for multi-mode analysis or quantum circuits with more qubits [52]. Alternatively, all projections can be measured at the same time [30,53] at the expense of a number of detectors and the complexity of the experimental setup.

To show an application of the reported TNLC device at the single-photon level, we used it in quantum tomography of a multi-qubit photonic entangled state. The TNLC device was calibrated in a six-state configuration using the strong laser signal, as described in Sec. 4. The TNLC device was then used to perform tomographic projections on the third output qubit of a three-qubit linear optical controlled-Z gate (CCZ gate). The gate is equivalent to the Toffoli gate up to single-qubit Hadamard transform on a target qubit [39,54–56]. The Toffoli gate is a crucial part of many quantum information processing schemes [54]. The photonic circuit of the gate and its characterization were presented in detail elsewhere [57]. The gate can produce entangled quantum states such as tripartite Greenberger-Horne-Zeilinger (GHZ) state [58,59]. We used the circuit to prepare the GHZ state $\left (|HHD\rangle + |VVA\rangle \right )/\sqrt 2$ and performed its full tomographic characterization using the TNLC device. The resulting density matrix of the three-qubit state is shown in Fig. 8(a,b). The fidelity of the measured state and the ideal GHZ state is 0.9362. For comparison, we characterized the state also using a common waveplate-based tomography and obtained the fidelity to the ideal state 0.9360; the resulting density matrix is shown in Fig. 8(c,d). The respective fidelity of the retrieved GHZ states measured using the TNLC device and the wave-plate polarimeter reaches 0.971. The small resulting discrepancy is caused by the limited repeatability of the experimental setup. When changing the TNLC device for the waveplates, the setup had to be partly reassembled and realigned. Due to the circuit construction, this realignment might lead to small changes in polarization-dependent losses. Furthermore, the interferometric phase in the experimental setup was slowly drifting, and the phase drift might result in small changes between two experimental runs.

## 7. Conclusion

We have presented a polarimetric device assembled from a commercially available TNLC segment display with minimal modifications. We have demonstrated a universal method of the TNLC device calibration utilizing a genetic algorithm. Various polarization states have been prepared using the TNLC device and characterized with a reference polarimeter with the average fidelity exceeding 0.999(1). Particularly, we have demonstrated a highly accurate generation of four states forming the vertices of a regular tetrahedron inscribed into the Bloch sphere [29], six eigenstates of Pauli operators (horizontal, vertical, diagonal, anti-diagonal, right-handed and left-handed circular polarizations), and 120 states uniformly distributed on the Bloch Sphere. We also have generated a completely depolarized state with the purity 0.5004(3) and degree of polarization 0.03(1). Using the presented calibration procedure, we can generate an arbitrary state of polarization.

Furthermore, we have employed the reported TNLC device as a polarimeter and demonstrated accurate measurement of polarization of light. Physically correct density matrix of the polarization state is retrieved using the maximum likelihood iterative algorithm. We have tested two tomographic schemes, namely four-projection minimal tomography and overdetermined six-projection scheme based on eigenstates of the Pauli matrices. We have characterized and optimized the precision and speed of the developed polarimeter. The TNLC device has been successfully used also for polarimetry of optical signals at the single-photon level. Particularly, we have performed the full quantum tomography of the three-qubit Greenberger–Horne–Zeilinger entangled state produced by photonic quantum Toffoli gate. The results agree with those obtained using common wave-plate polarimetry.

To conclude, we have demonstrated the calibration and application in polarimetry of virtually arbitrary *twisted* nematic liquid crystal segment displays. The approach allows highly accurate preparation and measurement of an arbitrary polarization state of light using low-voltage driving and no moving parts. The approach is fully scalable to many optical modes at the single-photon level. It can find applications in a wide range of fields, such as polarization-sensitive biomedical imaging or photonic quantum information processing.

The complete technical documentation of the presented TNLC device, including tomography software, is published on GitHub [38].

## Funding

Ministerstvo Školství, Mládeže a Tělovýchovy (8C18002); Univerzita Palackého v Olomouci (IGA-PrF-2020-009, IGA-PrF-2021-006); Grantová Agentura České Republiky (17-26143S); Horizon 2020 Framework Programme (8C18002, HYPER-U-P-S).

## Acknowledgments

We thank Michal Dudka for developing electronic driver circuitry. Project HYPER-U-P-S has received funding from the QuantERA ERANET Cofund in Quantum Technologies implemented within the European Union’s Horizon 2020 Programme.

## Disclosures

The authors declare that there are no conflicts of interest related to this article.

## Data availability

Data underlying the results presented in this paper are not publicly available at this time, but they will be available on the GitHub repository [38] and may be obtained from the authors upon request.

## References

**1. **S. Huard, * Polarization of Light* (Wiley, 1997).

**2. **G. Chen, Z.-Q. Wen, and C.-W. Qiu, “Superoscillation: from physics to optical applications,” Light: Sci. Appl. **8**(1), 56 (2019). [CrossRef]

**3. **A. Van Eeckhout, E. Garcia-Caurel, T. Garnatje, M. Durfort, J. C. Escalera, J. Vidal, J. J. Gil, J. Campos, and A. Lizana, “Depolarizing metrics for plant samples imaging,” PLoS One **14**(3), e0213909 (2019). [CrossRef]

**4. **K. Zhanghao, X. Chen, W. Liu, M. Li, Y. Liu, Y. Wang, S. Luo, X. Wang, C. Shan, H. Xie, J. Gao, X. Chen, D. Jin, X. Li, Y. Zhang, Q. Dai, and P. Xi, “Super-resolution imaging of fluorescent dipoles via polarized structured illumination microscopy,” Nat. Commun. **10**(1), 4694 (2019). [CrossRef]

**5. **Z.-Y. Chen, L.-S. Yan, Y. Pan, L. Jiang, A.-L. Yi, W. Pan, and B. Luo, “Use of polarization freedom beyond polarization-division multiplexing to support high-speed and spectral-efficient data transmission,” Light: Sci. Appl. **6**(2), e16207 (2017). [CrossRef]

**6. **F. Flamini, N. Spagnolo, and F. Sciarrino, “Photonic quantum information processing: a review,” Rep. Prog. Phys. **82**(1), 016001 (2019). [CrossRef]

**7. **S. Slussarenko and G. J. Pryde, “Photonic quantum information processing: A concise review,” Appl. Phys. Rev. **6**(4), 041303 (2019). [CrossRef]

**8. **N. Spagnolo, C. Vitelli, S. Giacomini, F. Sciarrino, and F. D. Martini, “Polarization preserving ultra fast optical shutter for quantum information processing,” Opt. Express **16**(22), 17609–17615 (2008). [CrossRef]

**9. **Y. He, X. Ding, Z.-E. Su, H.-L. Huang, J. Qin, C. Wang, S. Unsleber, C. Chen, H. Wang, Y.-M. He, X.-L. Wang, W.-J. Zhang, S.-J. Chen, C. Schneider, M. Kamp, L.-X. You, Z. Wang, S. Höfling, C.-Y. Lu, and J.-W. Pan, “Time-Bin-Encoded Boson Sampling with a Single-Photon Device,” Phys. Rev. Lett. **118**(19), 190501 (2017). [CrossRef]

**10. **S. Takeda, K. Takase, and A. Furusawa, “On-demand photonic entanglement synthesizer,” Sci. Adv. **5**(5), eaaw4530 (2019). [CrossRef]

**11. **J. Tiedau, E. Meyer-Scott, T. Nitsche, S. Barkhofen, T. J. Bartley, and C. Silberhorn, “A high dynamic range optical detector for measuring single photons and bright light,” Opt. Express **27**(1), 1–15 (2019). [CrossRef]

**12. **J. B. Altepeter, N. N. Oza, M. Medić, E. R. Jeffrey, and P. Kumar, “Entangled photon polarimetry,” Opt. Express **19**(27), 26011–26016 (2011). [CrossRef]

**13. **J. M. Bueno, “Polarimetry using liquid-crystal variable retarders: theory and calibration,” J. Opt. A: Pure Appl. Opt. **2**(3), 216–222 (2000). [CrossRef]

**14. **A. De Martino, Y.-K. Kim, E. Garcia-Caurel, B. Laude, and B. Drévillon, “Optimized Mueller polarimeter with liquid crystals,” Opt. Lett. **28**(8), 616–618 (2003). [CrossRef]

**15. **A. Peinado, A. Lizana, J. Vidal, C. Iemmi, and J. Campos, “Optimization and performance criteria of a Stokes polarimeter based on two variable retarders,” Opt. Express **18**(10), 9815–9830 (2010). [CrossRef]

**16. **A. Peinado, A. Lizana, J. Vidal, C. Iemmi, and J. Campos, “Optimized Stokes polarimeters based on a single twisted nematic liquid-crystal device for the minimization of noise propagation,” Appl. Opt. **50**(28), 5437–5445 (2011). [CrossRef]

**17. **O. Aharon and I. Abdulhalim, “Liquid crystal Lyot tunable filter with extended free spectral range,” Opt. Express **17**(14), 11426–11433 (2009). [CrossRef]

**18. **Y. August and A. Stern, “Compressive sensing spectrometry based on liquid crystal devices,” Opt. Lett. **38**(23), 4996–4999 (2013). [CrossRef]

**19. **Z. Zhuang, S.-W. Suh, and J. S. Patel, “Polarization controller using nematic liquid crystals,” Opt. Lett. **24**(10), 694–696 (1999). [CrossRef]

**20. **I. Moreno, J. L. Martínez, and J. A. Davis, “Two-dimensional polarization rotator using a twisted-nematic liquid-crystal display,” Appl. Opt. **46**(6), 881–887 (2007). [CrossRef]

**21. **A. Safrani and I. Abdulhalim, “Liquid-crystal polarization rotator and a tunable polarizer,” Opt. Lett. **34**(12), 1801–1803 (2009). [CrossRef]

**22. **A. Peinado, A. Lizana, and J. Campos, “Use of ferroelectric liquid crystal panels to control state and degree of polarization in light beams,” Opt. Lett. **39**(3), 659–662 (2014). [CrossRef]

**23. **A. S. Rab, E. Polino, Z.-X. Man, N. B. An, Y.-J. Xia, N. Spagnolo, R. L. Franco, and F. Sciarrino, “Entanglement of photons in their dual wave-particle nature,” Nat. Commun. **8**(1), 915 (2017). [CrossRef]

**24. **A. Lumino, E. Polino, A. S. Rab, G. Milani, N. Spagnolo, N. Wiebe, and F. Sciarrino, “Experimental Phase Estimation Enhanced by Machine Learning,” Phys. Rev. Appl. **10**(4), 044033 (2018). [CrossRef]

**25. **A. Lohrmann, C. Perumgatt, and A. Ling, “Manipulation and measurement of quantum states with liquid crystal devices,” Opt. Express **27**(10), 13765–13772 (2019). [CrossRef]

**26. **X.-j. Wang, Z.-d. Huang, J. Feng, X.-f. Chen, X. Liang, and Y.-q. Lu, “Liquid crystal modulator with ultra-wide dynamic range and adjustable driving voltage,” Opt. Express **16**(17), 13168–13174 (2008). [CrossRef]

**27. **G. Zhu, B. yan Wei, L. yu Shi, X. wen Lin, W. Hu, Z. di Huang, and Y. qing Lu, “A fast response variable optical attenuator based on blue phase liquid crystal,” Opt. Express **21**(5), 5332–5337 (2013). [CrossRef]

**28. **C. Perumangatt, T. Vergoossen, A. Lohrmann, S. Sivasankaran, A. Reezwana, A. Anwar, S. Sachidananda, T. Islam, and A. Ling, “Realizing quantum nodes in space for cost-effective, global quantum communication: in-orbit results and next steps,” in * Quantum Computing, Communication, and Simulation*, P. R. Hemmer and A. L. Migdall, eds. (SPIE, 2021).

**29. **J. Řeháček, B.-G. Englert, and D. Kaszlikowski, “Minimal qubit tomography,” Phys. Rev. A **70**(5), 052321 (2004). [CrossRef]

**30. **A. Ling, K. P. Soh, A. Lamas-Linares, and C. Kurtsiefer, “Experimental polarization state tomography using optimal polarimeters,” Phys. Rev. A **74**(2), 022309 (2006). [CrossRef]

**31. **M. D. de Burgh, N. K. Langford, A. C. Doherty, and A. Gilchrist, “Choice of measurement sets in qubit tomography,” Phys. Rev. A **78**(5), 052122 (2008). [CrossRef]

**32. **A. Ling, A. Lamas-Linares, and C. Kurtsiefer, “Accuracy of minimal and optimal qubit tomography for finite-length experiments,” arXiv:0807.0991 (2008).

**33. **Yu. I. Bogdanov, G. Brida, M. Genovese, S. P. Kulik, E. V. Moreva, and A. P. Shurupov, “Statistical Estimation of the Efficiency of Quantum State Tomography Protocols,” Phys. Rev. Lett. **105**(1), 010404 (2010). [CrossRef]

**34. **Yu. I. Bogdanov, G. Brida, I. D. Bukeev, M. Genovese, K. S. Kravtsov, S. P. Kulik, E. V. Moreva, A. A. Soloviev, and A. P. Shurupov, “Statistical estimation of the quality of quantum-tomography protocols,” Phys. Rev. A **84**(4), 042108 (2011). [CrossRef]

**35. **D. Koutný, Y. S. Teo, Z. Hradil, and J. Řeháček, “Fast universal performance certification of measurement schemes for quantum tomography,” Phys. Rev. A **94**(2), 022113 (2016). [CrossRef]

**36. **A. Marquez, J. Campos, M. J. Yzuel, I. S. Moreno, J. A. Davis, C. C. Iemmi, A. Moreno, and A. Robert, “Characterization of edge effects in twisted nematic liquid crystal displays,” Opt. Eng. **39**(12), 3301–3307 (2000). [CrossRef]

**37. **M. Yamauchi, “Jones-matrix models for twisted-nematic liquid-crystal devices,” Appl. Opt. **44**(21), 4484–4493 (2005). [CrossRef]

**38. **M. Bielak, “Github repository,” https://github.com/BielakM/polarimeter (2020).

**39. **B. P. Lanyon, M. Barbieri, M. P. Almeida, T. Jennewein, T. C. Ralph, K. J. Resch, G. J. Pryde, J. L. O’Brien, A. Gilchrist, and A. G. White, “Simplifying quantum logic using higher-dimensional Hilbert spaces,” Nat. Phys. **5**(2), 134–140 (2009). [CrossRef]

**40. **M. Mičuda, M. Sedlák, I. Straka, M. Miková, M. Dušek, M. Ježek, and J. Fiurášek, “Efficient Experimental Estimation of Fidelity of Linear Optical Quantum Toffoli Gate,” Phys. Rev. Lett. **111**(16), 160407 (2013). [CrossRef]

**41. **L. Xiao, X. Zhan, Z. H. Bian, K. K. Wang, X. Zhang, X. P. Wang, J. Li, K. Mochizuki, D. Kim, N. Kawakami, W. Yi, H. Obuse, B. C. Sanders, and P. Xue, “Observation of topological edge states in parity–time-symmetric quantum walks,” Nat. Phys. **13**(11), 1117–1123 (2017). [CrossRef]

**42. **A. Yariv and A. P. Yeh, * Optical waves in crystals: propagation and control of laser radiation* (Wiley, 1984).

**43. **J. A. Davis, I. Moreno, and P. Tsai, “Polarization eigenstates for twisted-nematic liquid-crystal displays,” Appl. Opt. **37**(5), 937–945 (1998). [CrossRef]

**44. **J. P. P. Snyder, * Flattening the Earth: Two Thousand Years of Map Projections* (University of Chicago Press, 1993).

**45. **A. E. Eiben and J. E. Smith, * Introduction to Evolutionary Computing* (Springer, 2015).

**46. **L. M. Rios and N. V. Sahinidis, “Derivative-free optimization: a review of algorithms and comparison of software implementations,” J. Global Optim. **56**(3), 1247–1293 (2013). [CrossRef]

**47. **“Standard Uncertainty and Relative Standard Uncertainty,” (2020). [Online; accessed 2. Jul. 2020].

**48. **Z. Hradil, “Quantum-state estimation,” Phys. Rev. A **55**(3), R1561–R1564 (1997). [CrossRef]

**49. **D. F. V. James, P. G. Kwiat, W. J. Munro, and A. G. White, “Measurement of qubits,” Phys. Rev. A **64**(5), 052312 (2001). [CrossRef]

**50. **M. Ježek, J. Fiurášek, and Z. Hradil, “Quantum inference of states and processes,” Phys. Rev. A **68**(1), 012305 (2003). [CrossRef]

**51. **Z. Hradil, J. Řeháček, J. Fiurášek, and M. Ježek, “3 Maximum-Likelihood Methodsin Quantum Mechanics,” in * Quantum State Estimation*, (Springer, 2004), pp. 59–112.

**52. **R. Hošák, R. Stárek, and M. Ježek, “Optimal reordering of measurements for photonic quantum tomography,” Opt. Express **26**(25), 32878–32887 (2018). [CrossRef]

**53. **I. Estévez, V. Sopo, A. Lizana, A. Turpin, and J. Campos, “Complete snapshot Stokes polarimeter based on a single biaxial crystal,” Opt. Lett. **41**(19), 4566–4569 (2016). [CrossRef]

**54. **M. A. Nielsen and I. L. Chuang, * Quantum Computation and Quantum Information* (Cambridge University Press, 2000).

**55. **T. Monz, K. Kim, W. Hänsel, M. Riebe, A. S. Villar, P. Schindler, M. Chwalla, M. Hennrich, and R. Blatt, “Realization of the Quantum Toffoli Gate with Trapped Ions,” Phys. Rev. Lett. **102**(4), 040501 (2009). [CrossRef]

**56. **A. Fedorov, L. Steffen, M. Baur, M. P. da Silva, and A. Wallraff, “Implementation of a Toffoli gate with superconducting circuits,” Nature **481**(7380), 170–172 (2012). [CrossRef]

**57. **R. Stárek, M. Mičuda, M. Miková, I. Straka, M. Dušek, P. Marek, M. Ježek, R. Filip, and J. Fiurášek, “Nondestructive detector for exchange symmetry of photonic qubits,” npj Quantum Inf. **4**(1), 35 (2018). [CrossRef]

**58. **D. M. Greenberger, M. A. Horne, and A. Zeilinger, “Going Beyond Bell’s Theorem,” in * Bell’s Theorem, Quantum Theory and Conceptions of the Universe*, (Springer, 1989), pp. 69–72.

**59. **J.-W. Pan, D. Bouwmeester, M. Daniell, H. Weinfurter, and A. Zeilinger, “Experimental test of quantum nonlocality in three-photon Greenberger–Horne–Zeilinger entanglement,” Nature **403**(6769), 515–519 (2000). [CrossRef]