# Robotized polarization characterization platform for free-space quantum
communication optics

Youn Seok Lee  Institute for Quantum Computing and Department of Physics and
Astronomy, University of Waterloo, Waterloo, Ontario N2L 3G1, Canada
<EMAIL_ADDRESS>Kimia Mohammadi  Institute for Quantum Computing and
Department of Physics and Astronomy, University of Waterloo, Waterloo, Ontario
N2L 3G1, Canada  Lindsay Babcock  Department of Physics and Astronomy, Simon
Fraser University, Burnaby, British Columbia V5A 1S6, Canada  Brendon L.
Higgins  Institute for Quantum Computing and Department of Physics and
Astronomy, University of Waterloo, Waterloo, Ontario N2L 3G1, Canada  Hugh
Podmore  Honeywell Aerospace, 303 Terry Fox Dr, Ottawa, Ontario K2K 3J1,
Canada  Thomas Jennewein  Institute for Quantum Computing and Department of
Physics and Astronomy, University of Waterloo, Waterloo, Ontario N2L 3G1,
Canada

###### Abstract

We develop a polarization characterization platform for optical devices in
free-space quantum communications. We demonstrate an imaging polarimeter,
which analyzes both incident polarization states and the angle of incidence,
attached to a six-axis collaborative robot arm, enabling polarization
characterization at any position and direction with consistent precision. We
present a detailed description of each subsystem including the calibration and
polarization-test procedure, and analyze polarization-measurement errors
caused by imperfect orientations of the robot arm using a Mueller-matrix model
of polarimeters at tilt incidence. We perform a proof-of-principle experiment
for an angle-dependent polarization test for a commercial silver-coated mirror
for which the polarization states of the reflected light can be accurately
calculated. Quantitative agreement between the theory and experiment validates
our methodology. We demonstrate the polarization test for a
$20.3\text{\,}\mathrm{cm}$ lens designed for a quantum optical transmitter in
Canada’s Quantum Encryption and Science Satellite (QEYSSat) mission.

##  I Introduction

Over the past decade, a number of experiments have demonstrated quantum
communications to various moving platforms, such as hot-air balloon [1], truck
[2], aircraft [3, 4], and drone [5]. In particular, with achievements in
China’s Quantum Experiments at Space Scale mission [6, 7, 8], quantum
communications using satellites provide a platform for global-scale quantum
key distributions as well as fundamental quantum optics experiments in a
relativistic length scale. Several countries are endeavouring to create
quantum links between ground and space in various scenarios [9, 10]. In
Canada, the Quantum Encryption and Science Satellite (QEYSSat) mission has
been developing a satellite payload and ground stations with the objectives of
long-distance quantum key distributions (QKD) and long-distance quantum
entanglement tests via the exchange of polarized photons in an uplink
configuration [11, 12, 13].

Figure 1: (a) Conceptual design of the polarization characterization system;
ECDL, external cavity diode laser; OI, optical isolator; PMF, polarization-
maintaining fiber. Four linearly polarized states $\hat{\rho}_{\text{in}}$ are
injected into the device under test (DUT) and the polarization states of the
transmitted or reflected light $\hat{\rho}_{\text{out}}$ is examined. The
output beam size and direction varies depending on the type of optics. (b)
Photographs of the robotized polarization-characterization system.

Encoding quantum information in optical polarization is a straightforward and
robust approach to free-space quantum communication, but depends critically on
preservation of high-purity polarized states of light throughout the optical
chain. Degradation of polarization quality necessarily impacts the performance
and any protocol, such as QKD, being attempted. In particular, free-space
communications with moving platforms require specialized photon transceivers
to create efficient quantum channels. The transceivers typically consist of a
large “front-end" telescope (pointed at the other telescope) supported by
small “back-end" optics for multiplexing of quantum light with a strong
beacon, fine-pointing actuation, etc. [1, 3, 12, 13]. The preservation of
polarization states throughout such complex optical terminals is challenging
because some polarization rotations or depolarizations are fundamentally
inevitable and are easily caused by myriad reasons, e.g., stress-induced
birefringence, or thermal expansion of birefringent material. Also, optical
coatings usually cause phase shifts of polarizations, which could lead
depolarizations when the phase shifts are not uniformly applied across the
spatial profile of the incident beam. Moreover, the polarization effect
depends on the geometry of the optical terminal; mere reflection/refraction
changes the polarization state depending on the incident angle. Therefore,
great care must be taken to design optical terminals to preserve the
polarization state and it is essential to ensure polarization is preserved at
the major interfaces, and the effect of any individual component on
polarization is both well understood and verified.

Characterization of the polarization effect of an optical element is performed
by injecting known polarization states and measuring the outcomes. The
polarization testbed must be capable of precise generation and accurate
measurement of polarization states. Especially for devices in free-space
quantum communications, the task must be performed for the optical elements of
small to large sizes which constitute the quantum optical terminals. Moreover,
the polarization state analysis must be attained at the range of orientations
and positions over which the terminal’s components will operate. This is
challenging with commercially available polarimeters because they are
typically optimized for a small field of view (FoV) with a limited beam
aperture, necessitating significant modification of the testbed for each test
optic. As a consequence, most prior works limited their focus, such as on
telescopes [14] or for an entire assembly in an end-to-end manner [15, 16].

Various methods have been developed to characterize polarization effects. For
relatively small optics, the angle-dependent polarization test can be achieved
by ellipsometry-like methods [17, 18, 19]. However, most existing methods are
specialized for non-divergent elements. Large telescopes or mirrors often
require a specialized test platform. One conventional method for polarization
tests on a large telescope, developed for solar observatories, is to build a
similar-sized calibration unit in front of the aperture consisting of arrays
of rectangular foils which transmit linearly polarized light using sunlight as
input [20, 21, 22, 23]. Although fast and simple for outdoor telescopes, such
an approach requires large calibrated optics and is not suitable for component
testing or indoor operation. Futhermore, the approach is designated only for
telescopes—the test setup is not adaptive to other large optical elements such
as lenses and curved mirrors.

Here, we develop a polarization characterization platform for optical devices
in free-space quantum communications which can be used indoors and accommodate
a wide range of front- and back-end optics. The system utilizes a six-axis
collaborative robot arm that moves a polarimeter to analyze the polarization
state of light at desired positions and angles. The robot arm was identified
as the most cost effective solution, as it enables precise motion over a
$0.9\text{\,}\mathrm{m}$ range, with the ability to control the measurement
device in all six degrees of freedom. To show the suitability of our approach
we performed a detailed error analysis on the motional precision of the robot
arm, and furthermore designed the polarimeter monitor the angle of incidence
(AOI) during the polarization test. The system makes it possible to test inch-
sized optics to half-meter-diameter optics (or larger) at consistent accuracy
and exhibits great repeatability. The characterization process is fully
automated, including the robot’s trajectory, data collection and analysis.

This paper is organized as follows. In section II, we describe our
polarization-test setup and the conceptual design for our polarimeter. In
section III, we provide a detailed analysis of the polarimeter with Mueller
matrices as well as our calibration method for the polarimeter. In section IV,
we present our experimental setup and the coordinate alignment procedures for
the robot arm. In section V, we perform a proof-of-principle experiment of the
polarization characterization for a commercially available silver-coated
mirror and a $20.3\text{\,}\mathrm{cm}$ lens custom-designed to support the
QEYSSat mission. The angle-dependent polarization effect of the mirror is
accurately modelled by multilayer thin-film coating calculations, and
comparison of the experimental results with the theoretical predictions
validate the measurement system. Concluding remarks are given in section 6.

##  II Methodology

Figure 2: (a) A schematic diagram for the optical configuration of our
polarimeter; HWP, half-wave plate; QWP, quarter-wave plate. (b) A close up of
the polarimeter attached to the end effector of the robotic manipulator.
Experimental characterization of the polarimeter in terms of (c) the angle of
incidence via centroid measurements, (d) the linearity of the camera exposure
time, and (e) the dynamic range of the optical power measurement. The red and
blue arrows point to the corresponding vertical scale for the maximum and
averaged pixel values.

