%% LyX 2.3.4.2 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{amstext}
\usepackage{graphicx}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{tabularx}

\usepackage{authblk}

\makeatother

\usepackage{babel}
\begin{document}
\title{Bayesian ODE/Convolution Models for Estimating Underlying Growth of
COVID-19 and its Uncertainty }
\author{Douglas Mason\thanks{Koyote Science LLC and Nexus iR\&D Laboratory, San Francisco, CA},
Robert Martinez\thanks{Harvard University, Cambridge College, and Nexus iR\&D Laboratory,
Boston, MA}}
\date{May 8, 2020}

\maketitle
We model universal curves of reported COVID-19 daily reported infections
and related deaths using a modified epidemiological Susceptible-Exposed-Infectious-Recovered
(SEIR) Model\cite{original-SEIR-model,more-SEIR,even-more-SEIR}.
Using currently available data, we determine optimized constants and
apply this framework to reproducing the infection and death curves
for California (the state with the largest population), New York (the
state with highest population density), and U.S. totals, and provide
supplementary results for the remaining 50 states and Washington D.C.
Source code used to produce these results can be found at the companion
website\cite{companion}. Data is sourced from the New York Times\cite{nyt-data}.

\section{Model Definition}

It is helpful to define various sets that appear in the model as time-dependent
variables. In the early stages of an epidemic or pandemic, the vast
majority of individuals are susceptible to infection, while few individuals
have recovered from an infection, and for this reason we can approximate
the S and R values to 100\% and 0\% respectively. In addition, the
SEIR model treats transitions from one group to the next as emissions
with fixed (or possibly time-varying rates), which may be accurate
over long time periods, but does not reflect the dynamics we attempt
to model. Rather, while the growth of contagious individuals is well-described
by time-varying growth rates (which can be solved by integrating a
single ordinary differential equation), the transition to other measurable
states (such as being tested and confirmed positive, or subsequently
dying) likely exhibits an average time-delay with a measurable variance
and an overall multiplier. For example, a person who has just become
contagious will likely not show symptoms for up to a week, and then
show symptoms, and then go to the hospital and be tested, and then
have a probability of being confirmed positive.

\begin{figure}
\includegraphics[width=1\textwidth]{static_figures/delayed_gaussian_diagram}

\caption{\label{fig:Delayed-gaussian-diagram}The convolution kernel (defined
only for t > 0) provides a time delay, width, and multiplier describing
the transition from the contagious pool to the confirmed and the deceased
pools with different parameter values.}
\end{figure}
All transitions can be modeled by the three numbers, as shown in Figure
\ref{fig:Delayed-gaussian-diagram}:
\begin{itemize}
\item Average time delay ($\mu$)
\item Variance in time delay ($\sigma^{2}$)
\item Overall multiplier ($M$), i.e., how many people in total transition
from one state to the next)
\end{itemize}
Note that in a usual system of ODEs (as in the SIR/SEIR models), each
transition is modeled not by three by just one single parameter, the
transition rate. This means that our system of parameters is over-determined
compared to a system of ODEs (see below for how we address those concerns
using domain knowledge). However, these ODE systems are better-suited
to the assumptions of molecular dynamics rather than disease spread
over short time scales. For example, a person who becomes contagious
has zero chance of being immediately tested and confirmed positive,
but this is possible in a rate-based model. Moreover, to account for
the shapes of the data that we have, such systems need to postulate
at least one intermediate stage between Contagious and Positive or
Deceased, rendering them unjustifiably complex, to allow people to
transmit from the contagious pool and aggregate in intermediate pools
before emitting into the positive and deceased pools.

\begin{figure}
\includegraphics[width=1\textwidth]{static_figures/state_transitions}

\caption{\label{fig:State-flow}Diagram of the states modeled: people enter
the contagious and emit to the Positive and to the Deceased state
by delayed-Guassian emission with different delays, widths, and multipliers.
However, the Contagious pool itself grows with instantaneous emissions
dependent on the total size of the pool. We model emission to the
Recovered pool as having the same delay and width as the learned parameters
for emission to the Deceased pool, with a multiplier set so all members
of the Contagious pool either recover or die. While the Recovered
and Deceased pool are mutually exclusive, the Positive pool overlaps
with both. Our model only concerns itself with new Positive and Deceased
entrants, rather than their cumulative numbers.}
\end{figure}
We describe our model according to Figure \ref{fig:State-flow} based
on two observables (confirmed positive cases and deaths) and one non-observable
(the number of newly contagious individuals). Because our model is
a directed acyclic graph, we can start with a hypothetical profile
of the newly Contagious pool and use convolution to determine the
Positive and Deceased pools. To obtain the Contagious profile, we
integrate the simple ODE below.

\[
\frac{dC}{dt}=\alpha(t)C
\]

\[
\alpha(t)=\frac{\alpha_{2}-\alpha_{1}}{1+\exp(t_{0}-t)}+\alpha_{2}
\]

To define $\alpha(t)$, we use a logistic function in time with fixed
width parameter set to 1 day to interpolate between two extremal constant
values 1 and 2 for the infectivity rate before and after a Shelter-in-
Place order $t_{0}$. The difference in the two infection rates indicates
the effectiveness of the order on reducing the growth of new infections.
The above ODE produces a profile of C(t) that has two growth rates
connected using a fixed-width logistic transition between the two
growth rates.

The transition of a single individual from the Contagious to Positive
and Deceased pools is modeled by a different gaussian kernel for each
transition:

