\documentclass{beamer}
\usetheme{Boadilla}

\usepackage{adjustbox}
\usepackage{longtable}
\usepackage{fix-cm}
%\usepackage[section]{placeins}
%\usepackage{flafter}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{etoolbox}
\usepackage{units}
\usepackage{multirow}
\usepackage{hyperref}
\usepackage{pdfcomment}

\newcommand{\spverb}{\texttt} %b/c spverb doesn't work in slides

\newcommand{\rrangle}{\rangle\!\rangle} \newcommand{\llangle}{\langle\!\langle}
\newcommand{\ket}[1]{\ensuremath{\left|#1\right\rangle}}
\newcommand{\bra}[1]{\ensuremath{\left\langle#1\right|}}
\newcommand{\braket}[2]{\ensuremath{\left\langle#1|#2\right\rangle}}
\newcommand{\expec}[1]{\ensuremath{\left\langle#1\right\rangle}}
\newcommand{\ketbra}[2]{\ket{#1}\!\!\bra{#2}}
\newcommand{\braopket}[3]{\ensuremath{\bra{#1}#2\ket{#3}}}
\newcommand{\proj}[1]{\ketbra{#1}{#1}}
\newcommand{\sket}[1]{\ensuremath{\left|#1\right\rrangle}}
\newcommand{\sbra}[1]{\ensuremath{\left\llangle#1\right|}}
\newcommand{\sbraket}[2]{\ensuremath{\left\llangle#1|#2\right\rrangle}}
\newcommand{\sketbra}[2]{\sket{#1}\!\!\sbra{#2}}
\newcommand{\sbraopket}[3]{\ensuremath{\sbra{#1}#2\sket{#3}}}
\newcommand{\sproj}[1]{\sketbra{#1}{#1}}
\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
\def\Id{1\!\mathrm{l}}
\newcommand{\Tr}[0]{\mathrm{Tr}}
\providecommand{\e}[1]{\ensuremath{\times 10^{#1}}}

%Command used for python automatic substitution
\newcommand{\putfield}[2]{#2}

\newtoggle{confidences}
\newtoggle{LsAndGermsSet}
\newtoggle{debuggingaidsappendix}
\newtoggle{pixelplotsappendix}
\newtoggle{whackamoleappendix}
\putfield{settoggles}{}

\hypersetup{
  pdfinfo={ \putfield{pdfinfo}{}  }
}


\title{\putfield{title}{Report Title Goes Here}}
\subtitle{A projector-friendly look at your GST results}
\author{PyGSTi}
\institute{Sandia National Labs}
\date{\today}

\begin{document}

\section{Title}
\begin{frame}
\titlepage
\end{frame}

\section{Contents}
\begin{frame}
\frametitle{Outline}
\tableofcontents
\end{frame}


\iftoggle{LsAndGermsSet}{
\section{Goodness-of-model}

\subsection{\putfield{objective}{??} progress}
\begin{frame}
\frametitle{\putfield{objective}{??} vs.~GST iteration}

\begin{itemize}
\item $N_S$ is the number of gate strings
\item $N_p$ is the number of parameters
\end{itemize}

\begin{table}[h]
\begin{center}
\adjustbox{max height=\dimexpr\textheight-5.5cm\relax, max width=\textwidth}{
\putfield{progressTable}{progress table will be placed here}}
\caption{Comparison between the computed and expected \putfield{gofObjective}{??} for different values of $L$}
\end{center}
\end{table}
\end{frame}


\subsection{Color box plot}
\begin{frame}
\frametitle{Detailed \putfield{objective}{??} analysis}

\begin{figure}
\begin{center}
\putfield{bestEstimateColorBoxPlot}{Box plot of best gateset}
\end{center}
\end{figure}
\end{frame}

}{}

\section{Best gate set estimate}

\subsection{Estimate vs.~target}
\begin{frame}
\frametitle{GST Estimate vs.~target}

%\begin{itemize}
%\item Error generator is defined by the equation \putfield{errorgenformula}{??}.
%\end{itemize} 

\begin{table}[h]
\begin{center}

\adjustbox{max height=\dimexpr\textheight-5.5cm\relax, max width=\textwidth}{
\begin{tabular}{c}
\putfield{bestGatesetVsTargetTable}{Best gateset overview table will be placed here}
\\
\vspace{2em}
\\
\putfield{bestGatesetErrorGenTable}{Best gateset error generator table will be placed here}
\end{tabular}
}
\end{center}
\end{table}

\end{frame}


\subsection{Gate decomposition}
\begin{frame}
\frametitle{GST Estimate decomposition}

\begin{table}[h]
\begin{center}

\adjustbox{max height=\dimexpr\textheight-5.5cm\relax, max width=\textwidth}{
\begin{tabular}{c}
\putfield{bestGatesetDecompTable}{Best gateset overview table will be placed here}
\\
\vspace{2em}
\\
\putfield{bestGatesetRotnAxisTable}{Best gateset rotn axis table will be placed here}
\end{tabular}
}
\caption{Eigen-decomposition of estimated gates}
\end{center}
\end{table}

\end{frame}


\subsection{Raw Gates}
\begin{frame}
\frametitle{Raw GST Estimate: Gates}

\begin{table}[h]
\begin{center}
\adjustbox{max height=\dimexpr\textheight-5.5cm\relax, max width=\textwidth}{
\putfield{bestGatesetGatesTable}{Best gateset's gates table will be placed here}}
\caption{GST estimate of the logic gate operations}
\end{center}
\end{table}

\end{frame}


\subsection{Raw SPAM}
\begin{frame}
\frametitle{Raw GST Estimate: SPAM}

\begin{table}[h]
\begin{center}
\adjustbox{max height=\dimexpr\textheight-5.5cm\relax, max width=\textwidth}{
\begin{tabular}{c}
\putfield{bestGatesetSpamTable}{Best gateset rho and E vectors table will be placed here}
\\
\vspace{2em}
\\
\putfield{bestGatesetSpamParametersTable}{Best gateset spam parameters table will be placed here}
\end{tabular}
}
\caption{The GST estimate of the SPAM operations and dot-product probabilities}
\end{center}
\end{table}

\end{frame}


\subsection{Choi Matrices}
\begin{frame}
\frametitle{Raw GST Choi Matrices}
\begin{table}[h]
\begin{center}
\adjustbox{max height=\dimexpr\textheight-5.5cm\relax, max width=\textwidth}{
\putfield{bestGatesetChoiTable}{Best gateset's choi matrix table will be placed here}}
\caption{Choi matrix representation of the GST estimated gateset.}
\end{center}
\end{table}
\end{frame}



\section{Inputs to GST}

\subsection{Target gate set}
\begin{frame}
\frametitle{Target SPAM}

\begin{table}[h]
\begin{center}
\adjustbox{max height=\dimexpr\textheight-5.5cm\relax, max width=\textwidth}{
\putfield{targetSpamTable}{Target rho and E vectors table will be placed here}}
\caption{State preparation and measurement targets}
\end{center}
\end{table}

\end{frame}


\begin{frame}
\frametitle{Target Gates}

\begin{table}[h]
\begin{center}
\adjustbox{max height=\dimexpr\textheight-5.5cm\relax, max width=\textwidth}{
\putfield{targetGatesTable}{Target gateset overview table will be placed here}}
\caption{Summary of target gates}
\end{center}
\end{table}

\end{frame}


\iftoggle{LsAndGermsSet}{
\subsection{Fiducials and Germs}
\begin{frame}
\frametitle{Fiducial and Germ Gate Strings}

\begin{table}[h]
\footnotesize
\begin{center}
\begin{minipage}[b]{0.40\linewidth}
\centering
\adjustbox{max width=\linewidth}{
\putfield{fiducialListTable}{List of fiducials table will be placed here}
}
\end{minipage}
\begin{minipage}[b]{0.40\linewidth}
\adjustbox{max width=\linewidth}{
\putfield{germListTable}{List of germs table will be placed here}
}
\end{minipage}
\end{center}
\end{table}

\end{frame}

}{}


\subsection{Dataset}
\begin{frame}
\frametitle{Dataset Overview}

\begin{table}[h]
\begin{center}
\adjustbox{max height=\dimexpr\textheight-5.5cm\relax, max width=\textwidth}{
\putfield{datasetOverviewTable}{Dataset overview table will be placed here}}
\caption{General dataset properties}
\end{center}
\end{table}

\end{frame}



\iftoggle{debuggingaidsappendix}{
\section{Debugging Aids}

\begin{frame}
\frametitle{Direct-GST}

\begin{figure}
\begin{center}
\putfield{directLongSeqGSTColorBoxPlot}{Box plot for direct GST}
\caption{How well direct GST analysis of each base sequence fits the observed data.}
\end{center}
\end{figure}

\end{frame}


\begin{frame}
\frametitle{Direct-GST Deviation}

\begin{figure}
\begin{center}
\putfield{directLongSeqGSTDeviationColorBoxPlot}{Box plot of direct LSGST Deviation}
\caption{For each base sequence, the increase in ``upper bound of fidelity with unitary'' when using the direct-GST result for a gate sequence instead of the process given by the best gateset.}
\end{center}
\end{figure}

\end{frame}


\begin{frame}
\frametitle{Per-gate error rates}

\begin{figure}
\begin{center}
\putfield{smallEigvalErrRateColorBoxPlot}{Box plot of small-eigenvalue error rates}
\caption{Extrapolated from the smallest magnitude eigenvalue of the direct GST gate matrix.}
\end{center}
\end{figure}

\end{frame}
}{}

\iftoggle{pixelplotsappendix}{
\section{Pixel Plots}
\putfield{intermediate_pixel_plot_slides}{Pixel plots for intermediate gatesets will be placed here}
}{}


\iftoggle{whackamoleappendix}{
\section{Whack-a-mole}
\putfield{whackamole_plot_slides}{Whack-a-mole plots for select gatesets will be placed here}
}{}

\end{document}