Figure 1 illustrates the concept of our polarization characterization
platform. We inject several well-defined polarization states into a device
under test (DUT) and perform polarization state tomography on the output
states to see how they change. To match our intended application, we consider
four incident polarization states: $\ket{H}$ (horizontal), $\ket{V}$
(vertical), $\ket{D}$ (diagonal, $45\text{\,}\mathrm{\SIUnitSymbolDegree}$),
and $\ket{A}$ (antidiagonal, $-45\text{\,}\mathrm{\SIUnitSymbolDegree}$). This
is sufficient to determine performance of the system in the context of
BB84-style QKD protocol111To perform full process tomography, such as to
establish Mueller matrices, one could straightforwardly incorporate additional
circularly polarized incident states.. In our system, the light source is an
external cavity diode laser (DLpro, Toptica photonics) operating in
continuous-wave mode at $785\text{\,}\mathrm{nm}$ wavelength, which produces a
stable intensity for the polarization test. The input polarization state is
initially determined by an optical isolator and delivered through a
polarization-maintaining fiber. Upon exiting the fiber, the laser light passes
through a linear-film polarizer (LPVIS100, Thorlabs) with its polarization
axis aligned to the polarization of the incident field to maximize the
transmitted power. The fiber and the polarizer are mounted on a motorized
rotation stage (PR50PP, Newport) which rotates both elements altogether to
define each of the four input polarization states in turn with accuracy of
$\pm$$0.025\text{\,}\mathrm{\SIUnitSymbolDegree}$. Once the light exits the
test optic, it reaches a polarimeter which is attached to a six-joint robotic
manipulator (AUBO-i5, AUBO Robotics). The robotic manipulator moves the
polarimeter to measure the output polarization state at the desired positions
and angles.

Our robotic manipulator is driven by six geared servo-motors with absolute
encoders at all joints. This robot has a reach of $0.924\text{\,}\mathrm{m}$,
which can easily scan over the entire trajectory around the optics being
tested. According to the manufacturer’s specifications, the robot has position
repeatability of $0.02\text{\,}\mathrm{mm}$ and position accuracy of
$2\text{\,}\mathrm{mm}$. The average orientation repeatability and accuracy
are $0.004\text{\,}\mathrm{\SIUnitSymbolDegree}$ and
$0.5\text{\,}\mathrm{\SIUnitSymbolDegree}$, respectively. A pre-programmed
teaching pendant supports manual control by the touch-screen tablet interface,
and the C++ SDK allows us to remotely control the robot arm.

Figure 2(a) shows the schematic diagram of the polarimeter. It consists of a
quarter- and half-wave plate (QWP and HWP), a Wollaston polarizer (68-823,
Edmund Optics), a convex lens ($f=$$30\text{\,}\mathrm{mm}$, 49-115, Edmund
Optics), and a CMOS camera (pco.panda.4.2, PCO). The two waveplates are
mounted on motorized rotation stages (PR50PP, Newport) while the principal
axis of the Wollaston polarizer is fixed in our polarimeter. The two
waveplates and polarizer project the incident polarization state onto six
tomographically complete polarization states ($\ket{H}$, $\ket{V}$, $\ket{D}$,
$\ket{A}$, $\ket{R}$ right-circular, and $\ket{L}$ left-circular). The
projected states are converted to the intensity distributions at the output
port of the Wollaston polarizer. A convex lens is placed after the polarizer
such that the far-field image of the intensity distribution is mapped on the
focal plane where the CMOS imaging sensor is placed. The size of our imaging
sensor is $13.3\times 13.3$${\mathrm{mm}}^{2}$ and includes $2048\times 2048$
pixels of size $6.5\times 6.5$${\mathrm{\SIUnitSymbolMicro m}}^{2}$. In this
way, the variation of the AOI appears as the translation of the intensity
distribution by $\Delta x_{e(o)}$ and $\Delta y_{e(o)}$ which can be precisely
measured from image pixel values $N$ by sub-pixel centroid algorithms [25].

We consider the variation of the AOI that mainly comes from the imperfect
orientation of the robotic end effector which is defined by three rotation
angles ($\alpha$,$\beta$,$\gamma$) around the three orthogonal axes
($x$,$y$,$z$), as shown in Figure 2(a). The angular deviation under
consideration is on the order of $0.5\text{\,}\mathrm{\SIUnitSymbolDegree}$
and aberrations of the imaging lens are neglected. As the split angle between
the ordinary and extraordinary light exiting the polarizer depends on its tilt
angle [26], we calculate the central point of the two centroids $\Delta
x=(\Delta x_{e}+\Delta x_{o})/2$ and $\Delta y=(\Delta y_{e}+\Delta y_{o})/2$
to cancel such effect. Thus, under the paraxial approximation for the lens,
the centroid shifts $\Delta x$ and $\Delta y$ are related to the AOI by the
formula

$\displaystyle\centering\Delta x\@add@centering$ $\displaystyle=f\tan\beta$
(1) $\displaystyle\Delta y$ $\displaystyle=f\tan\alpha.$ (2)

Note that the $\gamma$ rotation is not directly detected by measuring the
shift of the intensity distribution as it rather appears as the variation of
the intensity values because the polarizer and the camera are rotated
altogether.

Although the usage of the camera provides accurate estimation of the AOI, one
major drawback of such an imaging polarimeter is the limited dynamic range of
optical power measurements with the camera. The issue becomes significant
especially when the polarization measurement basis is aligned to the incident
polarization axis. For example, our camera exhibits dynamic range of 21,500:1,
an order of magnitude smaller than the extinction ratio of the Wollaston
polarizer (200,000:1). The signal-to-noise ratio (SNR) of the captured images
directly impacts the precision of measuring polarization states. For a given
camera with its quantum efficiency $\eta$ and the exposure time $\Delta T$,
the SNR is given by

$\text{SNR}=\frac{P\eta\Delta
T}{\sqrt{N_{\text{shot}}^{2}+I_{\text{dark}}\Delta
T+N_{\text{readout}}^{2}}},$ (3)

where $P$ is the optical power of the incident light,
$N_{\text{shot}}=\sqrt{P\eta\Delta T}$ is the shot noise, $I_{\text{dark}}$ is
the dark current, and $N_{\text{readout}}$ is the readout noise. For
sufficient optical incident power and long exposure time $\Delta T$, the SNR
is mainly determined by shot noise. For a given waveplate setting, we capture
two images and adjust the exposure time before each image acquisition to
measure the optical power of ordinary and extraordinary fields separately with
acceptable SNR. The optical power detected by a pixel at $i$-th row and $j$-th
column of the imaging sensor is obtained by the measured pixel value $N_{ij}$
divided by the exposure time $\Delta T$. The total incident power
$P_{\text{meas}}$ is then estimated by averaging the power value over a region
surrounding the focal spot of the incident field as

$P_{\text{meas}}=\frac{1}{\Delta
T}\bigg{[}\sum_{i,j=1}^{n}\frac{N_{ij}}{n}-\sum_{i,j=1}^{m}\frac{N_{ij}}{m}\bigg{]}.$
(4)

Here, we subtracted background noise to calculate the net power values. The
background noise is estimated by the averaged power over the outside of the
bright region. $n$ and $m$ are the number of pixels used to estimate incident
power values and background noises, respectively. We determine the measured
polarization states by evaluating for each Stokes vector
$\vec{S}=[S_{0},S_{1},S_{2},S_{3}]^{\top}$, where $S_{0}$ is the total power
of the incident light, $S_{1}$ denotes the bias for $\ket{H}$ and $\ket{V}$,
$S_{2}$ for $\ket{D}$ and $\ket{A}$, and $S_{3}$ for $\ket{R}$ and $\ket{L}$.

We characterized our polarimeter in terms of the accuracy of the centroid and
power measurement as well as the dynamic range. First, we mounted the
polarimeter on the robotic manipulator, injected laser light in a fixed
propagation direction, and measured the centroids $\Delta x$ and $\Delta y$ as
a function of the rotation $\beta$ which are then converted to the AOI via Eq.
1. The slope is estimated to be nearly unity in $x$–axis via least-square
fitting with $0.6\text{\,}\mathrm{\char 37\relax}$ standard error of the
regression, indicating accurate AOI measurement, as shown in Figure 2(c).
Secondly, with a constant incident optical power, we recorded the maximum
pixel values as a function of the camera exposure time to ensure linearity of
the exposure time control, as shown in Figure 2(d). The slope is estimated by
the same fitting method, and the relative uncertainty of the power measurement
is estimated to be around $1\text{\,}\mathrm{\char 37\relax}$. Finally, the
dynamic range is characterized by varying the incident power. We varied the
incident optical power while allowing automated control of the camera exposure
time to maintain a constant SNR over the range of incident power, as shown in
Figure 2(e). The optical power was measured over a range of three orders of
magnitude while maintaining SNR greater than 200 by adjusting the exposure
time between $0.2\text{\,}\mathrm{ms}$ and $500\text{\,}\mathrm{ms}$. With our
camera capable of exposure times of
$0.01\text{\,}\mathrm{ms}5000\text{\,}\mathrm{ms}$, we expect that a dynamic
range of $100,000:1$ can be readily achieved.