\[
K(t,t')=\theta(t,t')\frac{M}{\sigma\sqrt{(2\pi}}\exp\left[-\left(\frac{t-t'-\mu}{\sigma}\right)^{2}\right]
\]
where $\theta(t,t')$ is a step function returning 1 for $t'>t$ and
0 otherwise. The kernel is normalized to unit area so that M gives
the total number of people who transition from one state to the next.
The value provides the average delay between one state and the next,
and the value indicates the variance in time delays between one state
and the next.

\section{Handling Transient Perturbations Around Shelter-in-Place }

\begin{figure}
\includegraphics[width=1\textwidth]{\string"/Users/kayote/Downloads/COVID-19 Model/images/image27\string".png}

\caption{\label{fig:Convolution-diagram}Diagram describing the convolution
process. A function with a disjoint derivative (blue, on left), when
convolved with a delayed Gaussian kernel (black, middle) produces
a smooth curve that will be shifted to the right and be changed in
magnitude (green, right).}
\end{figure}
Our model explicitly does not model the Recovered pool, which means
that the initial and final growth rates $\alpha_{1}$ and $\alpha_{2}$
are effective growth rates that account for emission into the Recovered
pool. In fact, the growth rate drawing new people into the Contagious
pool (the \textquotedblleft leading front\textquotedblright ) is slightly
higher than the effective growth rate, since it must compensate against
the loss of individuals to the Recovered pool. In Figure \ref{fig:Convolution-diagram},
we show an example of how this works: Individuals enter the Contagious
pool, then emit either into the Recovered or Deceased pools with a
delayed Gaussian probability with values for the delay, width, and
multiplier based on fits to the Deceased curve for U.S. totals ($\mu=19$,
$\sigma=10$, $M=0.01$). On the other hand, new individuals enter
the Contagious pool in proportion to the total size of the pool and
this occurs with an instantaneous growth rate without delay.

\begin{figure}
\includegraphics[width=1\textwidth]{static_figures/transients}

\caption{\label{fig:Effective-growth-rate}Example solution showing the Contagious,
Positive, and Deceased curves for a model incorporating the Recovered
emissions. We find that considering the Recovered pool pulls down
the \textquotedblleft leading front\textquotedblright{} growth rate
into effective growth rates that match the growth rates in our data.
Details about emission may or may not produce a visible hump in the
unobserved Contagious pool around the time of shelter-in-place, which
is then smoothed out through emissions into the Positive and Deceased
pools. This is how pools which have reached a flat effective growth
rate continue to draw in new individuals, since the raw growth rate
for new Contagious individuals is actually slightly higher than what
we observe to compensate for loss to the Recovered pool.}
\end{figure}
As shown in Figure \ref{fig:Effective-growth-rate}, the effective
growth is demonstrated to be less than the original growth by a fixed
amount related to the emission parameters, with an artifact occuring
during the change in growth rates that appears as a temporary hump.
However, after that hump has been smoothed out by the Gaussian emission
into the Positive and Deceased pools, it is no longer visible. The
parameters we describe in this document refer to the solid blue curve,
which we approximate without the transient artifacts around shelter-in-place.
We provide an example solution in Figure 3 against the U.S. totals.

\section{Reducing Model Parameters Using Domain Knowledge }

The following parameters are determined by the data:
\begin{itemize}
\item The slope of positive cases at the beginning and at the end of the
shelter-in-place order (after a delay, of course) determine the two
growth rates 1 and 2. The value of 2 may not be precisely known until
more time has passed to collect more data.
\item The change in the slope of positive cases indicates the likely delay
between becoming contagious and testing positive. However, if the
transition width is sufficiently large, this delay may become ambiguous.
\item Similar arguments apply for the parameters describing transitions
from the Contagious to the Deceased pools.
\end{itemize}
In addition, there are also ambiguities in the model since it is overdetermined.
In particular, two parameters together describe the relative magnitude
of the Contagious and Positive curves. Therefore, we recommend fixing
one of these two values:
\begin{itemize}
\item The initial conditions (hypothetical \# of newly contagious people)
at time ($t_{0}$) (Note, this can also be equivalently described
as the time in the past that the first individual entered the Contagious
pool.)
\item The contagious-to-positive multiplier
\end{itemize}
Since there is no means of knowing the initial conditions, we recommend
fixing the contagious-to- positive multiplier to an approximate value
supported by evidence, and set the value to 10\%. Note that the degeneracy
in describing initial conditions (number of newly contagious individuals
at a fixed date, or the time in the past that the first individual
became contagious) imply that the fraction of contagious individuals
who are tested and confirmed necessarily goes down the earlier in
the past that the first individual became contagious.

Another ambiguity arises regarding the three parameters:
\begin{itemize}
\item The contagious-to-positive delay width
\item The contagious-to-positive delay
\item The final contagious growth rate
\end{itemize}
This is because the data supports two groups of solutions:
\begin{itemize}
\item Ones with shorter delays and delay widths and with a more-positive
final growth rate
\item Ones with longer delays and delay widths and with a more-negative
final growth rate
\end{itemize}
which is also true for the contagious-to-deceased transition, where
the lower data counts (and therefore greater measurement ambiguity)
support the second solution more strongly. However, we can use domain
knowledge to identify that since the values supporting the first hypothesis
are more-closely aligned with realistic numbers (we doubt that the
delay is over a month or that there is over 20 days of variance in
the delay).

There are three approaches for handling this ambiguity:
\begin{enumerate}
\item Fix some parameters to reduce the expressivity of the model (and increase
speed of optimization)
\item Apply priors that rule out undesirable solutions
\item Add terms to the loss function to penalize undesirable solutions
\end{enumerate}
We apply all three techniques (see the next section) and, in particular,
fix the contagious-to-positive and contagious-to-deceased emission
widths to the approximate values for the U.S. totals: 7 days, or 1
week, for both.

\section{Likelihood Approximation and Incorporating Prior Beliefs }

\begin{figure}
\includegraphics[width=1\textwidth]{state_plots/2020_05_06_date_1000_bootstraps_100000_likelihood_samples/total/bootstrap_solutions_with_priors}

\caption{\label{fig:US-curves-with-spread}Model Curves and Experimental Data
of U.S. COVID-19 Daily Reported Cases and Related Deaths in the U.S.}
\end{figure}
We utilize two approximations to the full likelihood distribution
across our parameters, given our observations. The first approximates
the likelihood as the distribution of maximum-likelihood-estimates
(MLEs) of the parameters on bootstraps of our data, using least-squares
error on the difference in the expected and measured log values of
confirmed cases and casualties. We consider measurement uncertainty
by noting that we expect newly reported cases and deaths to vary up
to $\sqrt{N}$ from their underlying values since such counts can
be modeled as a Poisson process, whose variance is equal to its measured
mean, although the resulting variance ignores other systematic influences
on our data such as time-varying testing rates or imperfect tests.
Thus, we sample training data with replacement and add samples from
a normal distribution with a standard deviation of $\sqrt{N}$ to
the recorded values, run our simulation using a discrete ODE solver
and convolution library, and minimize the least-squares error over
newly confirmed cases and deaths after the 100th case and death has
been identified, respectively. We show an example set of solutions
for U.S. totals in Figure \ref{fig:US-curves-with-spread}. From the
resulting parameter estimates, the bootstrapping technique has been
shown to accurately describe the distributions up to second-order
statistics (and possibly higher)\cite{efron2003,efron1979,rubin1981}.

\begin{figure}
\includegraphics[width=1\textwidth]{state_plots/2020_05_06_date_100_bootstraps_100000_likelihood_samples/total/MVN_random_walk_actual_vs_predicted_vals}

\includegraphics[width=1\textwidth]{state_plots/2020_05_06_date_100_bootstraps_100000_likelihood_samples/total/MVN_samples_actual_vs_predicted_vals}

\caption{\label{fig:US-MVN-approx}Actual vs. predicted values for the likelihood
function for U.S. totals as modeled by a multivariate normal distribution,
as sampled using the MCMC algorithm (top) and direct likelihood samples
(bottom). The two sources of likelihood samples in the bottom figure
are apparent in the two ``comet tails'' emerging from the most-likely
points at the upper-right. The MCMC algorithm discards roughly 90\%
of proposed samples resulting in the thinner cloud of points.}
\end{figure}

\begin{figure}
\includegraphics[width=1\textwidth]{state_plots/2020_05_06_date_100_bootstraps_100000_likelihood_samples/total/MVN_random_walk_correlation_matrix}

\caption{\label{fig:US-MVN-approx-correlation-matrix}Correlation matrix for
model parameters for U.S. totals after being fit to a multivariate
norm with a full covariance matrix. We see that $\alpha_{1}$ is strongly
anti-correlated with the two delays.}
\end{figure}
In the second approximation method, we sample the likelihood function
at many points, then resample based on the propensity of those choices
and their likelihood, and finally compute aggregate statistics (means
and covariance matrix) on the resampled parameters, as well as highest
probability density credibility intervals. We also have two methods
for generating our samples: the first samples from a normal distribution
around the MLE with corresponding propensities coming from the multivariate
norm probability density function (PDF), and the second employs the
random walk Markov chain Monte Carlo Metropolis-Hastings algorithm\cite{metropolois-hastings}
with constant propensity, since the resulting distribution should
match the underlying probability density directly. This likelihood
function is calculated as the product of the PDF of norms centered
at each observed data point ($N$), with standard deviation $\sqrt{N}$,
evaluated at the values returned by our simulation. From these samples,
we then re-sample based on the likelihood values (normalized to one
over all samples) multiplied by their inverse propensities, and run
aggregate statistics on the resampled points to create a multivariate
norm (MVN) distribution that is representative of our data. In Figure
\ref{fig:US-MVN-approx}, we show the predicted and actual values
of the likelihood for U.S. totals and show that the MVN and MCMC approximations
demonstrate reasonable accuracy. Moreover, adding the additional parameters
by going from a diagonal to a full covariance matrix further improves
the fit. In Figure \ref{fig:US-MVN-approx-correlation-matrix}, we
show the full correlation matrix for the model parameters. We see
that $\alpha_{1}$ is strongly correlated with the two delays, which
will explain deviation from the bootstrap approximation in subsequent
analysis.

Both approximation methods contribute hyperparameters to our models:
the number of bootstraps (100), the number of likelihood samples (20k),
the number of likelihood re-samples (20k), the number of MCMC samples
(16k), and the number of burn-in (discarded) MCMC samples (4k).

\begin{figure}
\includegraphics[width=1\textwidth]{state_plots/2020_05_06_date_1000_bootstraps_100000_likelihood_samples/total/bootstrap_param_distro_with_priors}

\caption{\label{fig:US-params}Model Parameter Estimates for U.S. totals after
incorporating priors}
\end{figure}
Once the likelihood distribution has been approximated, according
to Bayes theorem,

\[
\text{posterior}\propto\text{likelihood}\times\text{prior}
\]
incorporating priors on our parameters is as easy as multiplying the
two functions element-wise and normalizing a posteriori. In Figure
\ref{fig:US-params}, we show the full likelihood approximation (or,
equivalently, the posterior with uniform priors), and discuss the
physicality of parts of the distributions, which the reader can either
incorporate or discount based on their intuition. Updates to the distributions
of all parameters based on assumed priors can be obtained by weighted
sampling of the bootstraps according to those individual priors on
each parameter, since, for example, ruling out overly long delays
between becoming contagious and being confirmed positive will also
rule out other parameter distributions, such as overly long variances
in the delay. We employ the following priors, using uniform distributions
(so their shapes don\textquoteright t affect the posterior distribution)
with the following bounds:
\begin{itemize}
\item 0 < $\alpha_{1}$< 1.0
\item -0.5 < $\alpha_{2}$ < 0.5
\item 0 < contagious-to-positive delay < 20
\item 5 < contagious-to-deceased delay < 40
\item 0 < contagious-to-deceased multiplier < 0.1
\end{itemize}
Note that if we rely on using our priors to filter out undesirable
solutions, we can waste a substantial amount of computational resources
producing undesirable candidates in our approximations which we only
later discard. Worse, it is possible to create unphysical results
with our simulations, and these unphysical results can be reached
through the optimization methods we employ even when they start with
valid parameters. In particular, unphysical results occur when the
parameters can produce negative numbers of confirmed cases and deaths,
and when the parameters give a later contagious-to-positive than contagious-to-deceased
delay. To avoid computing such solutions, we add a term to our loss
function which sums the negative value of all predicted values that
are below zero, and another term which provides the difference between
the contagious-to-positive and contagious-to-deceased delays when
the former is larger than the latter. These loss functions have a
zero derivative when parameters are valid and push parameters back
to the valid range when they are invalid, thus avoiding skewing our
results while enforcing physicality. The remaining contributors to
the loss function remain the same, however we only contribute terms
when the simulation provides positive counts, since the loss function
is based on distances from the log results of our simulations, which
is undefined for negative values.

\section{Results}

Examining the parameter estimates in Figures \ref{fig:US-params},
\ref{fig:NY-params}, and \ref{fig:Cali-params}, we see that California
shows a much greater response delay to the shelter-in-place order
than in New York (March 19th and 20th, respectively) at 12 days compared
to 4.2 days (with U.S. totals in the middle at 9.2 days). In addition,
the relative ordering of the original growth rates (California = 22.7\%
< U.S. = 27.8\% < New York = 36.9\%) reflect the strong population
density in New York. However, this ordering is reversed in the final
growth rates (New York = +0.435\% < California = 1.01\% == U.S. =
1.01\%) suggesting that New York has dramatically reduced spread.

All three datasets show a similar relative delay between being a case
being positively confirmed and a resulting death at approximately
one week (7-8 days). When looking at the relative multiplier between
the positive and deceased numbers, which acts as an analog to the
case fatality rate, we find that California's estimates are much lower
(4.7\% for California vs. 6.21\% for the U.S. and 6.45\% for New York).
If tests are limited and reserved only for the most severely ill,
we would expect the relative multiplier to increase, suggesting that
New York and the U.S. may be capping testing more severely than California.

In Figures \ref{fig:State-Report-Alpha-2} and \ref{fig:State-Report-CFR}
we provide results for all 50 states, Washington D.C., and U.S. totals
for the final growth rate and the relative multiplier between the
positive and deceased pools, and for both the bootstrapping and MCMC
approximations. We find agreement between the two approximations in
most cases, and see a wide disparity among the different regions,
which the reader is encouraged to interpret.
\begin{figure}
\includegraphics[width=1\textwidth]{state_plots/2020_05_06_date_100_bootstraps_100000_likelihood_samples/boxplot_for_alpha_2_without_direct_samples}

\caption{\label{fig:State-Report-Alpha-2}Model parameter estimates for $\alpha_{2}$
(the current growth rate of COVID-19) for each of 50 U.S. states,
Washington D.C., and U.S. totals with 5\%, 25\%, 50\%, 75\%, and 95\%
percentiles, ranked from highest to lowest median, and shown with
both the bootstrap and the MCMC approximations. We find that both
approximation methods agree with each other. We see strongest growth
in Nebraska, Minnesota, and Iowa, and lowest growth in Alaska, Montana,
and Hawaii.}
\end{figure}

\begin{figure}
\includegraphics[width=1\textwidth]{state_plots/2020_05_06_date_100_bootstraps_100000_likelihood_samples/boxplot_for_positive_to_deceased_mult_without_direct_samples}

\caption{\label{fig:State-Report-CFR}Model parameter estimates for the positive-to-deceased
multiplier, which is an analog to the case fatality rate and an indicator
of testing restrictions when the value is high. We provide results
for each of 50 U.S. states, Washington D.C., and U.S. totals with
5\%, 25\%, 50\%, 75\%, and 95\% percentiles, ranked from highest to
lowest median, and shown with both the bootstrap and the MCMC approximations.
We find that the bootstrap method gives us larger variances, and fails
to find variance for states with very low death counts (Wyoming, Alaska,
Montana, and Hawaii) and only returns the initial value (10\%). Overall,
we see a strong skew towards East Coast states with higher estimations. }
\end{figure}
\begin{figure}
\includegraphics[width=1\textwidth]{state_plots/2020_05_06_date_1000_bootstraps_100000_likelihood_samples/new_york/bootstrap_param_distro_with_priors}

\caption{\label{fig:NY-params}Model Parameter Estimates for New York after
incorporating priors}
\end{figure}

\begin{figure}
\includegraphics[width=1\textwidth]{state_plots/2020_05_06_date_1000_bootstraps_100000_likelihood_samples/california/bootstrap_param_distro_without_priors}

\caption{\label{fig:Cali-params}Model Parameter Estimates for California after
incorporating priors}
\end{figure}

\bibliographystyle{plain}
\bibliography{covid_biblio}

\end{document}


\section{Sorting Tool}
%
This section presents the modules {\tt m\_MergeSorts} and
{\tt m\_SortingTools}.

\noindent
The module {\tt m\_MergeSorts} contains basic sorting procedures, that in
addition to a couple of standard Fortran 90 statements in the
array syntex, allows a full range sort or unsort operations.
The main characteristics of the sorting algorithm used in this
module are, a) stable, and b) index sorting.

It has two subroutines: {\tt IndexSet} that initializes an array of data
location indices and {\tt IndexSort} that is stable merge index sorting
integers, reals and characters.
%
\begin{verbatim}
EXAMPLES 1:
  Code:
      use m_MergeSorts,only : IndexSet
      use m_MergeSorts,only : IndexSort
      ...
      integer, intent(in) :: No
      type(Observations), dimension(No), intent(inout) :: obs
      integer, dimension(No) :: indx  ! automatic array
      call IndexSet(No,indx)
      call IndexSort(No,indx,obs(1:No)%lev,descend=.false.)
      call IndexSort(No,indx,obs(1:No)%lon,descend=.false.)
      call IndexSort(No,indx,obs(1:No)%lat,descend=.false.)
      call IndexSort(No,indx,obs(1:No)%kt, descend=.false.)
      call IndexSort(No,indx,obs(1:No)%ks, descend=.false.)
      call IndexSort(No,indx,obs(1:No)%kx, descend=.false.)
      call IndexSort(No,indx,obs(1:No)%kr, descend=.false.)
                ! Sorting
      obs(1:No) = obs( (/ (indx(i),i=1,No) /) )
      ...
                ! Unsorting
      obs( (/ (indx(i),i=1,No) /) ) = obs(1:No)
\end{verbatim}

\noindent
The module {\tt m\_SortingTools} contains a collection of sorting utilities.
The utilities are accessed through three generic interfaces, IndexSet(),
IndexSort(), and IndexBin().

Note that, a version of IndexBin() for real arguments is not implemented
due to the difficulty of comparing two real values as being equal.
For example, a bin for real values may be specified as a single number,
a range of two numbers, a number with an absolute error-bar, or a number
with a relative error-bar.

In general, one may have to map both keys(:) and bins(:) to integer indices
by the a given rule, then use the integer version of IndexBin() with the
two integer index arrays to do the sorting.
This mapping rule, however, is application dependent.

Also note that, in principle, it is possible to use both IndexSort() and
IndexBin() in the same sorting task.
%
\begin{verbatim}
EXAMPLES 2:
  - An example of using IndexSet()/IndexSort() in combination with
    the convenience of the Fortran 90 array syntex can be found in the
    prolog of m_MergeSorts.
  - An example of using IndexSet()/IndexBin(): Copying all "good"
    data to another array.

  Code:
      integer :: indx(n)
      call IndexSet(n,indx)
      call IndexBin(n,indx,allObs(:)%qcflag,GOOD,ln0=ln_GOOD)
                ! Copy all "good" data to another array
      goodObs(1:ln_GOOD)=allObs( indx(1:ln_GOOD) )
                ! Refill all "good" data back to their original places
      allObs( indx(1:ln_GOOD) ) = goodObs(1:ln_GOOD)

  - Similarily, multiple keys may be used in an IndexBin() call
    to selectively sort the data.  The following code will move data
    with kt = kt_Us,kt_U,kt_Vs,kt_V up to the front:

  Code:
      call IndexBin(n,indx,allObs(:)%kt,(/kt_Us,kt_U,kt_Vs,kt_V/))
      allObs(1:n) = allObs( indx(1:n) )

  - Additional applications can also be implemented with other argument
    combinations.
\end{verbatim}
%


\documentclass[nofootinbib,notitlepage,11pt]{revtex4-2}

%%% linking references
\usepackage{hyperref}
\hypersetup{
  breaklinks=true,
  colorlinks=true,
  linkcolor=blue,
  filecolor=magenta,
  urlcolor=cyan,
}

%%% header / footer
\usepackage{fancyhdr} % easier header and footer management
\pagestyle{fancy} % page formatting style
\fancyhf{} % clear all header and footer text
\renewcommand{\headrulewidth}{0pt} % remove horizontal line in header
\usepackage{lastpage} % for referencing last page
\cfoot{\thepage~of \pageref{LastPage}} % "x of y" page labeling

%%% symbols, notations, etc.
\usepackage{physics,braket,bm,amssymb} % physics and math
\renewcommand{\t}{\text} % text in math mode
\newcommand{\f}[2]{\dfrac{#1}{#2}} % shorthand for fractions
\newcommand{\p}[1]{\left(#1\right)} % parenthesis
\renewcommand{\sp}[1]{\left[#1\right]} % square parenthesis
\renewcommand{\set}[1]{\left\{#1\right\}} % curly parenthesis
\newcommand{\bk}{\Braket} % shorthand for braket notation
\renewcommand{\v}{\bm} % bold vectors
\newcommand{\uv}[1]{\bm{\hat{#1}}} % unit vectors
\newcommand{\av}{\vec} % arrow vectors
\renewcommand{\d}{\text{d}} % for infinitesimals
\renewcommand{\c}{\cdot} % inner product

\usepackage{dsfont} % for identity operator
\newcommand{\1}{\mathds{1}}

\newcommand{\up}{\uparrow}
\newcommand{\dn}{\downarrow}

\newcommand{\x}{\text{x}}
\newcommand{\y}{\text{y}}
\newcommand{\z}{\text{z}}

\newcommand{\B}{\mathcal{B}}
\newcommand{\D}{\mathcal{D}}
\newcommand{\E}{\mathcal{E}}
\renewcommand{\H}{\mathcal{H}}
\newcommand{\I}{\mathcal{I}}
\newcommand{\J}{\mathcal{J}}
\newcommand{\M}{\mathcal{M}}
\newcommand{\N}{\mathcal{N}}
\renewcommand{\O}{\mathcal{O}}
\renewcommand{\P}{\mathcal{P}}
\newcommand{\Q}{\mathcal{Q}}
\newcommand{\R}{\mathcal{R}}
\newcommand{\T}{\mathcal{T}}
\renewcommand{\S}{\mathcal{S}}
\newcommand{\V}{\mathcal{V}}
\newcommand{\X}{\mathcal{X}}
\newcommand{\Z}{\mathcal{Z}}

\newcommand{\EE}{\mathbb{E}}
\renewcommand{\SS}{\mathbb{S}}
\newcommand{\ZZ}{\mathbb{Z}}

\newcommand{\PS}{\text{PS}}
\newcommand{\col}{\underline}

\DeclareMathOperator{\sign}{sign}
\DeclareMathOperator{\cov}{cov}
\let\var\relax
\DeclareMathOperator{\var}{var}
\DeclareMathOperator{\even}{even}

\def\obra#1{\mathinner{({#1}|}}
\def\oket#1{\mathinner{|{#1})}}
\def\obk#1{\mathinner{({#1})}}
\def\oop#1#2{\oket{#1}\!\obra{#2}}

\usepackage[inline]{enumitem} % in-line lists and \setlist{} (below)
\setlist[enumerate,1]{label={(\roman*)}} % default in-line numbering
\setlist{nolistsep} % more compact spacing between environments

%%% text markup
\usepackage{color} % text color
\newcommand{\red}[1]{{\color{red} #1}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\thispagestyle{fancy}

\title{Multilevel generalizations of collective spin dynamics and
  squeezing}%
\author{Michael A. Perlin}%
\date{\today}

\maketitle

\tableofcontents

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Collective SU($n$)-symmetric interactions}
\label{sec:int}

We consider a collection of $n$-level fermions on a 1-D lattice, with
a single-particle Hamiltonian
\begin{align}
  H_{\t{lat}} = -t \sum_{q,\mu} \cos\p{qa} c_{q\mu}^\dag c_{q\mu},
  \label{eq:H_lat}
\end{align}
where $t$ is the nearest-neighbor tunneling rate, $a$ is the spacing
between neighboring lattice sites, and $c_{q\mu}$ is the fermionic
annihilation operator for a particle in quasi-momentum mode $q$ with
internal state (e.g.~nuclear spin) $\mu$.  Under the frozen-mode
approximation, collective two-body SU($n$)-symmetric interactions
between these fermions take form
\begin{align}
  H_{\t{int}} = \f{u}{2} \sum_{p,q,\mu,\nu}
  \p{c_{p\mu}^\dag c_{q\nu}^\dag c_{q\nu} c_{p\mu}
    + c_{q\mu}^\dag c_{p\nu}^\dag c_{q\nu} c_{p\mu}},
\end{align}
where $u\equiv fU/N$ with $U$ the two-body on-site interaction energy,
$f$ the filling fraction of lattice sites, and $N$ the total number of
fermions.  Defining the spin operators
$S_{\mu\nu}^{(p)}\equiv c_{p\mu}^\dag c_{p\nu}$ for each
quasi-momentum $p$, we can alternately write
\begin{align}
  H_{\t{int}} = \f{u}{2} \sum_{p,q,\mu,\nu}
  \p{S_{\mu\mu}^{(p)} S_{\nu\nu}^{(q)} - S_{\mu\nu}^{(p)} S_{\nu\mu}^{(q)}}
  = \f{u}{2}\p{N^2 - \sum_{p,q,\mu,\nu}
    S_{\mu\nu}^{(p)} S_{\nu\mu}^{(q)}},
\end{align}
where $N$ is the total number of particles.  In the absence of
coherence between sectors of different particle number, we can neglect
the $\sim N^2$ term and simply write
\begin{align}
  H_{\t{int}}
  = - \f{u}{2} \sum_{p,q,\mu,\nu} S_{\mu\nu}^{(p)} S_{\nu\mu}^{(q)}.
\end{align}
In the case of SU(2), at this point we would expand the spin operators
$S_{\mu\nu}^{(p)}$ in terms of Pauli operators in order to convert
$H_{\t{int}}$ into an SU(2) spin Hamiltonian \cite{he2019engineering}.
To generalize this procedure to the case of SU($n$), we first define a
vector $\v S^{(p)}$ of all spin operators $S_{\mu\nu}^{(p)}$, and
write
\begin{align}
  H_{\t{int}}
  = - \f{u}{2} \sum_{p,q} {\v S^{(p)}}^\dag \c \v S^{(q)}
  = - \f{u}{2} \v\S^\dag \c \v\S,
  &&
  \v\S\equiv \sum_p \v S^{(p)}.
  \label{eq:H_int_spin}
\end{align}
In the bulk of this section, we identify various bases for the space
of linear operators on the Hilbert space $\H_n$ of an $n$-level
system.  For brevity, we denote this space of operators by
$\B\p{\H_n}$, and note that $\B\p{\H_n}$ is itself an
$n^2$-dimensional Hilbert space equipped with a trace
(Hilbert-Schmidt) inner product
\begin{align}
  \obk{\O|\Q} \equiv \tr\p{\O^\dag Q},
\end{align}
where $\oket{\Q}$ and $\obra{\O}$ respectively denote vectors in
$\B\p{\H_n}$ and its dual space $\B\p{\H_n}^*$.  Similarly to the set
of all spin operators $S_{\mu\nu}\equiv\op{\mu}{\nu}$ on the
single-particle Hilbert space at each quasi-momentum, all of the bases
we consider will be orthonormal with respect to the trace inner
product.  As we show in Appendix \ref{sec:changing_bases}, the
collective SU($n$)-symmetric interaction Hamiltonian in
\eqref{eq:H_int_spin} takes an identical form in any orthonormal basis
for $\B\p{\H_n}$.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Generalized Gell-Mann (GGM) operators}
\label{sec:ggm_ops}

The most obvious generalization of Pauli operators to the case of
SU($n$) are the {\it generalized Gell-Mann (GGM) operators}
\cite{hioe1981level, bertlmann2008bloch}, defined for
$j,k,\ell\in\set{0,1,\cdots,n-1}$ with $j<k$ and $\ell>0$ by
\begin{align}
  \lambda_0 \equiv \sqrt{\f{2}{n}}~ \1,
  &&
  \lambda_\ell \equiv \sqrt{\f{2}{\ell\p{\ell+1}}}
  \p{\sum_{n=0}^{\ell-1}\op{n} - \ell \op{\ell}},
  \label{eq:GGM_diag}
\end{align}
\begin{align}
  \lambda_{jk,\x} \equiv \op{j}{k} + \op{k}{j},
  &&
  \lambda_{jk,\y} \equiv i\p{\op{j}{k} - \op{k}{j}},
  \label{eq:GGM_off_diag}
\end{align}
where $\1$ is the identity operator.  The self-adjoint GGM operators
in \eqref{eq:GGM_diag} and \eqref{eq:GGM_off_diag} provide a complete
basis for the space of operators on the Hilbert space $\H_n$ of an
$n$-level system, coincide exactly with the Pauli operators in the
case of $n=2$, and satisfy the orthonormality condition
\begin{align}
  \obk{\lambda_a|\lambda_b} = 2\delta_{ab},
  \label{eq:GGM_inner}
\end{align}
where $a,b$ index any GGM operator in \eqref{eq:GGM_diag} or
\eqref{eq:GGM_off_diag}.  Denoting a vector of all GGM operators by
$\v\lambda$, we can therefore write (see Appendix
\ref{sec:changing_bases})
\begin{align}
  H_{\t{int}}
  = -\f{u}{4} \sum_{p,q} \v\lambda^{(p)} \c \v\lambda^{(q)}
  = -\f{u}{4} \v\Lambda \c \v\Lambda,
  &&
  \v\Lambda \equiv \sum_p \v\lambda^{(p)}.
  \label{eq:H_int_GGM}
\end{align}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Transition operators}
\label{sec:trans_ops}

The GGM operators in \eqref{eq:GGM_diag} and \eqref{eq:GGM_off_diag}
provide a convenient operator basis to describe dynamics obeying
SU($n$) symmetry.  An external driving field addressing $n$-level
nuclear spins, however, will generally violate SU($n$) symmetry, and
instead obeys the symmetries of the {\it polarization} or {\it
  transition operators} defined by \cite{kryszewski2006alternative,
  bertlmann2008bloch}
\begin{align}
  T_{LM}
  \equiv \sqrt{\f{2L+1}{2I+1}} \sum_{\mu,\nu}
  \bk{I\mu;LM|I\nu} \op{\nu}{\mu},
  \label{eq:trans_ops}
\end{align}
where $L\in\set{0,1,\cdots,n-1}$ and $M\in\set{-L,-L+1,\cdots,L}$
index a total spin and its projection onto a quantization axis;
$I\equiv\p{n-1}/2$ is the maximal angular momentum of an $n$-level
spin; $\mu,\nu\in\set{-I,-I+1,\cdots,I}$ index projections of an
$n$-level nuclear spin onto a quantization axis; and
$\bk{I\mu;LM|I\nu}$ is a Clebsch-Gordan coefficient.  The transition
operator $T_{LM}$ is closely related to the associated Legendre
polynomial $P_{LM}\p{x}$ for $x\in\sp{-1,1}$.  Operationally, $T_{LM}$
is proportional to the transition induced on a nuclear spin by the
absorption of a spin-$L$ boson with spin projection $M$ onto a
quantization axis.

Similarly to the GGM operators in \eqref{eq:GGM_diag} and
\eqref{eq:GGM_off_diag}, the transition operators in
\eqref{eq:trans_ops} provide a complete basis for the space of
operators on the Hilbert space $\H_n$ of an $n$-level system, and
satisfy the orthonormality condition
\begin{align}
  \obk{T_{LM}|T_{L'M'}} = \delta_{LL'} \delta_{MM'},
\end{align}
which implies
\begin{align}
  H_{\t{int}} = -\f{u}{2} \sum_{p,q} {\v T^{(p)}}^\dag \c \v T^{(q)}
  = -\f{u}{2} \v\T^\dag \c \v\T,
  &&
  \v\T \equiv \sum_p\v T^{(p)},
  \label{eq:H_int_trans}
\end{align}
where $\v T$ is a vector of all transition operators in
\eqref{eq:trans_ops}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Drive operators}
\label{sec:drive_ops}

Unlike the GGM operators in \eqref{eq:GGM_diag} and
\eqref{eq:GGM_off_diag}, the transition operators in
\eqref{eq:trans_ops} are not self-adjoint.  In order to express
Hamiltonians in terms of self-adjoint operators, we define the {\it
  drive operators}
\begin{align}
  D_{LM} \equiv \f{\eta_M}{\sqrt{2}}
  \sp{T_{LM} + \sign\p{M} T_{LM}^\dag},
  &&
  \eta_M \equiv
  \begin{cases}
    \sqrt{2} & M = 0 \\
    \p{-1}^M & M > 0 \\
    i & M < 0
  \end{cases},
  \label{eq:drive_ops}
\end{align}
for integer $M$ with $\abs{M}\le L$.  The drive operator $D_{LM}$ is
proportional to the Hamiltonian induced on a nuclear spin by an
external classical field of spin-$L$ particles with spin projection
$M$ onto a quantization axis.  Similarly to the GGM operators in
\eqref{eq:GGM_diag} and \eqref{eq:GGM_off_diag}, the drive operators
are proportional to the Pauli operators in the case of $n=2$, and
satisfy the orthonormality condition
\begin{align}
  \obk{D_{LM}|D_{L'M'}} = \delta_{LL'}\delta_{MM'},
\end{align}
which implies
\begin{align}
  H_{\t{int}} = -\f{u}{2} \sum_{p,q} \v D^{(p)}\c\v D^{(q)}
  = -\f{u}{2} \v\D \c \v\D,
  &&
  \v\D \equiv \sum_p \v D^{(p)},
  \label{eq:H_int_drive}
\end{align}
where $\v D$ is a vector of all drive operators in
\eqref{eq:drive_ops}.

The drive operators $D_{1,0}$ and $D_{1,\pm1}$ are proportional to the
Hamiltonians induced on an $n$-level spin by an external magnetic
field and a classical spin-polarized driving laser; loosely speaking,
one can associate
$\p{D_{1,0},D_{1,1},D_{1,-1}}\sim\p{S_\z,S_\x,S_\y}$, where $S_\alpha$
is a collective SU(2) spin-$\alpha$ operator for $\p{n-1}$ 2-level
spins \cite{perlin2020shorttime}.  More concretely, we can embed the
Hilbert space of a single $n$-level spin into the
permutationally-symmetric (Dicke) manifold of states for $\p{n-1}$
2-level spins via
\begin{align}
  \ket{\mu}_{\t{single}} \to \ket{I+\mu}_{\t{collective}}
  \propto S_+^{I+\mu} \ket\dn^{\otimes\p{n-1}},
  \label{eq:collective_embedding}
\end{align}
where $I\equiv\p{n-1}/2$ is a total spin,
$\mu\in\set{-I,-I+1,\cdots,I}$ indexes a state of the single $n$-level
spin, and $S_+$ is a collective spin-raising operator for $\p{n-1}$
2-level spins.  This embedding takes
\begin{align}
  \xi_1 \times \p{D_{1,0}, D_{1,1}, D_{1,-1}}
  \to \p{S_\z, S_\x, S_\y},
  \label{eq:spin_ops}
\end{align}
where
\begin{align}
  \xi_L
  \equiv \sqrt{2L+1}\, \f{L!}{\p{2L+1}!}
  \sp{\prod_{\ell=-L}^L\p{n+\ell}}^{1/2},
  \label{eq:scale_fac}
\end{align}
is a scale factor that will appear frequently in the theory of drive
operators.  Some other useful relations between drive and spin
operators are
\begin{align}
  \xi_2 D_{2,0} \to -\f12\p{S_\x^2 + S_\y^2} + \f{n^2-1}{12},
  \label{eq:spin_ops_2_0}
\end{align}
\begin{align}
  \sqrt{3}\, \xi_2 D_{2,2} \to \f12\p{S_\x^2 - S_\y^2},
  &&
  \sqrt{3}\, \xi_2 D_{2,1} \to \f12\p{S_\z S_\x + S_\x S_\z}.
  \label{eq:spin_ops_2_12}
\end{align}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Weyl operators}

Weyl operators \cite{bertlmann2008bloch} and self-adjoint linear
combinations thereof \cite{asadian2016heisenbergweyl} also provide an
interesting basis of operators for finite-dimensional Hilbert spaces.
These operators are related to the notions of position, momentum, and
phase-space displacement in a discrete space.  As our present work is
motivated by multilevel systems that are realized with nuclear spin
(angular momentum) degrees of freedom, however, the transition and
drive operators are more natural to use than the Weyl operators, so we
will not discuss Weyl operators any further.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Subsystem permutations and the permutationally symmetric
  manifold}
\label{sec:perm_ops}

For our final re-expression of collective SU($n$)-symmetric
interactions, we abandon the use of single-spin operators entirely to
express the interaction Hamiltonian $H_{\t{int}}$ in terms of
operators that permute tensor factors (subsystems) of a Hilbert space
with an $N$-fold tensor product structure (e.g.~an array of nuclear
spins).  Specifically, we denote the Hilbert space of an $n$-level
system by $\H_n$, denote its $N$-fold tensor product by
$\H_n^{\otimes N}$, and identify the set $\Pi\equiv\set{\Pi_s}$ of
operators that permute tensor factors of $\H_n^{\otimes N}$ according
to elements $s\in\SS_N$ of the symmetric group of order $N$.  We then
expand
\begin{align}
  H_{\t{int}}
  = -\f{u}{2} \sum_{p,q,\mu,\nu} S_{\mu\nu}^{(p)} S_{\nu\mu}^{(q)}
  = -u\sum_{\substack{p<q\\\mu,\nu}} S_{\mu\nu}^{(p)} S_{\nu\mu}^{(q)}
  - \f{u}{2} \sum_{p,\mu,\nu} S_{\mu\nu}^{(p)} S_{\nu\mu}^{(p)},
  \label{eq:H_int_perm_start}
\end{align}
where the first sum,
\begin{align}
  \sum_{\substack{p<q\\\mu,\nu}} S_{\mu\nu}^{(p)} S_{\nu\mu}^{(q)}
  = \sum_{\substack{p<q\\\mu,\nu}} \op{\mu}{\nu}^{(p)} \op{\nu}{\mu}^{(q)}
  = \sum_{\substack{p<q\\\mu,\nu}} \op{\mu\nu}{\nu\mu}^{(p,q)}
  = \sum_{p<q} \Pi_{pq}
  \label{eq:spin_perm}
\end{align}
is simply a sum over all permutations $\Pi_{pq}$ of subsystems $p$ and
$q$; and the second sum,
\begin{align}
  \sum_{p,\mu,\nu} S_{\mu\nu}^{(p)} S_{\nu\mu}^{(p)}
  = \sum_{p,\mu,\nu} \op{\mu}{\nu}^{(p)} \op{\nu}{\mu}^{(p)}
  = n \sum_{p,\mu} \op{\mu}{\mu}^{(p)}
  = n \sum_p \1^{(p)}
  = n N,
  \label{eq:spin_const}
\end{align}
is merely a constant.  Substituting \eqref{eq:spin_perm} and
\eqref{eq:spin_const} into \eqref{eq:H_int_perm_start} yields
\begin{align}
  H_{\t{int}} = -u \sum_{p<q} \Pi_{pq} - \f12 N n u
  \simeq -u\sum_{p<q} \Pi_{pq},
  \label{eq:H_int_perm}
\end{align}
where $\simeq$ denotes equality up to an overall constant with no
physical consequence.  The form of the interaction Hamiltonian
$H_{\t{int}}$ makes it evident that its ground-state manifold
$\M_{\PS}$ is the set of {\it permutationally symmetric} (PS) states
that have eigenvalue 1 with respect to all pairwise permutation
operators $\Pi_{pq}$.  The PS manifold $\M_\PS$ is spanned by a basis
$\set{\ket{\v m}}$ of PS states that can be uniquely identified by a
list of integers $\v m\equiv\p{m_0,m_1,\cdots,m_{n-1}}\in\ZZ_{N+1}^n$,
where $m_s$ indicates the total occupation number of subsystem state
$s$, and $\sum_sm_s=N$.  In the case of $n=2$, the PS manifold
$\M_\PS$ is precisely the Dicke manifold \cite{dicke1954coherence} of
$N$ qubits, spanned by Dicke states $\set{\ket{m_0,m_1}}$ for which
$m_0+m_1=N$ and the integer $m_0$ ($m_1$) indicates the total
occupation number of qubit state $\ket{0}$ ($\ket{1}$).  The dimension
of PS manifold $\M_\PS$ is determined by the number of ways to assign
$N$ subsystems to $n$ states, which is ${N+n-1 \choose n-1}$.  The
energy of any PS state $\ket{\psi_\PS}\in\M_\PS$ with respect to the
interaction Hamiltonian $H_{\t{int}}$ in \eqref{eq:H_int_perm} is
$-u{N \choose 2}=-\p{1/2}N\p{N-1}u$.

In addition to the fact that the PS manifold $\M_\PS$ is ground-state
manifold of the interaction Hamltonian $H_{\t{int}}$, an important
feature of $\M_\PS$ is its closure under the action of collective
operators of the form $\Q=\sum_pQ^{(p)}$, as well as linear
combinations and products thereof.  Closure of $\M_\PS$ under
collective the action of collective operators, and in particular under
collective dynamics, is a straightforward consequence of the
permutational symmetry obeyed by these operators.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{External drive and spin-orbit coupling}
\label{sec:drive_SOC}

A driving laser addressing spin-1/2 fermions on a 1-D lattice will
induce the Hamiltonian
\begin{align}
  \left. H_{\t{drive}}^{(\phi)} \right|_{n=2}
  = \f12 \Omega \sum_j
  \p{e^{i\phi j} c_{j,\up}^\dag c_{j,\dn}
    + e^{-i\phi j} c_{j,\dn}^\dag c_{j,\up}},
  \label{eq:H_drive_2}
\end{align}
where $\Omega$ is a (real) driving amplitude, $j\in\mathbb{Z}$ indexes
a lattice site, and $\phi$ is the relative phase of the drive between
adjacent lattice sites.  The multilevel analogue of
\eqref{eq:H_drive_2} is
\begin{align}
  H_{\t{drive}}^{(\phi)}
  = -\f12 \tilde\Omega \sum_j \p{e^{i\phi j} T_{1,1}^{(j)}
    + e^{-i\phi j} T_{1,1}^{(j)\dag}}
  = \Omega \D_{1,1}^{(\phi)},
  &&
  \Omega \equiv \tilde \Omega \xi_1,
  \label{eq:H_drive}
\end{align}
where we define the re-scaled driving amplitude $\tilde\Omega$ for
convenience, and
\begin{align}
  \D_{LM}^{(\phi)}
  \equiv \sum_j \sp{\cos\p{M\phi j} D_{LM}^{(j)}
    - \sin\p{M\phi j} D_{L,-M}^{(j)}},
  \label{eq:drive_rot}
\end{align}
is an inhomogeneously rotated collective drive operator.  We can make
this drive spatially homogenous via the gauge transformation
$c_{j\mu}^\dag \to e^{-i\mu\phi j} c_{j\mu}^\dag$, which takes
 \begin{align}
   H_{\t{drive}}^{(\phi)} \to H_{\t{drive}} = \Omega \D_{1,1},
   &&
   \D_{LM} \equiv \D_{LM}^{(0)} = \sum_j D_{LM}^{(j)}.
\end{align}
The SU($n$) symmetry of collective interactions considered in this
work implies that the interaction Hamiltonian $H_{\t{int}}$ in
\eqref{eq:H_int_perm} is unaffected by this gauge transformation.  The
single-particle Hamiltonian $H_{\t{lat}}$ in \eqref{eq:H_lat},
however, transforms as (see Appendix \ref{sec:lat_drive})
\begin{align}
  H_{\t{lat}}
  \to H_{\t{lat}}^{(\phi)}
  = -t \sum_{q,\mu} \cos\p{qa+\mu\phi} c_{q\mu}^\dag c_{q\mu}
  = \sum_{q,L} B_L^{(\phi,q)} D_{L,0}^{(q)},
  \label{eq:H_lat_SOC_B}
\end{align}
with effective inhomogeneous driving field amplitudes
\begin{align}
  B_L^{(\phi,q)} = -t w_L\p{qa} A_L^{(\phi)},
  \label{eq:B_L_phi}
\end{align}
where
\begin{align}
  w_L\p{\theta} \equiv
  \begin{cases}
    \cos\theta & L~\t{even} \\
    \sin\theta & L~\t{odd}
  \end{cases},
  &&
  A_L^{(\phi)} \equiv \p{-1}^L \sqrt{\f{2L+1}{2I+1}}
  \sum_\mu \bk{I\mu;L,0|I\mu} w_L\p{\mu\phi}.
  \label{eq:A_L_phi}
\end{align}
The multilevel spin-orbit coupling (SOC) exhibited by the
singe-particle Hamiltonian $H_{\t{lat}}^{(\phi)}$ thus allows for the
simulation of synthetic gauge fields with large spin ($L>1$).  As we
will see in Section \ref{sec:drive_raman}, multi-laser drives can also
simulate synthetic large-spin fields with non-zero spin projection
($M\ne0$) onto a quantization axis.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Perturbative treatment of spin-orbit coupling}
\label{sec:pert_SOC}

The single-particle Hamiltonian $H_{\t{lat}}^{(\phi)}$ breaks
permutational symmetry, thereby coupling states within the PS manifold
$\M_\PS$ to states outsides it.  If SOC is sufficiently weak, however,
transitions outside the PS manifold $\M_\PS$ are energetically
suppressed by interactions, and we can account for the effect of SOC
perturbatively.  In the regime of weak SOC with $\abs{\phi}\ll1$, by
considering
\begin{enumerate*}
\item all $L\le12$ for arbitrary $n$, and
\item all $L<n$ for all $n\le25$
\end{enumerate*}
(and conjecturing the same functional form for all $L$ and $n$), we
find that
% expand Clebsch-Gordan coefficients in a power series according to
% \url{functions.wolfram.com/07.38.06.0008.01}
\begin{align}
  A_L^{(\phi)}
  = \p{-1}^{L+\lfloor L/2\rfloor} \xi_L \phi^L + O\p{\phi^{L+2}},
  \label{eq:A_L_phi_small}
\end{align}
where $\xi_L$ is a scale factor defined in \eqref{eq:scale_fac}.  A
perturbative treatment of SOC through second order in the SOC angle
$\phi$ yields the following effective Hamiltonian in the fully
symmetric manifold $\M_\PS$ (see Appendix \ref{sec:SOC_pert}):
\begin{align}
  H_{\t{eff}} = H_{\t{eff}}^{(1)} + H_{\t{eff}}^{(2)},
\end{align}
\begin{align}
  H_{\t{eff}}^{(1)}
  &= \phi t \, \EE_p\sp{\sin\p{pa}} \xi_1 \D_{1,0}
  + \phi^2 t \, \EE_q\sp{\cos\p{qa}} \xi_2 \D_{2,0}
  + O\p{\phi^3},
  \label{eq:H_eff_1_phi} \\
  H_{\t{eff}}^{(2)}
  &= \f{\phi^2 t^2}{\p{N-1}fU} \var_q\sp{\sin\p{qa}}
  \p{\xi_1^2 \D_{1,0}^2 - 2 N \xi_2 \D_{2,0}}
  + O\p{\phi^3},
  \label{eq:H_eff_2_phi}
\end{align}
where
\begin{align}
  \EE_q\sp{X_q} \equiv \f1N \sum_q X_q,
  &&
  \var_q\sp{X_q} \equiv \EE_q\sp{\p{X_q-\EE_k\sp{X_k}}}
  = \EE_q\sp{X_q^2}-\EE_k\sp{X_k}^2,
\end{align}
are the mean and variance of $X_q$ over all occupied quasi-momenta
$q$.  In the case of SU(2), the effective Hamiltonians in
\eqref{eq:H_eff_1_phi} and \eqref{eq:H_eff_2_phi} reduce to the
spin-squeezing Hamiltonians derived in Ref.~\cite{he2019engineering}.
To facilitate comparison, we note that in the case of SU(2) the
re-scaled drive operator $\xi_1\D_{1,0}$ is precisely the collective
spin-$z$ operator $S_\z$ that appears in
Ref.~\cite{he2019engineering}.  Furthermore, drive operators $D_{LM}$
vanish when $L\ge n$, so in the case of SU(2) the operator $\D_{2,0}$
has no contribution to the effective Hamiltonians in
\eqref{eq:H_eff_1_phi} and \eqref{eq:H_eff_2_phi}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Raman drive}
\label{sec:drive_raman}

Rather than coupling the states of a multilevel system directly with a single driving laser, as in Section \ref{sec:drive_SOC}, we now consider coupling through an off-resonant Raman transition to a highly excited state.
Specifically, we consider a three-laser drive of the form
\begin{align}
  H_{\t{Raman,bare}}^{(\phi)}
  = \sum_j \sum_{m\in\set{1,0,-1}} \Omega_m \p{e^{i\phi_m j}
    T_{1,m}^{(j)} \otimes \op{\up}{\dn} + \t{h.c.}}
  + \f{\Delta}{2} \1 \otimes \p{\op{\up} - \op{\dn}},
  \label{eq:raman_bare}
\end{align}
where $j$ indexes a lattice site, $\Omega_m$ is a (real) driving amplitude; $\phi_m$ is the relative phase of drive $m$ between adjacent lattice sites; $\op{r}{s}$ for $r,s\in\set{\up,\dn}$ is a pseudo-spin operator for the auxiliary degree of freedom that is off-resonantly addressed by the lasers; $\Delta$ is a detuning of the lasers from the energy of an excited state; and $\1$ is the identity operator.
If the detuning is large, $\abs{\Delta}\gg\abs{\Omega_m}$, then at second order in perturbation theory the effective action of $H_{\t{Raman,bare}}^{(\phi)}$ within the $\ket{\dn}$-state manifold takes the form
\begin{align}
  H_{\t{Raman}}^{(\phi)}
  = \sum_{\tau\in\set{0,1,2}} H_{\t{Raman},\tau}^{(\phi)}
\end{align}
where $H_{\t{Raman},\tau}^{(\phi)}$ generates nuclear spin transitions $\mu\to\mu\pm\tau$:
\begin{align}
  H_{\t{Raman},0}^{(\phi)}
  &= -\sum_j\sum_m \f{\Omega_m^2}{\Delta}
  T_{1,m}^{(j)\dag} T_{1,m}^{(j)},
  \label{eq:raman_0} \\
  H_{\t{Raman},1}^{(\phi)}
  &= -\sum_j\sum_{s\in\set{\pm1}}
  \f{\Omega_0\Omega_s}{\Delta} e^{i\p{\phi_s-\phi_0} j}
  T_{1,0}^{(j)\dag} T_{1,s}^{(j)} + \t{h.c.},
  \\
  H_{\t{Raman},2}^{(\phi)}
  &= -\sum_j\sum_{s\in\set{\pm1}}
  \f{\Omega_+\Omega_-}{\Delta} e^{i\p{\phi_s-\phi_{-s}}j}
  T_{1,-s}^{(j)\dag} T_{1,s}^{(j)}.
  \label{eq:raman_2}
\end{align}
In terms of the drive operators, we can expand
\begin{align}
  H_{\t{Raman}}^{(\phi)}
  = \sum_j \sum_{\substack{L\le2\\\abs{M}\le L}}
  \Omega_{LM}^{(\phi,j)} D_{LM}^{(j)},
  \label{eq:raman_drive}
\end{align}
where the coefficients $\Omega_{LM}^{(\phi,j)}$ are provided in Appendix \ref{sec:drive_raman_coeff}.
If the driving lasers are phase-matched with $\phi_m=m\phi$, such that a nuclear spin transition $\mu\to\mu+m$ on site $j$ imprints the phase $m\phi j$, then the drive $H_{\t{Raman}}^{(\phi)}$ takes the form
\begin{align}
  \left. H_{\t{Raman}}^{(\phi)} \right|_{\phi_m=m\phi}
  = \sum_{\substack{L\le2\\0\le M\le L}}
  \Omega_{LM} \D_{LM}^{(\phi)},
  \label{eq:drive_raman_matched}
\end{align}
with rotated collective drive operators $\D_{LM}^{(\phi)}$ defined in \eqref{eq:drive_rot} and uniform driving amplitudes $\Omega_{LM}$ provided in Appendix \ref{sec:drive_raman_coeff}.
Similarly to the case of a direct drive considered in Section \ref{sec:drive_SOC}, the Raman drive $H_{\t{Raman}}^{(\phi)}$ in \eqref{eq:drive_raman_matched} can be made homogenous through the gauge transformation $c_{j\mu}^\dag \to e^{-i\mu\phi j} c_{j\mu}^\dag$, which takes
\begin{align}
  \left. H_{\t{Raman}}^{(\phi)} \right|_{\phi_m=m\phi}
  \to H_{\t{Raman}}
  = \sum_{\substack{L\le2\\0\le M\le L}} \Omega_{LM} \D_{LM}.
\end{align}
Writing $H_{\t{Raman}} = \sum_j H_{\t{Raman}}^{\t{single},j}$, where $H_{\t{Raman}}^{\t{single},j}$ denotes the action of $H_{\t{Raman}}^{\t{single}}$ on spin $j$, we can expand
\begin{align}
  H_{\t{Raman}}^{\t{single}} \times \Delta
  = h_+ h_- S_\z + h_0 h_+ S_\x
  + h_0 h_- \p{S_\z S_\x  + S_\x S_\z}
  + \p{h_0^2 - h_-^2} S_\x^2 + \p{h_0^2 - h_+^2} S_\y^2,
\end{align}
where $\v S = \p{S_\z,S_\x,S_\y} \equiv \xi_1\times\p{D_{1,0},D_{1,1},D_{1,-1}}$ is the standard $\mathfrak{su}(2)$ subalgebra of the operators on a single $n$-level spin, and
\begin{align}
  h_0 \equiv \xi_1^{-1}\, \Omega_0,
  &&
  h_\pm \equiv \xi_1^{-1}\, \f{\Omega_+\pm\Omega_-}{\sqrt{2}}.
\end{align}
Tuning the amplitudes $\Omega_0,\Omega_+,\Omega_-$, or equivalently $h_0,h_+,h_-$, enables us to implement various drive Hamiltonians, several of which are shown in Table \ref{tab:drives}.

\begin{table}
  \centering
  \caption{Drive Hamiltonians that can be implemented with various amplitude-matching conditions.}
  \begin{tabular}{c|c|c}
    Condition & $\p{h_0,h_+,h_-}/h$
    & $H_{\t{Raman}}^{\t{single}}/\p{h^2/\Delta}$
    \\ \hline\hline
    $\Omega_0=\pm\Omega_+=\pm\Omega_-$ & $\p{1,\pm\sqrt{2},0}$
    & $\pm\sqrt{2} S_\x + \p{S_\x^2 - S_\y^2}$
    \\ \hline
    $\Omega_0=\pm\Omega_+=\mp\Omega_-$ & $\p{1,0,\pm\sqrt{2}}$
    & $\pm\sqrt{2}\p{S_\z S_\x + S_\x S_\z} - \p{S_\x^2-S_\y^2}$
    \\ \hline
    $\Omega_0=\Omega_\mp=0$ & $\p{0,1,\pm1}$
    & $\pm S_\z + S_\z^2 - \v S^2$
    \\ \hline
    $\sqrt{2}\Omega_0=\pm\Omega_+=\pm\Omega_-$
    & $\p{1,\pm1,0}$ & $\pm S_\x + S_\x^2$
    \\ \hline
    $\sqrt{2}\Omega_0=\pm\Omega_+=\mp\Omega_-$
    & $\p{1,0,\pm1}$ & $\pm\p{S_\z S_\x+S_\x S_\z} + S_\y^2$
    \\ \hline
    $\Omega_+=\Omega_-=0$ & $\p{1,0,0}$ & $-S_\z^2 + \v S^2$
    \\ \hline
    $\Omega_0=0$,  $\Omega_+=+\Omega_-$ & $\p{0,1,0}$ & $-S_\y^2$
    \\ \hline
    $\Omega_0=0$,  $\Omega_+=-\Omega_-$ & $\p{0,0,1}$ & $-S_\x^2$
  \end{tabular}
  \label{tab:drives}
\end{table}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Periodic drive}

We now consider the effect of applying periodic drive of the form
\begin{align}
  H_{\t{pd}}\p{t} = \sum_p \chi_p \omega \cos\p{\omega t} S_\z^{(p)},
\end{align}
where $\omega$ is a driving frequency, $\chi_p$ is a dimensionless
driving amplitude for spin $p$, and
$S_\z^{(p)} \equiv \xi_1 D_{1,0}^{(p)}$ with $\xi_1$ defined in
\eqref{eq:scale_fac}.  The periodic drive $H_{\t{pd}}\p{t}$ can be
implemented directly using external magnetic fields or driving lasers.
Transition operators $T_{LM}$ transform under rotations generated by
the drive operator $S_\z$ as
\begin{align}
  e^{i\phi S_\z} T_{LM} e^{-i\phi S_\z} = e^{iM\phi} T_{LM}.
\end{align}
If we move into the rotating frame of the drive, then the interaction
Hamiltonian transforms as
\begin{align}
  H_{\t{int}} \to \tilde H_{\t{int}}
  \equiv U_{\t{pd}}\p{t}^\dag H_{\t{int}} U_{\t{pd}}\p{t}
\end{align}
where
\begin{align}
  U_{\t{pd}}\p{t} \equiv \exp\sp{-i\int_0^td\tau\,H_{\t{pd}}\p{\tau}}
  = \prod_p \exp\sp{-i \chi_p \sin\p{\omega t} S_\z^{(p)}}.
\end{align}
Expanding the interaction Hamiltonian $H_{\t{int}}$ in terms of
transition operators $T_{LM}$, we find that
\begin{align}
  \tilde H_{\t{int}}
  = -\f{u}{2} \sum_{p,q,L,M} e^{iM\p{\chi_q-\chi_p}\sin\p{\omega t}}
  T_{LM}^{(p)\dag} T_{LM}^{(q)}
  = -\f{u}{2} \sum_{p,q,L,M,n}
  \J_n\p{M\sp{\chi_q-\chi_p}} e^{in\omega t}
  T_{LM}^{(p)\dag} T_{LM}^{(q)},
\end{align}
where $\J_n$ is the $n$-th order Bessel function of the first kind.
If the drive frequency $\omega$ is much larger than the interaction
strength $u$, i.e.~$\omega\gg u$, then we can neglect oscillating
terms with $n\ne0$, arriving at
\begin{align}
  \tilde H_{\t{int}} \approx -\f{u}{2} \sum_{p,q,L,M}
  \J_0\p{M\sp{\chi_q-\chi_p}}
  T_{LM}^{(p)\dag} T_{LM}^{(q)}.
\end{align}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Possible future directions}

\begin{itemize}
\item Visualization of multilevel states
  \begin{itemize}
  \item Single-particle eigenstates of drive operators
  \item Single-particle dynamics induced by drive operators
  \item Collective states and dynamics
  \end{itemize}
\item Implications of SOC
  \begin{itemize}
  \item Special angles $\phi$?
  \end{itemize}
\item Different (more realistic / general) drives
\item Generalizations of squeezing beyond SU(2)?
\item Consider different interactions
  \begin{itemize}
  \item Include electronic states
  \item Super-exchange regime
  \item Non-uniform (local / disordered) interactions
  \end{itemize}
\end{itemize}

\appendix

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Changing operator bases for SU($n$)-symmetric interactions}
\label{sec:changing_bases}

Here we show that the collective interaction Hamiltonian in
\eqref{eq:H_int_spin} takes an identical form in any orthonormal basis
for $\B\p{\H_n}$, i.e.~the space of linear operators on the Hilbert
space $\H_n$ of an $n$-level system, equipped with the trace
(Hilbert-Schmidt) inner product
\begin{align}
  \obk{\O|\Q} \equiv \tr\p{\O^\dag \Q}.
\end{align}
To maintain generality, we choose an arbitrary basis
$X\equiv\set{X_j}$ for $\B\p{\H_n}$ that satisfies the orthonormality
condition
\begin{align}
  \obk{X_j|X_k} = \N_X \delta_{jk},
\end{align}
for $j\in\set{0,1,\cdots,n^2-1}$.  This orthonormality condition
implies that we can resolve the identity (super-)operator $\I$ with
$\I\oket{\O}=\oket{\O}$ for any $\oket\O\in\B\p{\H_n}$ as
\begin{align}
  \I = \f1{\N_X} \sum_j \oop{X_j}{X_j}
  = \f1{\N_X} \sum_j \oop{X_j^\dag}{X_j^\dag},
\end{align}
where we used the fact that $X^\dag\equiv\set{X_j^\dag}$ is also an
orthonormal basis for $\B\p{\H_n}$, satisfying the same orthonormality
condition as $X$; these two bases are transformed into each other by
unitary $\sum_j\oop{X_j^\dag}{X_j}/\N_X$.

The collective interaction Hamiltonian in \eqref{eq:H_int_spin} takes
the form
\begin{align}
  H = \sum_{p,q,j} X_j^{(p)} X_j^{(q)\dag},
\end{align}
which essentially consists of single-body terms ($p=q$) and two-body
interactions ($p\ne q$) of the form
\begin{align}
  \sum_j X_j X_j^\dag,
  &&
  \sum_j X_j \otimes X_j^\dag.
\end{align}
Choosing an arbitrary orthonormal basis $Y\equiv\set{Y_j}$ for
$\B\p{\H_n}$ with corresponding norm $\N_Y$, we can expand
\begin{align}
  X_j = \f1{\N_Y} \sum_k Y_k \obk{Y_k|X_j},
  &&
  X_j^\dag = \f1{\N_Y} \sum_k Y_k^\dag \obk{Y_k^\dag|X_j^\dag}
  = \f1{\N_Y} \sum_k Y_k^\dag \obk{X_j|Y_k},
\end{align}
where we used the fact that
\begin{align}
  \obk{Y_k^\dag|X_j^\dag}
  = \tr\p{Y_k X_j^\dag}
  = \tr\p{X_j^\dag Y_k}
  = \obk{X_j|Y_k}.
\end{align}
Denoting an arbitrary bilinear operation by $\odot$, by resolution of
the identity we therefore find
\begin{align}
  \sum_j X_j \odot X_j^\dag
  = \f1{\N_Y^2} \sum_{j,k,\ell} Y_k \obk{Y_k|X_j}
  \odot Y_\ell^\dag \obk{X_j|Y_\ell}
  = \f{\N_X}{\N_Y^2} \sum_{k,\ell} Y_k \odot Y_\ell^\dag
  \obk{Y_k|\I|Y_\ell}
  = \f{\N_X}{\N_Y} \sum_k Y_k \odot Y_k^\dag,
\end{align}
which in particular implies that
\begin{align}
  \sum_j X_j X_j^\dag
  = \f{\N_X}{\N_Y} \sum_k Y_k Y_k^\dag,
  &&
  \sum_j X_j \otimes X_j^\dag
  = \f{\N_X}{\N_Y} \sum_k Y_k \otimes Y_k^\dag,
\end{align}
and in turn
\begin{align}
  H = \f{\N_X}{\N_Y} \sum_{p,q,j} Y_j^{(p)} {Y_j^{(q)}}^\dag.
\end{align}
The collective interaction Hamiltonian in \eqref{eq:H_int_spin} thus
takes an identical form in any orthonormal basis for the space
$\B\p{\H_n}$ of linear operators on the Hilbert space $\H_n$ of an
$n$-level system, up to appropriate rescaling factors $\N_X/\N_Y$.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Spin-orbit coupling with drive operators}
\label{sec:lat_drive}

Here we derive the drive-operator ($D_{LM}$) expansion of the
spin-orbit coupled Hamiltonian $H_{\t{lat}}^{(\phi)}$ in
\eqref{eq:H_lat_SOC_B}.  In the basis of spin operators
$S_{\mu\mu}^{(q)} \equiv c_{q\mu}^\dag c_{q\mu}$, this Hamiltonian
takes the form
\begin{align}
  H_{\t{lat}}^{(\phi)}
  = -t \sum_{q,\mu} \cos\p{qa+\mu\phi} S_{\mu\mu}^{(q)}
  \label{eq:H_lat_spin}
\end{align}
Defining the diagonal operators
\begin{align}
  \tilde d_{\phi+} \equiv \sum_\mu \cos\p{\mu\phi} S_{\mu\mu},
  &&
  \tilde d_{\phi-} \equiv \sum_\mu \sin\p{\mu\phi} S_{\mu\mu},
\end{align}
which are respectively even and odd under spin inversion
($\mu\to-\mu$), we can expand
\begin{align}
  \sum_\mu \cos\p{qa+\mu\phi} S_{\mu\mu}
  = \cos\p{qa} \tilde d_{\phi+} - \sin\p{qa} \tilde d_{\phi-},
\end{align}
and resolve the identity (super-)operator $\I$ with
$\I \tilde d_{\phi\pm} = \tilde d_{\phi\pm}$ in the basis of the drive operators
$D_{LM}$ (see Appendix \ref{sec:changing_bases}), finding
\begin{align}
  \sum_\mu \cos\p{qa+\mu\phi} S_{\mu\mu}
  = \cos\p{qa} \f12 \sum_{L,M} \obk{\tilde d_{\phi+}|D_{LM}} D_{LM}
  - \sin\p{qa} \f12 \sum_{L,M} \obk{\tilde d_{\phi-}|D_{LM}} D_{LM}.
\end{align}
We now note that the drive operators $D_{LM}$ are strictly
off-diagonal for $M\ne0$, and furthermore that $D_{L,0}$ with even
(odd) $L$ is even (odd) under spin inversion, which implies
\begin{align}
  \sum_{L,M} \obk{\tilde d_{\phi+}|D_{LM}} D_{LM}
  = \sum_{L\,\t{even}} \obk{\tilde d_{\phi+}|D_{L,0}} D_{L,0},
\end{align}
and likewise with $\tilde d_{\phi-}$ and odd $L$.  In total, we can
write
\begin{align}
  \sum_\mu \cos\p{qa+\mu\phi} S_{\mu\mu}
  = \cos\p{qa} \f12 \sum_{L\,\t{even}}
  \obk{\tilde d_{\phi+}|D_{L,0}} D_{L,0}
  - \sin\p{qa} \f12 \sum_{L\,\t{odd}}
  \obk{\tilde d_{\phi-}|D_{L,0}} D_{L,0},
\end{align}
or, more compactly,
\begin{align}
  \sum_\mu \cos\p{qa+\mu\phi} S_{\mu\mu}
  = \sum_L w_L\p{qa} A_L^{(\phi)} D_{L,0},
  &&
  w_L\p{\theta} \equiv
  \begin{cases}
    \cos\theta & L~\t{even} \\
    \sin\theta & L~\t{odd}
  \end{cases},
  \label{eq:compact_SOC_drive}
\end{align}
with effective driving field amplitudes
\begin{align}
  A_L^{(\phi)}
  \equiv \p{-1}^L \f12 \obk{\tilde d_{\phi,\p{-1}^L}|D_{L,0}}
  = \p{-1}^L \sqrt{\f{2L+1}{2I+1}}
  \sum_\mu \bk{I\mu;L,0|I\mu} w_L\p{\mu\phi}.
\end{align}
Substituting the result in \eqref{eq:compact_SOC_drive} into the
single-particle Hamiltonian in \eqref{eq:H_lat_spin} yields
\begin{align}
  H_{\t{lat}}^{(\phi)} = \sum_{q,L} B_L^{(\phi,q)} D_{L,0}^{(q)},
  &&
  B_L^{(\phi,q)} \equiv -J
  w_L\p{qa} A_L^{(\phi)}.
\end{align}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Transition operator product expansion}
\label{sec:trans_prod}

Here we derive multiplication rules for transition operators on an $n$-dimensional Hilbert space, which allows us to expand
\begin{align}
  T_{\ell_1 m_1} T_{\ell_2 m_2}
  = \sum_{L,M} f_{\ell_1 m_1;\ell_2 m_2}^{LM} T_{LM},
\end{align}
with structure constants
\begin{align}
  f_{\ell_1 m_1;\ell_2 m_2}^{LM}
  \equiv \obk{T_{LM} | T_{\ell_1 m_1} T_{\ell_2 m_2}}
  = \tr\p{T_{LM}^\dag T_{\ell_1 m_1} T_{\ell_2 m_2}}.
  \label{eq:trans_struct_start}
\end{align}
For reference, the transition operators $T_{LM}$ are defined for
integers $L,M$ with $0\le L<n$ and $\abs{M}\le L$ in terms of
Clebsch-Gordan coefficients $\bk{\ell_1 m_1;\ell_2 m_2|\ell_3 m_3}$ by
\begin{align}
  T_{LM} \equiv \sqrt{\f{2L+1}{2I+1}}
  \sum_{\mu,\nu} \bk{I\mu;LM|I\nu} \op{\nu}{\mu},
  &&
  I \equiv \f{n-1}{2}.
\end{align}
Using the symmetry properties of Clebsch-Gordan coefficients, namely
\begin{align}
  \bk{\ell_1 m_1; \ell_2 m_2| \ell_3 m_3}
  &= \p{-1}^{\ell_2+m_2} \sqrt{\f{2\ell_3+1}{2\ell_1+1}}
  \bk{\ell_3,-m_3; \ell_2 m_2| \ell_1,-m_1} \\
  \bk{\ell_1 m_1; \ell_2 m_2| \ell_3 m_3}
  &= \p{-1}^{\ell_1+\ell_2-\ell_3}
  \bk{\ell_1,-m_1; \ell_2,-m_2| \ell_3,-m_3},
\end{align}
we can find that
\begin{align}
  T_{LM}^\dag
  = \sqrt{\f{2L+1}{2I+1}}
  \sum_{\mu,\nu} \p{-1}^M \bk{I\nu;L,-M|I\mu} \op{\mu}{\nu}
  = \p{-1}^M T_{L,-M}.
\end{align}
Substituting this result into \eqref{eq:trans_struct_start} and
expanding Clebsch-Gordan coefficients in terms of Wigner 3-$j$ symbols
as
\begin{align}
  \bk{\ell_1 m_1; \ell_2 m_2| \ell_3 m_3}
  = \p{-1}^{-\ell_1+\ell_2-m_3} \sqrt{\p{2\ell_3+1}}
  \begin{pmatrix}
    \ell_1 & \ell_2 & \ell_3 \\
    m_1 & m_2 & -m_3
  \end{pmatrix},
\end{align}
we find that
\begin{multline}
  f_{\ell_1 m_1;\ell_2 m_2}^{LM}
  = \delta_{M,m_1+m_2}
  \p{-1}^M \sqrt{\p{2L+1}\p{2\ell_1+1}\p{2\ell_2+1}} \\
  \times \sum_{\mu,\nu,\rho} \p{-1}^{-3I+L+\ell_1+\ell_2-\mu-\nu-\rho}
  \begin{pmatrix}
    I & L & I \\
    \mu & -M & -\nu
  \end{pmatrix}
  \begin{pmatrix}
    I & \ell_1 & I \\
    \nu & m_1 & -\rho
  \end{pmatrix}
  \begin{pmatrix}
    I & \ell_2 & I \\
    \rho & m_2 & -\mu
  \end{pmatrix},
\end{multline}
where we can evaluate the sum and introduce Wigner 6-$j$ symbols to
get
\begin{align}
  f_{\ell_1 m_1;\ell_2 m_2}^{LM}
  &= \delta_{M,m_1+m_2} \p{-1}^{2I+M}
  \sqrt{\p{2L+1}\p{2\ell_1+1}\p{2\ell_2+1}}
  \begin{pmatrix}
    L & \ell_1 & \ell_2 \\
    M & -m_1 & -m_2
  \end{pmatrix}
  \begin{Bmatrix}
    L & \ell_1 & \ell_2 \\
    I & I & I
  \end{Bmatrix} \\
  &= \delta_{M,m_1+m_2} \p{-1}^{2I+L}
  \sqrt{\p{2\ell_1+1}\p{2\ell_2+1}}
  \bk{\ell_1 m_1; \ell_2 m_2| LM}
  \begin{Bmatrix}
    \ell_1 & \ell_2 & L \\
    I & I & I
  \end{Bmatrix}.
  \label{eq:trans_struct}
\end{align}
The Wigner 6-$j$ symbol is symmetric under any permutation of its
columns, while Clebsch-Gordan coefficients satisfy
\begin{align}
  \bk{\ell_1 m_1; \ell_2 m_2| \ell_3 m_3}
  &= \p{-1}^{\ell_1+\ell_2-\ell_3}
  \bk{\ell_1,-m_1; \ell_2, -m_2| \ell_3 m_3} \\
  &= \p{-1}^{\ell_1+\ell_2-\ell_3}
  \bk{\ell_2 m_2; \ell_1 m_1| \ell_3 m_3},
\end{align}
which implies that
\begin{align}
  f_{\ell_1 m_1;\ell_2 m_2}^{LM}
  &= \p{-1}^{\ell_1+\ell_2-L} f_{\ell_1,-m_2;\ell_2,-m_2}^{L,-M} \\
  &= \p{-1}^{\ell_1+\ell_2-L} f_{\ell_2 m_2;\ell_1 m_1}^{LM}.
\end{align}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Drive operator product expansions}
\label{sec:drive_prod}

The drive operators are defined by
\begin{align}
  D_{LM} \equiv \f{\eta_M}{\sqrt{2}}
  \sp{T_{LM} + \sign\p{M} T_{LM}^\dag},
  &&
  \eta_M \equiv
  \begin{cases}
    \sqrt{2} & M = 0 \\
    \p{-1}^M & M > 0 \\
    i & M < 0
  \end{cases},
\end{align}
or, equivalently,
\begin{align}
  D_{LM} \equiv \f{\eta_M}{\sqrt{2}}
  \sum_{s\in\set{\pm1}} \epsilon_{Ms} T_{L,sM},
  &&
  \epsilon_{Ms} \equiv
  \begin{cases}
    1 & s = +1 \\
    \p{-1}^M \sign\p{M} & s = -1
  \end{cases},
\end{align}
which implies that
\begin{align}
  T_{LM} = \f{\tau_M}{\sqrt{2}}
  \sum_{s\in\set{\pm1}} \sqrt{s} D_{L,sM},
  &&
  \tau_M \equiv
  \begin{cases}
    \sqrt{2}/\p{1+i} & M = 0 \\
    \eta_M^* & M \ne 0
  \end{cases},
\end{align}
where $\eta_M^*$ is the complex conjugate of $\eta_M$.  In order to
evaluate the product of two drive operators, we can thus expand them
in terms of transition operators, evaluate the corresponding products
of transition operators (see Appendix \ref{sec:trans_prod}), and
finally expand the result in terms of drive operators.  The product of
two drive operators is thus
\begin{align}
  D_{\ell_1 m_1} D_{\ell_2 m_2}
  = \sum_{L,M} g_{\ell_1m_1;\ell_2m_2}^{LM} D_{LM}
  \label{eq:drive_prod}
\end{align}
where
\begin{align}
  g_{\ell_1m_1;\ell_2m_2}^{LM}
  &\equiv \f{\eta_{m_1}\eta_{m_2}}{2\sqrt2}
  \sum_{r,s_1,s_2\in\set{\pm1}} \epsilon_{m_1s_1} \epsilon_{m_2s_2}
  \times f_{\ell_1,s_1m_1;\ell_2,s_2m_2}^{L,rM}
  \times \tau_{s_1m_1+s_2m_2} \times \sqrt{r}.
\end{align}
Redefining $\p{s_1,s_2}\to\p{rs_1,rs_2}$ and using the facts that
\begin{align}
  f_{\ell_1,rs_1m_1;\ell_2,rs_2m_2}^{L,rM}
  = r^{\ell_1+\ell_2+L} f_{\ell_1,s_1m_1;\ell_2,s_2m_2}^{LM},
  &&
  \tau_{rM} \sqrt{r} &= \tau_M \, \sigma_{Mr} \, r^M,
\end{align}
with
\begin{align}
  \sigma_{Mr} \equiv
  \begin{cases}
    \sqrt{r} & M = 0 \\
    \sign\p{M}^{\frac{1-r}{2}} & M \ne 0
  \end{cases},
  &&
  0^0 \equiv 1,
\end{align}
we can simplify
\begin{align}
  g_{\ell_1m_1;\ell_2m_2}^{LM}
  = \f{\eta_{m_1}\eta_{m_2}\tau_M}{\sqrt2}
  \sum_{s_1,s_2\in\set{\pm1}} f_{\ell_1,s_1m_1;\ell_2,s_2m_2}^{LM}
  \times \f12 \sum_{r\in\set{\pm1}}
  \epsilon_{m_1,r s_1} \epsilon_{m_2,r s_2} \,
  \sigma_{Mr} \, r^{\ell_1+\ell_2+L+M}.
  \label{eq:drive_struct}
\end{align}
In the case that $m_1=0$, we can simplify
\begin{align}
  g_{\ell_1,0;\ell_2,m}^{LM}
  \stackrel{m\ne 0}{=} f_{\ell_1,0;\ell_2 m}^{Lm}
  \times \delta_{\abs{M},\abs{m}} \times
  \begin{cases}
    \sp{\sp{\ell_1+\ell_2+L~\t{is even}}} & M = +m, \\
    i \sp{\sp{\ell_1+\ell_2+L~\t{is odd}}} & M = -m,
  \end{cases}
\end{align}
\begin{align}
  g_{\ell_1,0;\ell_2,0}^{LM} = f_{\ell_1,0;\ell_2,0}^{LM}.
\end{align}
Here $\sp{\sp{X}}\equiv1$ if $X$ is true and $0$ otherwise.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Finding drive operator sub-algebras}

Here we identify conditions under which the drive operator structure
constants $g_{\ell_1m_1;\ell_2m_2}^{LM}$ vanish, which will help us
identify subsets of all drive operators that are relevant in a
particular physical scenario.  First, we note that
$g_{\ell_1m_1;\ell_2m_2}^{LM}$ is guaranteed to be zero unless
\begin{align}
  M = s_1 m_1 + s_2 m_2 ~~ \t{for some} ~~ s_1,s_2\in\set{\pm1}.
\end{align}
Even if this condition is satisfied, the structure constant
$g_{\ell_1m_1;\ell_2m_2}^{LM}$ can still vanish if the two terms in
the sum over $r$ in \eqref{eq:drive_struct} have opposite sign.  For
brevity, we define
\begin{align}
  z_{\ell_1m_1;\ell_2m_2}^{LM;s_1s_2r}
  \equiv \epsilon_{m_1,r s_1} \epsilon_{m_2,r s_2} \,
  \sigma_{Mr} \, r^{\ell_1+\ell_2+L+M}.
\end{align}
If $M=0$, then $\p{\sigma_{M,+1},\sigma_{M,-1}}=\p{1,i}$ and the
remaining factors in $z_{\ell_1m_1;\ell_2m_2}^{LM;s_1s_2r}$ are real,
so the sum over $r$ cannot vanish.  For the case of $M\ne0$, we can
write
\begin{align}
  \epsilon_{ms} = \p{-1}^{\frac{1-s}{2}m} \sign\p{m}^{\frac{1-s}{2}},
  &&
  0^0 \equiv 1,
\end{align}
which allows us to expand
\begin{align}
  z_{\ell_1m_1;\ell_2m_2}^{LM;s_1s_2r}
  \stackrel{M\ne0}{=} \p{-1}^{\frac{m_1+m_2}{2}-r\frac{M}{2}}
  \sign\p{m_1}^{\frac{1-rs_1}{2}} \sign\p{m_2}^{\frac{1-rs_2}{2}}
  \sign\p{M}^{\frac{1-r}{2}} r^{\ell_1+\ell_2+L+M}.
\end{align}
We then consider the dependence of each factor in this expansion on
$r$:
\begin{enumerate}
\item $\p{-1}^{\frac{m_1+m_2}{2}-r\frac{M}{2}}$ changes sign with $r$
  if and only if $M$ is odd,
\item $\sign\p{m_1}^{\frac{1-rs_1}{2}}$ changes sign with $r$ if and
  only if $m_1<0$,
\item $\sign\p{m_2}^{\frac{1-rs_2}{2}}$ changes sign with $r$ if and
  only if $m_2<0$,
\item $\sign\p{M}^{\frac{1-r}{2}}$ changes sign with $r$ if and only
  if $M<0$, and finally
\item $r^{\ell_1+\ell_2+L+M}$ changes sign with $r$ if and only if
  $\ell_1+\ell_2+L+M$ is odd.
\end{enumerate}
Altogether, the structure factor $g_{\ell_1m_1;\ell_2m_2}^{LM}$ is
guaranteed to be zero unless an even number of the following six
conditions are satisfied:
\begin{align}
  \ell_1 ~ \t{odd},
  &&
  \ell_2 ~ \t{odd},
  &&
  L ~ \t{odd}, \label{eq:L_conds} \\
  m_1 < 0,
  &&
  m_2 < 0,
  &&
  M < 0. \label{eq:M_conds}
\end{align}
We now consider the structure factors
$g_{\ell_1m_1;\ell_2m_2}^{LM,\pm}$ for (anti-)commutators of drive
operators:
\begin{align}
  \sp{D_{\ell_1 m_1}, D_{\ell_2 m_2}}_\pm
  = \sum_{L,M} g_{\ell_1m_1;\ell_2m_2}^{LM,\pm} D_{LM}.
\end{align}
The drive operators all self-adjoint, which implies that
$g_{\ell_1m_1;\ell_2m_2}^{LM,\pm}$ must be purely real ($+$) or
imaginary ($-$).  As a consequence, $g_{\ell_1m_1;\ell_2m_2}^{LM,\pm}$
is {\it zero} unless $g_{\ell_1m_1;\ell_2m_2}^{LM}$ is purely real
($+$) or imaginary ($-$).  These conditions under which
$g_{\ell_1m_1;\ell_2m_2}^{LM}$ is purely real or imaginary turn out to
be easy to determine by examination of the general product in
\eqref{eq:drive_prod}, together with the fact that the drive operator
$D_{LM}$ is purely real (imaginary) for $M\ge0$ ($M<0$).  It follows
that $g_{\ell_1m_1;\ell_2m_2}^{LM}$ must be purely real (imaginary) if
an even (odd) number of $m_1,m_2,M$ are negative.  Altogether,
$g_{\ell_1m_1;\ell_2m_2}^{LM,\pm}$ can only be nonzero for an even
($+$) or odd ($-$) number of $m_1,m_2,M$ are negative, which implies
that an even ($+$) or odd ($-$) number of conditions in {\it each} of
\eqref{eq:L_conds} and \eqref{eq:M_conds} must be satisfied in order
to have $g_{\ell_1m_1;\ell_2m_2}^{LM,\pm}\ne0$.

\red{todo: finish section}

\vspace{2cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Weak SOC in the PS manifold}
\label{sec:SOC_pert}

Here we derive the first- and second-order effective Hamiltonians
induced on the PS manifold $\M_\PS$ by the single-particle weak-SOC
Hamiltonian
\begin{align}
  H_{\t{lat}}^{(\phi)}
  = \sum_{q,L} B_L^{(\phi,q)} D_{L,0}^{(q)},
\end{align}
where $D_{L,0}^{(q)}$ is a drive operator that acts on spin $q$, and
$B_L^{(\phi,q)}$ is an effective inhomogeneous driving field amplitude
defined in \eqref{eq:B_L_phi} and \eqref{eq:A_L_phi}.  A perturbative
treatment of $H_{\t{lat}}^{(\phi)}$ yields the effective
Hamiltonians[\red{TODO: cite perturbation theory notes}]
\begin{align}
  H_{\t{eff}}^{(1)}
  &\equiv \sum_L \EE_q\sp{B_L^{(\phi,q)}} \D_{L,0},
  \\
  H_{\t{eff}}^{(2)}
  &\equiv \sum_{J,K}
  \f{\cov_q\sp{B_J^{(\phi,q)}, B_K^{(\phi,q)}}}{u\p{N-1}}
  \p{\D_{J,0} \D_{K,0} - N \sum_L g_{JKL} \D_{L,0}},
\end{align}
where $\EE_q\sp{X_q} \equiv \sum_q X_q / N$ is the mean of $X_q$ over
all occupied quasi-momenta $q$;
\begin{align}
  \cov_q\sp{X_q,Y_q}
  \equiv \EE_q\sp{\p{X_q-\EE_k\sp{X_k}}\p{Y_q-\EE_\ell\sp{Y_\ell}}}
  = \EE_q\sp{X_q Y_q} - \EE_k\sp{X_k} \EE_\ell\sp{Y_\ell},
  \label{eq:cov}
\end{align}
is the covariance of $X_q$ and $Y_q$ over all occupied quasi-momenta
$q$; and $g_{JKL} \equiv g_{J,0;K,0}^{L,0}$ is a structure constant of
the transition operator algebra, defined in \eqref{eq:trans_struct}.
Substituting the form of $B_L^{(\phi,q)}$ in \eqref{eq:B_L_phi}, we
get
\begin{align}
  H_{\t{eff}}^{(1)}
  &= -t \sum_L \EE_q\sp{w_L\p{qa}} A_L^{(\phi)} \D_{L,0},
  \label{eq:H_eff_1}
  \\
  H_{\t{eff}}^{(2)}
  &\equiv \f{t^2}{fU\p{N-1}} \sum_{J,K}
  \cov_q\sp{w_J\p{qa}, w_K\p{qa}} A_J^{(\phi)} A_K^{(\phi)}
  \p{\D_{J,0} \D_{K,0} - N \sum_L g_{JKL} \D_{L,0}}.
  \label{eq:H_eff_2}
\end{align}
where $t$ is the nearest-neighbor tunneling rate, $a$ is the spacing
between neighboring lattice sites, $f$ is the filling fraction of
spatial modes, $U$ is the two-body on-site interaction energy, and
$w_L$ is cosine (sine) for even (odd) $L$.  Note that as the spatial
filling fraction $f\to1$, the sums over occupied quasi-momenta $q$
become sums over nearly all angles $q\in\ZZ_N\times2\pi/N$.  In this
case, when both $J,K$ are even or odd (i.e.~$J=K~\t{mod}~2$) the
covariance in \eqref{eq:H_eff_2} becomes
$\cov_p\sp{\sin\p{p},\sin\p{p}}\to1/2$ or
$\cov_p\sp{\cos\p{p},\cos\p{p}}\to1/2$, whereas when one of $J,K$ is
even and the other is odd (i.e.~$J\ne K~\t{mod}~2$), this covariance
becomes $\cov_p\sp{\cos\p{p},\sin\p{p}}\to0$.  In the case of SU(2),
the effective Hamiltonian $H_{\t{eff}}^{(2)}$ in \eqref{eq:H_eff_2}
reduces to the one-axis twisting Hamiltonian derived in
Ref.~\cite{he2019engineering}.

The effective Hamiltonians in \eqref{eq:H_eff_1} and
\eqref{eq:H_eff_2} are respectively first and second order in the SOC
Hamiltonian $H_{\t{lat}}^{(\phi)}$.  We can extract the leading and
next-to-leading order dependence of these effective Hamiltonians on
the SOC angle $\phi$ by using the expansions of $A_L^{(\phi)}$ in
\eqref{eq:A_L_phi_small}, which gives us
\begin{align}
  H_{\t{eff}}^{(1)}
  &= \phi t \, \EE_p\sp{\sin\p{pa}} \xi_1 \D_{1,0}
  + \phi^2 t \, \EE_q\sp{\cos\p{qa}} \xi_2 \D_{2,0}
  + O\p{\phi^3},
  \label{eq:H_eff_1_phi_apndx} \\
  H_{\t{eff}}^{(2)}
  &= \f{\phi^2 t^2}{\p{N-1}fU} \var_q\sp{\sin\p{qa}}
  \p{\xi_1^2 \D_{1,0}^2 - 2 N \xi_2 \D_{2,0}}
  + O\p{\phi^3},
  \label{eq:H_eff_2_phi_apndx}
\end{align}
where the factors $\xi_L$ are defined in \eqref{eq:scale_fac},
\begin{align}
  \var_q\sp{X_q} \equiv \cov_p\sp{X_p,X_p}
  = \EE_p\sp{\p{X_p-\EE_q\sp{X_q}}^2}
  = \EE_p\sp{X_p^2} - \EE_q\sp{X_q}^2
\end{align}
is the variance of $X_q$ over all occupied quasi-momenta $q$, and we
have neglected scalar terms $\sim\D_{0,0}\propto\1$ that have no
physical consequence.  Note that in the case of SU(2), the re-scaled
drive operator $\xi_1\D_{1,0}$ is precisely the collective spin-$z$
operator $S_\z$ that appears in Ref.~\cite{he2019engineering}.
Furthermore, drive operators $D_{LM}$ vanish when $L\ge n$, so in the
case of SU(2) the operator $\D_{2,0}$ has no contribution to the
effective Hamiltonians in \eqref{eq:H_eff_2_phi_apndx} and
\eqref{eq:H_eff_2_phi_apndx}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Raman drive coefficients}
\label{sec:drive_raman_coeff}

Here we provide the coefficients $\Omega_{LM}^{(\phi,j)}$ of the
effective Raman driving Hamiltonian
\begin{align}
  H_{\t{Raman}}^{(\phi)}
  = \sum_j \sum_{\substack{L\in\set{0,1,2}\\\abs{M}\le L}}
  \Omega_{LM}^{(\phi,j)} D_{LM}^{(j)}
  \label{eq:raman_drive_apndx}
\end{align}
considered in Section \ref{sec:drive_raman}.  These coefficients are
computed using the structure constants of the transition operator
algebra provided in Appendix \ref{sec:trans_prod}.  For clarity, if
any coefficient $\Omega_{LM}^{(\phi,j)}$ is independent of the SOC
angle $\phi$ or lattice site $j$, we suppress the explicit dependence
on $\p{\phi,j}$, i.e.~taking $\Omega_{LM}^{(\phi,j)}\to\Omega_{LM}$.
Defining the re-scaled driving amplitudes
\begin{align}
  \tilde\Omega_{LM}^{(\phi,j)} \equiv \xi_L^{-1} \Omega_{LM}^{(\phi,j)},
  &&
  \tilde\Omega_m \equiv \xi_1^{-1} \Omega_m,
\end{align}
where where the scale factors $\xi_L$ are defined in
\eqref{eq:scale_fac} and $\Omega_m$ are the (real) driving amplitudes
in the ``bare'' Raman drive in \eqref{eq:raman_bare}, the coefficients
of the effective Raman drive in \eqref{eq:raman_drive_apndx} are
determined by
\begin{align}
  \Delta \tilde\Omega_{0,0}
  \equiv -\f{\xi_1^2}{\xi_0^2} \sum_m \tilde\Omega_m^2,
  &&
  \Delta \tilde\Omega_{1,0}
  \equiv \f12 \p{\tilde\Omega_+^2 - \tilde\Omega_-^2},
  &&
  \Delta \tilde\Omega_{2,0}
  \equiv \tilde\Omega_+^2 + \tilde\Omega_-^2 - 2\tilde\Omega_0^2,
  \label{eq:O_X0}
\end{align}
\begin{align}
  \tilde\Omega_{L,1}^{(\phi,j)}
  &\equiv \sum_{s\in\set{\pm1}}
  \omega_{Ls} \cos\p{\sp{\phi_s-\phi_0}j},
  &
  \tilde\Omega_{L,-1}^{(\phi,j)}
  &\equiv -\sum_{s\in\set{\pm1}}
  s \omega_{Ls} \sin\p{\sp{\phi_s-\phi_0}j}, \\
  \tilde\Omega_{2,2}^{(\phi,j)}
  &\equiv \omega_{2,2} \cos\p{\sp{\phi_+-\phi_-}j},
  &
  \tilde\Omega_{2,-2}^{(\phi,j)}
  &\equiv -\omega_{2,2} \sin\p{\sp{\phi_+-\phi_-}j},
\end{align}
\begin{align}
  \Delta \omega_{1\pm}
  \equiv \f1{\sqrt{2}} \, \tilde\Omega_0 \tilde\Omega_\pm,
  &&
  \Delta \omega_{2\pm}
  \equiv \pm \sqrt{6} \, \tilde\Omega_0\tilde\Omega_\pm,
  &&
  \Delta \omega_{2,2}
  \equiv 2\sqrt{3} \, \tilde\Omega_+\tilde\Omega_-.
\end{align}
Here $\phi_m$ and $\Delta$ are respectively the phases and detuning
that appear in the ``bare'' Raman drive in \eqref{eq:raman_bare}.  If
the driving lasers are phase-matched with $\phi_m=m\phi$, such that a
nuclear spin transition $\mu\to\mu+m$ on site $j$ imprints the phase
$m\phi j$, then the drive $H_{\t{Raman}}^{(\phi)}$ takes the form
\begin{align}
  \left. H_{\t{Raman}}^{(\phi)} \right|_{\phi_m=m\phi}
  = \sum_{\substack{L\le2\\0\le M\le L}} \Omega_{LM} \D_{LM}^{(\phi)},
\end{align}
with inhomogeneously rotated collective drive operators
\begin{align}
  \D_{LM}^{(\phi)}
  \equiv \sum_j \sp{\cos\p{M\phi j} D_{LM}^{(j)}
    - \sin\p{M\phi j} D_{L,-M}^{(j)}},
\end{align}
and uniform coefficients determined by \eqref{eq:O_X0} and
\begin{align}
  \tilde\Omega_{1,-1} = \tilde\Omega_{2,-1}
  = \tilde\Omega_{2,-2} \equiv 0,
  &&
  \tilde\Omega_{L,1} \equiv \sum_{s\in\set{\pm1}} \omega_{Ls},
  &&
  \tilde\Omega_{2,2} \equiv \omega_{2,2}.
\end{align}

\bibliography{multilevel_spin_notes.bib}

\end{document}

% Level statistics of Hamiltonian
% Dynamics of single-particle observables
% Dynamics of two-point correlators
% - Different sites
% - Two-time correlators
% TWA dynamics

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:


\chapter{Appendix: Family Motion Planning}
\label{chap:appendix-family}

\begin{figure}
   \centering
   \includegraphics[width=10.5cm]{build/family-suction-example-graph}
   \caption[Family belief graph for the 2D example problem from
      Figure~\ref{fig:family:example} in Chapter~\ref{chap:family}.
      The underlying family consists of five sets:
      $A$, $B$, $C$, $S_{12}$, and $S_{23}$.
      Transitions between states are shown for indicators
      $\mathbf{1}_A$,
      $\mathbf{1}_B$,
      and $\mathbf{1}_C$,
      with solid lines
      showing transitions in which the indicator returns True,
      and dashed lines
      showing transitions in which the indicator returns False.
      Also shown is the distance function and optimal policy
      for a query subset $S_u = S_{23}$,
      with green beliefs as goal states.
      Bolded edges
      represent transitions on an optimal policy.
   ]{Family belief graph for the 2D example problem from
      Figure~\ref{fig:family:example} in Chapter~\ref{chap:family}.
      The underlying family consists of five sets:
      $A$, $B$, $C$, $S_{12}$, and $S_{23}$.
      Transitions between states are shown for indicators
      $\mathbf{1}_A$ (\protect\tikz{\protect\node[fill=red,draw=black]{};}),
      $\mathbf{1}_B$ (\protect\tikz{\protect\node[fill=green!70!black,draw=black]{};}),
      and $\mathbf{1}_C$ (\protect\tikz{\protect\node[fill=blue,draw=black]{};}),
      with solid lines (\protect\tikz{\protect\draw[thick,solid] (0,0) -- (0.15,0.15);})
      showing transitions in which the indicator returns True,
      and dashed lines (\protect\tikz{\protect\draw[thick,densely dotted] (0,0) -- (0.15,0.15);})
      showing transitions in which the indicator returns False.
      Also shown is the distance function and optimal policy
      for a query subset $S_u = S_{23}$,
      with green beliefs as goal states.
      Bolded edges (\protect\tikz{\protect\draw[ultra thick,solid] (0,0) -- (0.15,0.15);})
      represent transitions on an optimal policy.
      }
   \label{fig:family:appendix-suction-example-graph}
\end{figure}


\section{Algemene omschrijving}
	The overall goal of the course is to provide a detailed answer to the questions:
	\begin{itemize}
	\item what are the kinematics equations?
	\item how does a physical simulation work?
	\end{itemize}

	In this section we discuss further the full breadth of what the course covers, plus the desired level of skills achieved by the students.

	\subsection{Introduction}
		Simulation of the physical world is one of the most powerful fields of application of modern programming disciplines. Thanks to such simulations it is possible to set up virtual experiments, build virtual reality worlds, and many more modern complex applications. \\

		Since analytical solutions are very rarely available, building such simulations requires the use of approximation techniques, which themselves are also applied to many other fields such as computer vision, artificial intelligence, and robotics. \\

		The goal of the course is to provide a definition of the physical laws of kinematics, and of numerical approximations of complex dynamics. Moreover, we shall learn how to translate this knowledge into a working physical simulator. \\

	\subsection{Relationship with other teaching units}
		This module builds over all modules of programming, and is also strongly connected with previous knowledge about mathematics, and linear algebra. \\

	\subsection{Learning tools}
		Obligatory:
		\begin{itemize}
			\item Presentations and sources presented during lectures (found on N@tschool);
			\item Assignments to work on during practicums (found on N@tschool);
			\item Text editors: Emacs, Notepad++, Visual Studio, Xamarin Studio, etc.
		\end{itemize}
		Facultative:
		\begin{itemize}
			\item Book: Game Physics, author: David Eberly
			\item Book: Friendly F\# (Fun with game physics), authors: Giuseppe Maggiore, Marijn Tamis, Giulia Costantini
		\end{itemize}


\chapter{1st Order Linear ODE's}
\noindent
1st order linear ODEs are among the simplest differential equations, but learning different techniques to solve them will allow us to develop techniques for solving more complicated types of equations later on.

% Seperable Differential Equations
\input{./1stOrderLinearODE/separability/separability.tex}

% Method for solving (Integrating Factor)
\input{./1stOrderLinearODE/integratingFactor/integratingFactor.tex}

% Applications
	% Newton's Law of Cooling
	% Logistic Equation (Viral Spread)
	% Compound Interest
	% RC Circuit