  Accreting supermassive black holes are sources of polarized radiation that
propagates through highly curved spacetime before reaching the observer. In
order to help interpret observations of such polarized emission, accurate and
efficient numerical schemes for polarized radiative transfer in curved
spacetime are needed. In this manuscript we extend our publicly available
radiative transfer code RAPTOR to include polarization. We provide a brief
review of different codes and methods for covariant polarized radiative
transfer available in the literature and existing codes, and present an
efficient new scheme. For the spacetime-propagation aspect of the computation,
we develop a compact, Lorentz-invariant representation of a polarized ray. For
the plasma-propagation aspect of the computation, we perform a formal analysis
of the stiffness of the polarized radiative-transfer equation with respect to
our explicit integrator, and develop a hybrid integration scheme that switches
to an implicit integrator in case of stiffness, in order to solve the equation
with optimal speed and accuracy for all possible values of the local
optical/Faraday thickness of the plasma. We perform a comprehensive code
verification by solving a number of well-known test problems using RAPTOR and
comparing its output to exact solutions. We also demonstrate convergence with
existing polarized radiative-transfer codes in the context of complex
astrophysical problems. RAPTOR is capable of performing polarized radiative
transfer in arbitrary, highly curved spacetimes. This capability is crucial for
interpreting polarized observations of accreting black holes, which can yield
information about the magnetic-field configuration in such accretion flows. The
efficient formalism implemented in RAPTOR is computationally light and
conceptually simple. The code is publicly available.