##  III Polarimeter model, error analysis, and calibration

In this section, we model our polarimeter with Mueller matrices and analyze
polarization measurement errors caused by the imperfect robotic movement as
well as manufacturing imperfections of optical components being used. We
assume that the error of translating the polarimeter impacts negligibly on the
polarization measurement, while the imperfect orientation of the polarimeter
is modelled by the the tilted waveplates and the polarization axis
misalignment.

###  III.1 Polarimeter model

Our imaging polarimeter is modelled by the Mueller matrices of the polarizer
$\mathbf{M}_{\text{P}}$ and waveplates $\mathbf{M}_{\text{W}}$ as

$\mathbf{M}(\theta_{P},\theta_{H},\theta_{Q};\phi_{H},\phi_{Q})=\mathbf{M}_{\text{P}}(\theta_{P})\mathbf{M}_{\text{W}}(\theta_{H};\phi_{H})\mathbf{M}_{\text{W}}(\theta_{Q};\phi_{Q}).$
(5)

The polarizer and waveplates are parametrized by the azimuthal rotation angle
$\theta$ and phase retardance $\phi$:

$\begin{split}\mathbf{M}_{\text{W}}(\theta;\phi)&=\begin{bmatrix}1&0&0&0\\\
0&C^{2}+S^{2}\cos\phi&CS(1-\cos\phi)&-S\sin\phi\\\
0&CS(1-\cos\phi)&C^{2}\cos\phi+S^{2}&C\sin\phi\\\
0&S\sin\phi&-C\sin\phi&\cos\phi\\\ \end{bmatrix},\\\
\mathbf{M}_{\text{P}}(\theta)&=\begin{bmatrix}1&C&S&0\\\ C&C^{2}&CS&0\\\
S&CS&S^{2}&0\\\ 0&0&0&0\\\ \end{bmatrix}.\end{split}$ (6)

Here, $C$ and $S$ are $\cos(2\theta)$ and $\sin(2\theta)$, respectively. With
$\mathbf{M}_{\text{P}}$ we assume the Wollaston polarizer differs negligibly
from perfectly polarizing. Ideally, the phase retardances of the HWP and QWP
are $\phi_{H}=\pi$ and $\phi_{Q}=\pi/2$, respectively. We model the
polarization extinction between extraordinary and ordinary paths of the
Wollaston polarizer by the rotation of the polarizer
$\theta_{P}\in\\{$0\text{\,}\mathrm{\SIUnitSymbolDegree}$,$90\text{\,}\mathrm{\SIUnitSymbolDegree}$\\}$.
Also, for complete tomography, the rotation angle of the waveplates are in
corresponding pairs of
$\theta_{H,Q}\in\\{(0$\mathrm{\SIUnitSymbolDegree}$,0$\mathrm{\SIUnitSymbolDegree}$),(22.5$\mathrm{\SIUnitSymbolDegree}$,45$\mathrm{\SIUnitSymbolDegree}$),(0$\mathrm{\SIUnitSymbolDegree}$,45$\mathrm{\SIUnitSymbolDegree}$)\\}$.
The optical power for each combination of the rotation angles can be
calculated by multiplying the first row of the Mueller matrix
$\vec{M}=[M_{00},M_{01},M_{02},M_{03}]^{\top}$ to the incident Stokes
parameter $\vec{S}_{\text{in}}$. As we have three rotation angle settings of
the waveplates and two ports of the polarizer, the six power measurements can
be described by the $6\times 4$ matrix
$\mathbf{A}=[\vec{M}^{(H)},\vec{M}^{(V)},\vec{M}^{(D)},\vec{M}^{(A)},\vec{M}^{(R)},\vec{M}^{(L)}]^{\top}$
called an instrument matrix. Here, the superscript $(i)$ represents each
configuration of the polarimeter settings for the power measurements in the
horizontal, vertical, diagonal, anti-diagonal, right-circular, and left-
circular polarization-basis states. Then, the six power values $\vec{P}$ for
the input polarization state can be written as

$\vec{P}_{\text{meas}}=\mathbf{A}\cdot\vec{S}_{\text{in}}+P_{d},$ (7)

where we added a constant value $P_{d}$ for randomly fluctuating power noises
from the camera including the dark current, shot noise, and stray light. Then,
the Stokes vector $\vec{S}_{\text{meas}}=\mathbf{W}\cdot\vec{P}_{\text{meas}}$
is obtained from the measured power vector $\vec{P}$ multiplied by the
pseudoinverse of the instrument matrix called a data reduction matrix
$\mathbf{W}=(\mathbf{A}^{\top}\cdot\mathbf{A})^{-1}\cdot\mathbf{A}^{\top}$.
The obtained Stokes vector is used to reconstruct the density matrix
$\hat{\rho}_{\text{out}}$ of the measured polarization state:

$\hat{\rho}_{\text{out}}=\frac{1}{2}\bigg{[}\hat{\mathbb{1}}+\frac{S_{1}}{S_{0}}\hat{\sigma_{z}}+\frac{S_{2}}{S_{0}}\hat{\sigma_{x}}+\frac{S_{3}}{S_{0}}\hat{\sigma_{y}}\bigg{]},$
(8)

where $\hat{\mathbb{1}}$ is the $2\times 2$ identity matrix.

###  III.2 Polarization-measurement error analysis

Based on the above model, we study how orientation of the robot’s end effector
($\alpha$, $\beta$, $\gamma$) changes the reconstructed density matrix
$\hat{\rho}_{\text{out}}$. First, it is obvious that the $\gamma$ rotation
causes misalignment of the incident polarization state with respect to the
principal axes of the waveplates and the polarizer, as depicted in Figure
2(a). This can be modelled by equally adding the robot’s rotation angle
$\gamma$ to the azimuthal angles as the waveplates and polarizer rotate
altogether: $\theta_{P(Q,H)}\rightarrow\theta_{P(Q,H)}+\gamma$. The $\alpha$
and $\beta$ rotations are related to the tilt angle of the waveplates
$\psi=\cos^{-1}\big{(}\cos(\alpha)\cos(\beta)\big{)}$. The phase retardance of
the waveplates for a given tilt angle $\psi$ and azimuthal rotation angle
$\theta$ is expressed in a closed form [19]

$\begin{split}\phi(\theta,\psi)&=\frac{2\pi}{\lambda}d\biggl{(}\sqrt{n_{e}^{2}-\frac{n_{e}^{2}\cos^{2}(\theta)+n_{o}^{2}\sin^{2}(\theta)}{n_{o}^{2}}\sin^{2}(\psi)}\\\
&-\sqrt{n_{o}^{2}-\sin^{2}(\psi)}\biggr{)},\end{split}$ (9)

where $\lambda$ is the wavelength of the incident light, $d$ is the thickness
of the waveplate, and $n_{o}$ and $n_{e}$ are the ordinary and extraordinary
refractive indices, respectively. Here we considered a single-crystal
waveplate for simplicity.

Figure 3: Quantum state fidelity between the measured state by tilted
polarimeters and the input state. The fidelity is calculated by our
theoretical model for four linearly polarized states as a function of (a) the
tilt-angle $\psi$ and (b) the rotation-angle $\gamma$. (c)–(d) three-
dimensional plot for the calculated fidelity.

We evaluated the quantum state fidelity of the reconstructed density matrix in
Eq. 8 for the four linear input polarizations as a function of the rotation
angle $\gamma$ and the tilt angle $\psi$, as shown in Figure 3. In our
calculation, we modelled the ideal MgF2 single-crystal zeroth-order QWP and
HWP operating at a wavelength of $785\text{\,}\mathrm{nm}$: $d_{H}$ =
$33.6\text{\,}\mathrm{\SIUnitSymbolMicro m}$, $d_{Q}$ =
$16.8\text{\,}\mathrm{\SIUnitSymbolMicro m}$, $n_{e}$ = 1.3869, and $n_{o}$ =
1.3752. We found that the fidelity is degraded mainly due to the $\gamma$
rotation and it scales quadratically, whereas the effect for the $\psi$
rotation is relatively negligible.

###  III.3 Polarimeter calibration

Figure 4: Experimental results of calibrating the polarimeter. Optical powers
are measured under the rotation of half- and quarter-wave plates. The incident
light is horizontally polarized. The circles show the mean values of twenty
power measurements of the ordinary and extraordinary light. The solid curves
are fits to the model, and the shaded regions represent the
$95\text{\,}\mathrm{\char 37\relax}$ confidence interval for the fitting
curve. Top: the half-waveplate (HWP) is rotated without the presence of QWP.
Middle: the QWP is rotated while the HWP is aligned to the horizontal
polarization axis. Bottom: the HWP is rotated while the QWP is oriented at
$45\text{\,}\mathrm{\SIUnitSymbolDegree}$ with respect to the incident
polarization direction.

We calibrate our polarimeter by a conventional method [27] to obtain the
instrument matrix including the manufacturing imperfections of the HWP and QWP
as well as any other systematic error such as the waveplate misalignment. We
aligned the waveplates and the polarizer by using a visible laser field at
$532\text{\,}\mathrm{nm}$ wavelength such that the reflected field is
overlapped with the incident field, ensuring that the surface normal vector is
parallel to the incidence direction of the laser field. We then injected a
horizontally polarized input state at $785\text{\,}\mathrm{nm}$ wavelength,
and recorded the optical powers of the ordinary and extraordinary rays of the
polarizer as a function of the rotation angle of the waveplates in three
different configurations, as shown in Figure 4. First, we rotated the HWP
without the QWP to find the angle for the principal axis of the HWP (top).
Then, we rotated the QWP while the axis of the HWP has aligned to the incident
horizontal polarization (middle). Finally, we rotated the HWP through
$360\text{\,}\mathrm{\SIUnitSymbolDegree}$ while the optic axis of the QWP was
rotated by $45\text{\,}\mathrm{\SIUnitSymbolDegree}$ with respect to the
incident polarization direction (bottom). Data were collected at
$5\text{\,}\mathrm{\SIUnitSymbolDegree}$ increments. For each waveplate
setting, we captured twenty frames of images to calculate the mean values and
standard deviations of the optical power for the ordinary and extraordinary
rays of the Wollaston polarizer. Also, we maintained SNR greater than two
hundred via auto-exposure time control. We found that the errors in the power
measurement are mainly attributed to the background noises in the camera,
e.g., dark current and readout noise.

To determine the phase retardance $\phi_{H,Q}$ and misalignment
$\theta_{H0,Q0}$ of the waveplates, we used a least-squares fit of the 438
measured power values to our polarimeter model in Eq. 7 with fitting
parameters
$\\{\phi_{H},\phi_{Q},\delta\theta,\theta_{H0},\theta_{Q0},P_{d},P_{e},P_{o}\\}$,
as shown in Figure 4. Here, $\theta_{H0}$ and $\theta_{Q0}$ are the azimuthal
angles of the HWP and QWP where their optic axes are aligned to the horizontal
polarization. $\delta\theta$ is the azimuthal rotation error between the HWP
and QWP due to potential offsets of the two rotation stages. We noticed that
the power-measurement efficiencies were slighly different at the two
orthogonal basis states; $P_{e(o)}$ quantifies these differential incident
optical powers. The difference may be attributed to polarization-dependent
quantum efficiency of the camera or imbalanced transmission of the Wollaston
polarizer. The fit parameters are
$\\{\phi_{H}=3.1872$\mathrm{rad}$,\phi_{Q}=1.6292$\mathrm{rad}$,\delta\theta=-0.0137$\mathrm{rad}$,P_{d}=4.6423\times
10^{-6},P_{0,T}=2.6829,P_{0,R}=2.6741\\}$. The $95\text{\,}\mathrm{\char
37\relax}$ confidence intervals for $\phi_{H}$, $\phi_{Q}$, and $\delta\theta$
are less than $1.0\text{\times}{10}^{-4}\text{\,}\mathrm{rad}$. The corrected
instrument matrix is

$\mathbf{A}_{\text{C}}=\begin{bmatrix}0.5000(0)&0.5000(0)&0.0000(1)&0.0000(3)\\\
0.5000(0)&-0.5000(0)&0.0000(1)&0.0000(3)\\\
0.5000(0)&-0.0032(1)&0.5006(0)&-0.0124(3)\\\
0.5000(0)&-0.0032(1)&-0.5006(0)&0.0124(3)\\\
0.5000(0)&0.0296(0)&0.0129(3)&-0.4990(0)\\\
0.5000(0)&-0.0296(0)&-0.0129(3)&0.4990(0)\\\ \end{bmatrix}.$ (10)

To test repeatability, we performed the calibration process five times after
repositioning the robot arms from different initial poses: the relative
variation of the extracted phase-retardance was measured to be less than
$0.2\text{\,}\mathrm{\char 37\relax}$. We repeatedly observed that the
theoretical curve is deviated from the measured data, as shown in the bottom
plot of the Figure 4. Though the discrepancy is small, its origin is presently
not understood.

We performed Monte-Carlo analysis to estimate the total polarization
measurement uncertainty including both phase-retardance error of the
waveplates and motion-induced polarization error, incorporating the measured
values of $\phi_{H}$ and $\phi_{Q}$. We adjusted the thickness of the
waveplates to match the phase retardance to the experimentally obtained values
($\phi_{H}=3.1872$\mathrm{rad}$$ and $\phi_{Q}=1.6292$\mathrm{rad}$$). We
sampled one hundred thousand uniformly distributed random values for the robot
arm’s orientation error from $\alpha,\beta,\gamma\in$
(-$1\text{\,}\mathrm{\SIUnitSymbolDegree}$,+$1\text{\,}\mathrm{\SIUnitSymbolDegree}$)
and obtained root-mean-square quantum state fidelity deviation and QBER of
$0.01\text{\,}\mathrm{\char 37\relax}$ and $0.05\text{\,}\mathrm{\char
37\relax}$, respectively.

Figure 5: A schematic diagram of the experiment setup for (a) the angle-
dependent polarization charaterization of the reflective optics and (b) the
characterization of a large lens with the fixed angle of incidence. (c) Three
coordinate systems of the robot arm: base, end, and user-defined coordinates.
An example method of the user-defined coordinate calibration is illustrated.
Three points, one at the origin \raisebox{-.9pt} {\small1}⃝, another on the
z-axis \raisebox{-.9pt} {\small2}⃝, and the other on the xz-plane
\raisebox{-.9pt} {\small3}⃝, define a user-defined coordinate system. The
detailed description of the test procedure is presented in the main text.

##  IV Experimental setup

We perform a proof-of-principle demonstration of the polarization
characterization for a commercial off-the-shelf mirror and a
$20.3\text{\,}\mathrm{cm}$ custom-designed lens. For the mirror, we measure
the output polarization states as a function of the reflection angle by
rotating the test optic with a fixed incident beam direction. The robot arm
moves the polarimeter to track the reflected light from the test optic, and
the tomographic measurement is performed at each incident angle, as depicted
in Figure 5(a). For the large lens, we placed an optical fiber at the focal
position which produces diverging light with well-defined polarization states.
We precisely adjusted the position and angle of the fiber while monitoring the
wavefront of the transmitted field by using our aberration characterization
system [28]. The incidence direction of the light was aligned to the principal
axis of the lens and the divergence angle of the transmitted light was
measured to be less than $\pm$$10\text{\,}\mathrm{\SIUnitSymbolMicro rad}$. We
added a $20\text{\,}\mathrm{cm}$–diameter mask in front of the lens to block
stray light because the numerical aperture of the fiber used in the experiment
was larger than the lens. The robot arm moves the polarimeter in the
transverse direction (as in a raster scan) to perform the tomographic
measurement across the entire output beam, as shown in Figure 5(b). Then, the
quality parameters, e.g., fidelity and purity, were calculated at each
position, and the overall quality of polarization maintenance was derived by
the median value over the whole aperture.

The robotic manipulator has two pre-set coordinate systems: base coordinates
and end coordinates, and the option to set a user-defined coordinate system,
as shown in Figure 5(c). The base and end coordinate is referenced to the
absolute position $\\{x,y,z\\}$ and the orientation
$\\{\alpha,\beta,\gamma\\}$ of the end effector, respectively. These six
parameters and the six joint angles can be transformed to each other via
forward and inverse kinematics. For testing purposes, it is convenient to
define the robot’s trajectory in a coordinate whose one axis is parallel to
the light propagation direction, which was chosen to be the z-axis. The
accurate alignment of this coordinate system is essential to ensure the
polarimeter follows the desired path of scanning across the test optic.
Following is an example of the procedure to determine the user-defined
coordinate.

The three orthonormal bases required to specify a user-defined coordinate
system can be determined by three points (assuming a right-handed system), as
shown in Figure 5(c); one point at the origin \raisebox{-.9pt} {\small1}⃝,
another point along the z-axis \raisebox{-.9pt} {\small2}⃝, and a final point
anywhere on the xz-plane \raisebox{-.9pt} {\small3}⃝. We placed two pairs of
two pinholes at the same height on the optical table. The four pinholes define
two lines parallel to the surface of the optical table. We shined collimated
diode laser light through the pinhole pairs to the polarimeter on the end
effector of the robot arm. With one pair of pinholes, we manually centered
image spot centroids using the robot teach pendant, setting the aligned
position as the origin point. The polarimeter was then moved further away from
the table and aligned to the laser light to define the point along the z-axis.
Finally, the polarimeter was aligned to the second set of pinholes and the
position recorded as a point on the xz-plane. In this way, the orientation of
the end effector is aligned such that the polarimeter faces the incident beam,
and thus the angles $\alpha$ and $\beta$ are inherently calibrated. The angle
$\gamma$ is defined by the incident horizontal polarization axis, and the
calibrated polarimeter is oriented such that the power measured at the
vertical polarization state is minimized.

Figure 6: Experimental results from angle-dependent polarization
characterization of the protected silver-coated mirror: (a) variation of AOI
and (b) fidelities and purity of the measured states for incident horizontal
$|H\rangle$, vertical $|V\rangle$, diagonal $|D\rangle$, and anti-diagonal
$|A\rangle$ states. Circles show the measured data and solid black lines
indicate theoretical predictions based on multilayer thin-film coating
calculations.

##  V Results

###  V.1 Commercial off-the-shelf silver-coated mirror

We measured the polarization states of the reflected light from a
$10\text{\,}\mathrm{cm}$–diameter protected silver-coated mirror (48-118-557,
Edmund Optics) as a function of the reflection angle. Collimated light with
$4\text{\,}\mathrm{mm}$ $1/e^{2}$ beam diameter was sent to the center of the
mirror. The horizontal and vertical states of the input polarizations were
aligned to p- and s-polarizations of the mirror, respectively. We rotated the
mirror to vary the reflection angle from
$5\text{\,}\mathrm{\SIUnitSymbolDegree}52.5\text{\,}\mathrm{\SIUnitSymbolDegree}$,
and the robot arm follows the reflected beam in an arced path. The trajectory
was defined by the measured radius from the center of the mirror to the center
of the end effector with a laser-distance measurer. At each angle, twenty
frames were captured to calculate the mean and standard deviation of the
measured powers and centroids while maintaining SNR above one hundred. The
full scan of the polarization test was repeated four times for statistical
certainty.

Figure 6(a) shows the variation of the AOI to the polarimeter during the test.
AOI variation was maintained within
$\pm$$0.2\text{\,}\mathrm{\SIUnitSymbolDegree}$, indicating good coordinate
alignment and excellent repeatability. As shown in Figure 6(b), the averaged
purity and fidelity for horizontal and vertical input polarization states are
maintained above $99\text{\,}\mathrm{\char 37\relax}$ over the entire
reflection angle range, indicating good alignment of horizontal and vertical
polarization states to the s- and p-polarizations of the mirror.

The polarization-dependent reflectivity of the protected silver mirror can be
accurately calculated by multilayer coating calculations [29]. It is expected
that the comparison between experimental data and theoretical prediction
validates our methodology, i.e., the usage of robot arm to move the
polarimeter for angle-dependent polarization characterization. We modelled the
protected silver film with a $92\text{\,}\mathrm{nm}$–thick SiO2 layer coated
on top of a $1\text{\,}\mathrm{\SIUnitSymbolMicro m}$-thick silver layer. The
transmissive and reflective coefficients of the s- and p-polarizations were
calculated by a conventional optical admittance method [30]. The coefficients
were then used to obtain the polarization states of reflected light. In Figure
6(b), black lines indicate theoretical values of fidelity and purity as a
function of reflection angle. We characterize a closeness between theory and
experiment by the standard error of regression
$\text{SER}=\sqrt{\sum_{i=1}^{n}(y_{i}-f(x_{i}))^{2}/\left(n-k\right)}$ with
$k$ denoting the number of free parameters for the theoretical model. In our
case, we consider the thickness of SiO2 and silver layer as free parameters,
and thus $k=2$. Here, $y_{i}$ and $f(x_{i})$ are the measured and
theoretically prediected values, respectively. We calculated SER of fidelity
being better than $0.4\text{\,}\mathrm{\char 37\relax}$ for all four input
polarization states, showing the excellent agreement between theory and
experiment.

In our experiment, the density matrices of measured polarization states are
reconstructed by calculating the Stokes vector that is normalized by the total
intensity averaged over three different polarization measurement bases. As we
used collimated light with beam diameter of $4\text{\,}\mathrm{mm}$ and set
the pin-hole size to be $2\text{\,}\mathrm{mm}$, any positional instability
while rotating the waveplates causes total intensity variation. This effect
may yield unphysical quantum states whose purity is greater than unity, as
seen in Figure 6(b). This issue can be resolved by either larger pinhole size
or other alternative tomographic reconstructions such as the maximum
likelihood estimation.

Figure 7: Experimental results from polarization test of the large convex
lens: (a) variation of AOI and (b) color maps of fidelity and purity of the
measured states for incident horizontal $|H\rangle$, vertical $|V\rangle$,
diagonal $|D\rangle$, and anti-diagonal $|A\rangle$ states.

###  V.2 Large custom-designed lens

We designed a $20.3\text{\,}\mathrm{cm}$ cemented doublet with
$243.8\text{\,}\mathrm{cm}$ effective focal length. The lens was manufactured
by Hyperion Optics with H-LAF2 and H-ZF5 materials. The size of the lens and
the design specifications were determined by quantum link-budget analysis and
the impact of the optical aberrations as well as the atmospheric turbulence.
Each surface was coated with six layers of Ta2O5 and SiO2 to keep reflectivity
below $0.5\text{\,}\mathrm{\char 37\relax}$ at $780\text{\,}\mathrm{nm}$,
$980\text{\,}\mathrm{nm}$, and $1550\text{\,}\mathrm{nm}$ wavelengths.

In our polarization characterization of the doublet, we pixelized the
transverse mode profile of the transmitted light with an even $15\times 15$
grid. The robot arm scans through all 225 positions at a given input
polarization, and the 2-dimensional scan was repeated for all four different
input polarization states. During the scan, the polarization measurement is
skipped at the position where the incident light is too weak to be detected
with the exposure time greater than $100\text{\,}\mathrm{ms}$. The sampling
size of light during this scan is limited by the iris aperture of
$3\text{\,}\mathrm{m}\mathrm{m}$. Since all power measurements at six
orthogonal polarization bases are performed at one position and then the robot
moves the polarimeter to the next position, the median and quartiles of the
quality parameters, i.e., fidelity, purity, and QBER, over the measured area
includes the position and orientation error of the robot arm.

Table 1: Median values of the fidelity, purity, and QBER for the transmitted polarization states from the $20.3\text{\,}\mathrm{cm}$ custom-designed len. Lower and upper quartiles are listed in parantheses. Input state | Fidelity (%) | Purity (%) | QBER (%) |
---|---|---|---|---
$\ket{H}$ | 99.60 | 99.59 | 0.40 |
(99.01,99.73) | (99.53,99.70) | (0.27,0.99) |
$\ket{V}$ | 99.68 | 99.79 | 0.32 |
(99.03,99.84) | (99.44,100.00) | (0.16,0.97) |
$\ket{D}$ | 99.55 | 99.50 | 0.35 |
(98.99,99.70) | (99.38,99.56) | (0.19,0.97) |
$\ket{A}$ | 99.52 | 99.42 | 0.42 |
(98.97,99.68) | (99.27,99.51) | (0.28,1.01) |

Figure 7(a) shows the variation of measured AOI during the polarization test.
It was observed that the AOI to the polarimeter was maintained within
$\pm$$0.5\text{\,}\mathrm{\SIUnitSymbolDegree}$. The measured purity and
fidelity are presented in the color maps shown in Figure 7(b). Histograms of
the measured values indicate the uniformity of transmitted polarization states
across the aperture. QBERs for the four incident polarization states were
directly calculated from the raw power measurements. The median and quartiles
of the three quality parameters, i.e., fidelity, purity, and QBER, are listed
in Table 1. The outcome of this test shows great polarization maintenance as
the typical fidelities for all four input states are greater than
$99.5\text{\,}\mathrm{\char 37\relax}$. The acceptable QBER for ground-to-
satellite QKD links[31] is order of $1\text{\,}\mathrm{\char 37\relax}$, and
our promising result shows that the lens is suitable for free-space QKD
experiments.

It is worth noting that the high-fidelity region shows a “cross-mark" feature
on the color maps. This feature seemingly depends on the input polarization
states; plus–sign in horizontal and vertical state and X–shape in the diagonal
and anti-diagonal input states. In our setup, the input polarization states
are defined by the rotation of the polarizer and the fiber together, and the
high fidelity region is correlated to this rotation angle, indicating that the
high- and low-fidelity region may not be attributed to the quality of the test
optic, but rather by the uniformity of the input polarization state across the
lens aperture. The reason for the imperfect state preparation with the
polarized diverging beam will be further investigated. The full
characterization for the instrumental polarization of the lens can be
performed by directly characterizing the input states with the same
polarimeter and comparing the results as in Mueller-matrix polarimetries [32].

The precision of our imaging polarimeter is mainly limited by the dynamic
range and noise of the camera being used. This is indicated by the
interquartile range of the measured QBERs that are greater than the median
values. Also, note that the linearity of the camera’s exposure time showed
uncertainty from $0.1\text{\,}\mathrm{\char 37\relax}1.6\text{\,}\mathrm{\char
37\relax}$. Since our AOI measurements verified the reliable control of the
position and orientation of the polarimeter, the replacement of the camera
with two photomultiplier-tube (PMT) modules may be considered in future to
improve polarization measurement precision [33]. Indeed, we replaced our
imaging polarimeter with a conventional division-of-amplitude polarimeter
consisting of the HWP, QWP, polarized beam splitter, and two balanced power
meters for the polarization characterization of a prototype telescope for the
QEYSSat payload [13]. Across the four input polarization states, the measured
QBER in that test was less than $0.05\text{\,}\mathrm{\char 37\relax}$. The
QBER can be translated to the polarization extinction ratio greater than
$33\text{\,}\mathrm{dB}$ which is comparable with the polarization-test
results of the telescope [14] and optical terminal for the Micius satellite
[15, 16].

##  VI Conclusion

We developed a robotized polarization characterization platform for optical
devices in free-space quantum communications. Our system can easily be
adjusted for performing polarization tests on diverse reflective or refractive
optical systems with a wide range of aperture sizes (up to 30 cm), and either
curved or flat surfaces at consistently high precision. The measurement
apparatus can be readily set up in outdoor and used for deployed systems. The
characterization process is fully automated once the robot’s coordinate system
is calibrated. Our imaging polarimeter is capable of monitoring the variation
of incident angle, and the tilt error of the polarimeter due to the robot’s
motion can be detected. This feature could be used for implementing a feedback
mechanism to correct the polarimeter’s position and orientation in the future.
We presented our theoretical analysis of the polarization measurement error
caused by the tilt and rotation of the polarimeter, and showed that the
misalignment of the polarization axis due to the azimuthal rotation is a
dominant measurement error. This rotation error could be detected and
compensated by injecting more incident states to fully characterize the change
of the polarizations, as in conventional Mueller-matrix polarimetries. It is
worth noting that the input polarization states can be directly characterized
in our system, and therefore the precision of the polarization
characterization of the test optic is limited by the measurement device.

We performed a proof-of-principle experiment for the polarization
characterization of two different optical components. First, a commercial
silver-coated mirror was characterized as a function of the reflection angle.
The polarization states of the reflected light were theoretically calculated,
and the excellent agreement between the theory and the test results validated
our method of moving polarimeter in a pre-determined path with an industrial
robotic manipulator. Secondly, the polarization characterization of our
custom-designed lens for the QEYSSat mission showed a good polarization
preservation across the full aperture. The quality parameters provided a lower
bound of the performance of the test optic which includes imperfection of
input state preparation. The typical QBER was estimated to be
$0.37\text{\,}\mathrm{\char 37\relax}$ and the fidelity was greater than
$99.5\text{\,}\mathrm{\char 37\relax}$. In both experiments, the angle of
incidence to the polarimeter remained within
$\pm$$0.5\text{\,}\mathrm{\SIUnitSymbolDegree}$, which showed the reliable
control of the polarimeter’s position and orientation using the robot arm.

Our polarization characterization clearly demonstrates the viability of using
an industrial robotic manipulator to study large optical components and
systems. Our theoretical model and experimental demonstration showed that the
motional precision achieved is sufficient to draw robust conclusions from the
optical measurements. We believe that our robotized polarization
characterization platform could therefore also support the development of
free-space optical components or terminals for a broad range of applications
including laser communications, lidars, and astronomical observatories.
Furthermore, recent developments of polarization imaging cameras could be
directly used in our robotized polarization measurement scheme for automation
of characterizing other physical properties such as stress measurements and
bio-imaging applications [34].

## Acknowledgement

Y.S.L acknowledges support from the Mike and Ophelia Lazaridis Fellowship
Program. This research was supported in part by the Canadian Space Agency;
Canada Foundation for Innovation (25403, 30833); Ontario Research Foundation
(098, RE08-051); Canadian Institute for Advanced Research; Natural Sciences
and Engineering Research Council of Canada (RGPIN-386329-2010); Industry
Canada.

## Author Declarations

###  VI.1 Conflict of interest

The authors have no conflicts to disclose.

## Data availability

The data that support the findings of this study are available from the
corresponding author upon reasonable request.

## References

  * Wang  _et al._ [2013] J.-Y. Wang, B. Yang, S.-K. Liao, L. Zhang, Q. Shen, X.-F. Hu, J.-C. Wu, S.-J. Yang, H. Jiang, Y.-L. Tang, B. Zhong, H. Liang, W.-Y. Liu, Y.-u. Hu, Y.-M. Huang, B. Qi, J.-G. Ren, G.-S. Pan, J. Yin, J.-J. Jia, Y.-A. Chen, K. Chen, C.-Z. Peng, and J.-W. Pan, “Direct and full-scale experimental verifications towards ground–satellite quantum key distribution,” Nature Photonics 7, 387–393 (2013).
  * Bourgoin  _et al._ [2015] J.-P. Bourgoin, B. L. Higgins, N. Gigov, C. Holloway, C. J. Pugh, S. Kaiser, M. Cranmer, and T. Jennewein, “Free-space quantum key distribution to a moving receiver,” Opt. Express 23, 33437–33447 (2015).
  * Pugh  _et al._ [2017] C. J. Pugh, S. Kaiser, J.-P. Bourgoin, J. Jin, N. Sultana, S. Agne, E. Anisimova, V. Makarov, E. Choi, B. L. Higgins, and T. Jennewein, “Airborne demonstration of a quantum key distribution receiver payload,” Quantum Science and Technology 2, 024009 (2017).
  * Nauerth  _et al._ [2013] S. Nauerth, F. Moll, M. Rau, C. Fuchs, J. Horwath, S. Frick, and H. Weinfurter, “Air-to-ground quantum communication,” Nature Photonics 7, 382–386 (2013).
  * Liu  _et al._ [2020] H.-Y. Liu, X.-H. Tian, C. Gu, P. Fan, X. Ni, R. Yang, J.-N. Zhang, M. Hu, J. Guo, X. Cao, X. Hu, G. Zhao, Y.-Q. Lu, Y.-X. Gong, Z. Xie, and S.-N. Zhu, “Drone-based entanglement distribution towards mobile quantum networks,” National Science Review 7, 921–928 (2020).
  * Liao  _et al._ [2017] S.-K. Liao, W.-Q. Cai, W.-Y. Liu, L. Zhang, Y. Li, J.-G. Ren, J. Yin, Q. Shen, Y. Cao, Z.-P. Li, F.-Z. Li, X.-W. Chen, L.-H. Sun, J.-u. Jia, J.-C. Wu, X.-J. Jiang, J.-F. Wang, Y.-M. Huang, Q. Wang, Y.-L. Zhou, L. Deng, T. Xi, L. Ma, T. Hu, Q. Zhang, Y.-A. Chen, N.-L. Liu, X.-B. Wang, Z.-C. Zhu, C.-Y. Lu, R. Shu, C.-Z. Peng, J.-Y. Wang, and J.-W. Pan, “Satellite-to-ground quantum key distribution,” Nature 549, 43–47 (2017).
  * Yin  _et al._ [2017] J. Yin, Y. Cao, Y.-H. Li, J.-G. Ren, S.-K. Liao, L. Zhang, W.-Q. Cai, W.-Y. Liu, B. Li, H. Dai, M. Li, Y.-M. Huang, L. Deng, L. Li, Q. Zhang, N.-L. Liu, Y.-A. Chen, C.-Y. Lu, R. Shu, C.-Z. Peng, J.-Y. Wang, and J.-W. Pan, “Satellite-to-ground entanglement-based quantum key distribution,” Phys. Rev. Lett. 119, 200501 (2017).
  * Yin  _et al._ [2020] J. Yin, Y.-H. Li, S.-K. Liao, M. Yang, Y. Cao, L. Zhang, J.-a. Ren, W.-Q. Cai, W.-Y. Liu, S.-L. Li, R. Shu, Y.-M. Huang, L. Deng, L. Li, Q. Zhang, N.-L. Liu, Y.-A. Chen, C.-Y. Lu, X.-B. Wang, F. Xu, J.-Y. Wang, C.-Z. Peng, A. K. Ekert, and J.-W. Pan, “Entanglement-based secure quantum cryptography over 1,120 kilometres,” Nature 582, 501–505 (2020).
  * Bedington, Arrazola, and Ling [2017] R. Bedington, J. M. Arrazola, and A. Ling, “Progress in satellite quantum key distribution,” npj Quantum Information 3, 30 (2017).
  * Sidhu  _et al._ [2021] J. S. Sidhu, S. K. Joshi, M. Gundogan, T. Brougham, D. Lowndes, L. Mazzarella, M. Krutzik, S. Mohapatra, D. Dequal, G. Vallone, P. Villoresi, A. Ling, T. Jennewein, M. Mohageg, J. Rarity, I. Fuentes, S. Pirandola, and D. K. L. Oi, “Advances in space quantum communications,” (2021), arXiv:2103.12749 [quant-ph] .
  * Jennewein [2018] T. Jennewein, “Towards quantum communications with satellites,” in  _2018 IEEE Photonics Society Summer Topical Meeting Series (SUM)_ (2018) pp. 217–218.
  * Podmore  _et al._ [2019] H. Podmore, I. D’Souza, D. Hudson, T. Jennewin, J. Cain, B. Higgins, C. Midwinter, A. Scott, A. McColgan, D. Caldwell, and S. H. Zheng, “Optical terminal for canada’s quantum encryption and science satellite (qeyssat),” in  _2019 IEEE International Conference on Space Optical Systems and Applications (ICSOS)_ (2019) pp. 1–5.
  * Podmore  _et al._ [2021] H. Podmore, I. D’Souza, J. Cain, T. Jennewein, B. L. Higgins, Y. S. Lee, A. Koujelev, D. Hudson, and A. McColgan, “QKD terminal for Canada’s Quantum Encryption and Science Satellite (QEYSSat),” in  _International Conference on Space Optics — ICSO 2020_, Vol. 11852, edited by B. Cugny, Z. Sodnik, and N. Karafolas, International Society for Optics and Photonics (SPIE, 2021) pp. 203 – 212\.
  * Wu  _et al._ [2017] J. Wu, Z. He, L. Zhang, L. Yuan, T. Wang, J. Jia, R. Shu, and J. Wang, “Polarization study about a telescope-based transmitter for quantum communication,” Applied Optics 56, 8501–8506 (2017).
  * Han  _et al._ [2020] X. Han, H.-L. Yong, P. Xu, K.-X. Yang, S.-L. Li, W.-Y. Wang, H.-J. Xue, F.-Z. Li, J.-G. Ren, C.-Z. Peng, and J.-W. Pan, “Polarization design for ground-to-satellite quantum entanglement distribution,” Optics Express 28, 369–378 (2020).
  * Wu  _et al._ [2020] J. Wu, L. Zhang, J. Jia, T. Wang, R. Shu, Z. He, and J. Wang, “Polarization-maintaining design for satellite-based quantum communication terminals,” Opt. Express 28, 10746–10759 (2020).
  * Sankarasubramanian, Samson, and Venkatakrishnan [1999] K. Sankarasubramanian, V. P. A. Samson, and P. Venkatakrishnan, “Measurement of instrumental polarisation of the kodaikanal tunnel tower telescope,” Solar Polarization , 313–320 (1999).
  * Sun, Wu, and Zhao [2014] Z. Q. Sun, Z. F. Wu, and Y. S. Zhao, “Semi-automatic laboratory goniospectrometer system for performing multi-angular reflectance and polarization measurements for natural surfaces,” Review of Scientific Instruments 85, 014503 (2014).
  * Gu  _et al._ [2018] H. Gu, X. Chen, C. Zhang, H. Jiang, and S. Liu, “Study of the retardance of a birefringent waveplate at tilt incidence by mueller matrix ellipsometer,” Journal of Optics 20, 015401 (2018).
  * Almeida, pillet, and Wittmann [1991] J. S. Almeida, V. M. pillet, and A. D. Wittmann, “The instrumental polarization of a gregory-coudé telescope,” Solar Physics 134, 1–13 (1991).
  * Kiyohara  _et al._ [2004] J. Kiyohara, S. Ueno, R. Kitai, H. Kurokawa, M. Makita, and K. Ichimoto, “Calibration of the instrumental polarization of the domeless solar telescope at the hida observatory,” International Society for Optics and Photonics (SPIE, 2004) pp. 1778 – 1785\.
  * Beck  _et al._ [2005] C. Beck, R. Schlichenmaier, M. Collados, L. B. Rubio, and T. Kentischer, “A polarization model for the german vacuum tower telescope from in situ and laboratory measurements,” Astronomy and Astrophysics 443, 1047–1053 (2005).
  * Ichimoto  _et al._ [2008] K. Ichimoto, B. Lites, D. Elmore, Y. Suematsu, S. Tsuneta, Y. Katsukawa, T. Shimizu, R. Shine, T. Tarbell, A. Title, J. Kiyohara, K. Shinoda, G. Card, A. Lecinski, K. Streander, M. Nakagiri, M. Miyashita, M. Noguchi, C. Hoffmann, and T. Cruz, “Polarization calibration of the solar optical telescope onboard hinode,” in  _The Hinode Mission_ (Springer New York, New York, NY, 2008) pp. 179–207.
  * Note [1] To perform full process tomography, such as to establish Mueller matrices, one could straightforwardly incorporate additional circularly polarized incident states.
  * Alexander and Ng [1991] B. F. Alexander and K. C. Ng, “Elimination of systematic error in subpixel accuracy centroid estimation [also Letter 34(11)3347-3348(Nov1995)],” Optical Engineering 30, 1320 – 1331 (1991).
  * Simon [1986] M. C. Simon, “Wollaston prism with large split angle,” Appl. Opt. 25, 369–376 (1986).
  * Boulbry, Ramella-Roman, and Germer [2007] B. Boulbry, J. C. Ramella-Roman, and T. A. Germer, “Improved method for calibrating a stokes polarimeter,” Appl. Opt. 46, 8533–8541 (2007).
  * Lee, Mohammadi, and Jennewein [2021] Y. S. Lee, K. Mohammadi, and T. Jennewein, “Characterization of aberration with scanning pentaprism for optical terminals in free-space quantum communications,” In preparation (2021).
  * Weinstein [1954] W. Weinstein, “Computations in thin film optics,” Vacuum 4, 3–19 (1954).
  * Dobrowolski [1995] J. A. Dobrowolski, “Optical properties of films and coatings,” Handbook of Optics I , 42.3–130 (1995).
  * Bourgoin  _et al._ [2013] J.-P. Bourgoin, E. Meyer-Scott, B. L. Higgins, B. Helou, C. Erven, H. Hübel, R. Laflamme, T. Jennewein, B. Kumar, D. Hudson, I. D’Souza, and R. Girard, “A comprehensive design and performance analysis of low earth orbit satellite quantum communication,” New Journal of Physics 15, 35 (2013).
  * Azzam [2016] R. M. A. Azzam, “Stokes-vector and mueller-matrix polarimetry,” J. Opt. Soc. Am. A 33, 1396–1408 (2016).
  * Bailey  _et al._ [2015] J. Bailey, L. Kedziora-Chudczer, D. V. Cotton, K. Bott, J. H. Hough, and P. W. Lucas, “A high-sensitivity polarimeter using a ferro-electric liquid crystal modulator,” Monthly Notices of the Royal Astronomical Society 449, 3064–3073 (2015).
  * Vedel, Breugnot, and Lechocinski [2011] M. Vedel, S. Breugnot, and N. Lechocinski, “Full Stokes polarization imaging camera,” in  _Polarization Science and Remote Sensing V_, Vol. 8160, edited by J. A. Shaw and J. S. Tyo, International Society for Optics and Photonics (SPIE, 2011) pp. 299 – 311\.


[a]Raquel Quishpe

# Hyperloop – The ALICE analysis train system for Run 3

Jan Fiete Grosse-Oetringhaus  Raluca Cruceru  Costin Grigoras

###### Abstract

ALICE analyses mostly deal with large datasets using the distributed Grid
infrastructure. In LHC running periods 1 and 2, ALICE developed a system of
analysis trains (so-called “LEGO trains”) that allowed the user to configure
analysis tasks (called wagons) that run on the same data. The LEGO train
system builds upon existing tools: the ALICE analysis framework as well as the
Grid submission and monitoring infrastructure. This centralized system
improved the resource utilization and provided a graphical user interface
(UI), in addition to bookkeeping functionalities. Currently, 90$\%$ of ALICE
analyses use the train system. The ongoing major upgrade for LHC Run 3 will
enable the experiment to cope with an increase of Pb-Pb collision data of two
orders of magnitude compared to the Run 1 and 2 data-taking periods. In order
to process this unprecedented data sample, a new computing model has been
implemented, the Online-Offline Computing System (O2). Analysis trains will
also be the main workhorse for analysis in Run 3: a new infrastructure,
Hyperloop, is being developed based on the successful concept of the LEGO
trains. The Hyperloop train system includes a different and improved UI using
modern responsive web tools, bookkeeping, instantaneous automatic testing, and
the production of derived skimmed data. So far, about 800 Hyperloop trains
have been successfully submitted to the Grid and ALICE analysis facilities
using converted Run 2 data. An overview of the ALICE train system concept is
given, highlighting the improvements of the new Hyperloop framework for
analysis in Run 3.

##  1 Introduction

The ALICE collaboration analyzes large datasets using the distributed Grid.
For Run 1 and Run 2, the ALICE detector recorded around 10 PBs every year. In
order to read the data from a single dataset, about $10^{5}$ files have to be
read, containing data of the order of 50 TB. The creation and submission of
analysis jobs to the Grid can be done with the ALICE analysis framework, and
monitored with the ALICE monitoring service, MonALISA. If different users are
running their analysis for the same dataset in the Grid by themselves, this
implies loading $10^{5}$ files for each user, which decreases the CPU
efficiency and results in computing resources waste. Hence, an organized
analysis framework was created, the LEGO (Lightweight Environment for Grid
Operators) train system.

The LEGO train system, offers a web-based user interface (UI) where ALICE
users can declare their existing analysis task in the form of a wagon, and
enable it for a dataset without dealing with the complexity of the Grid [1].
Wagons that are enabled for the same dataset, are put together in a train run
by a train operator, which then is tested and, if successful, submitted to the
Grid. At the end of a train run, the results are merged, and users do not need
to monitor the evolution of their analysis jobs submission. The LEGO train
system has had a successful impact within the ALICE collaboration, currently,
90$\%$ of ALICE analyses use the train system, leading to the submission of
16000 trains and 172 million Grid jobs in 2020.

##  2 From Run 2 to Run 3

During the Long Shutdown 2 (LS2), the ALICE detector went through major
upgrades allowing it to collect in Run 3 roughly 2 orders of magnitude more
data than in Run 2. This led to the implementation of a new computing model,
the Online-Offline Computing System (O2)[2], which is not compatible with the
existing LEGO train system. Given the new analysis framework, as well as other
needed upgrades, a new organized analysis framework has been developed for Run
3, the Hyperloop train system. In the long term, the LEGO trains will be
phased out and replaced by the Hyperloop trains. To allow users to utilize Run
2 data with the new software O2, the Run 2 data is being converted to the Run
3 data format, and can be handled with the Hyperloop train system. Hyperloop
trains are submitted to the ALICE Grid as well as to ALICE Analysis Facilities
where specific data for analysis is staged.

##  3 Hyperloop train system design

Following the LEGO trains solid concept, the Hyperloop framework is a tool to
run and manage analysis trains on the ALICE Grid. It builds on the O2 analysis
framework, MonALISA and its Grid submission tools (LPM). The database and
backend have been implemented within MonALISA plus a java-based model that
allows bookkeeping of wagons and datasets, and stored in a PostgreSQL
database. The GUI has been developed with a modern user-friendly library,
React.js[3].

In the LEGO train system, trains are organized by physics working group (PWG)
(e.g. heavy flavour, correlations and flow, etc) and by dataset type (raw data
and Monte Carlo) and collision system (p-p, p-Pb, Pb-Pb, Xe-Xe), resulting in
about 87 active trains. All this information is contained in static web pages,
which eventually got too large to be loaded and displayed efficiently.
Furthermore, the large number of active trains has led to some train runs
using the same dataset not being run together as they belonged to a different
PWG trains.

The Hyperloop UI offers different personalized web pages for users and train
operators, making the page load faster and easier to navigate. Trains are no
longer divided per PWG, instead, the concept of an analysis is introduced. An
analysis is created using a task manager, JIRA, where the analyzers who can
edit the wagon configurations are defined. The usage of JIRA allows an easier
management of analysis for approval in ALICE.

Figure 1: Process to submit a Hyperloop train run.

Inside of an analysis, analyzers can create, configure and enable their wagons
from an O2 workflow available in a daily release of the O2 software (package
tag). In addition to that, the analyzers also have the possibility to enable
their wagon for the next release including changes contained in a GitHub pull
request. Enabled wagons are automatically tested, and if enabled with a pull
request, the wagon will be tested once the pull request has been included in a
package tag, allowing the user to have an immediate feedback. If the wagon
test is successful, a train operator can compose a train run for a dataset
taking into account the required package tag, target facility maximum memory
and wagons common dependencies. An algorithm has been developed returning the
ideal wagon combination based on the individual wagon tests and the parameters
mentioned before, hence, the train operator does not need to manually estimate
the combination and can compose train runs more efficiently with optimal
computing resource usage. Moreover, automatic train run composition can be
scheduled for a dataset, so that the process previously mentioned can be
automatically executed by the system. Figure 1 summarizes the process of a
hyperloop train submission. The fact that most of the actions are now
automatic allows to have less train operators but who are experts within the
framework.

Thanks to the bookkeeping feature, a change log web page has been developed
for wagons and datasets, providing the configuration at a specific time. Wagon
and train comparison pages have been created as well. Also, for wagons and
train runs test results, interactive performance graphs and personalized
notifications have been implemented (example in figure 2).

Figure 2: Train run test performance result. The proportional set size memory
of all workflow tasks in the train run are displayed.

##  4 Current status of the Hyperloop train system

A first version of the Hyperloop train system was available for the ALICE
Analysis Challenge, which began on June 2020. So far, 24 analyses have been
created for the Hyperloop framework, where 39 analyzers are actively using it.
Since then, continuous improvements have been made to the Hyperloop framework
following the improvements made to the O2 software. Analyzers from different
PWGs have been testing the new framework using converted Run 2 data. Their
results have shown a 3-10 event throughput improvement from AliPhysics (LEGO
trains) to O2 (Hyperloop trains), further optimization is foreseen. To date,
more than 800 Hyperloop trains have been successfully submitted to the Grid
and Analysis Facilities.

##  5 Summary

A modern and reactive organized trains framework, Hyperloop, is being
successfully developed based on the solid concept and results from the LEGO
train system. The Hyperloop train system has been designed to support the
ALICE Run 3 software suite, O2. Several improvements have been implemented,
the most relevant being a unified train run submission, wagons and datasets
bookkeeping, automatic wagon testing and automatic train composition and
submission. Users from different PWGs have successfully tested the Hyperloop
UI with converted Run 2 data.

## References

  * [1] M. Zimmermann [ALICE], “The ALICE analysis train system,” J. Phys. Conf. Ser. 608, no.1, 012019 (2015) doi:10.1088/1742-6596/608/1/012019 [arXiv:1502.06381 [hep-ex]].
  * [2] P. Buncic, M. Krzewicki and P. Vande Vyvre, “Technical Design Report for the Upgrade of the Online-Offline Computing System,” CERN-LHCC-2015-006.
  * [3] Facebook Open Source. “React.js". Available at https://reactjs.org/