\appendix

\clearpage

\iftoggle{debuggingaidsappendix}{
\section{Debugging aids}

If the $\log(\mathcal{L})$ plots in Figures \ref{bestEstimateColorBoxPlot}-\ref{invertedBestEstimateColorBoxPlot} indicate that the data is poorly fit by GST, the next step is to begin ``debugging'' the experiments and/or the fit.  Most commonly, a poor fit is due to non-Markovian behavior.  However, there are many kinds of non-Markovian behavior.  The most straightforward occurs when the gate set fluctuates over time, or when there is other time correlation in the experiments (e.g., due to memory effects).  However, another possibility that must be considered is that repeated gate operations cause changes in the system, e.g. heating it up (as is seen in 2-qubit trapped-ion gates) so that the data from long gate sequences is simply chaotic and inconsistent with shorter experiments.

Figure \ref{directMLEGSTLogLBoxPlot} provides a test (albeit currently an unreliable one) for such an effect.  Like Figures \ref{bestEstimateColorBoxPlot}-\ref{invertedBestEstimateColorBoxPlot}, it displays per-experiment $2\Delta\log(\mathcal{L})$ values -- but \emph{not} for any single gate set.  Instead, this \emph{direct GST} analysis treats each base sequence as an independent process (\emph{not} as a product of many gates), and analyzes it using LSGST together with the individual gates (which are necessary to model the effect of the fiducial sequences that precede and follow the base sequence being analyzed).  The resulting direct GST estimate is then used to assign probabilities for the corresponding experiments.  

This analysis decouples the various germs and base sequences from each other.  Unlike a standard GST analysis, it does not model different base sequences as being generated from the same gates.  Therefore, this analysis \emph{should} be fairly consistent (i.e., lots of gray/white squares and few or no red ones) even if Figures \ref{bestEstimateColorBoxPlot}-\ref{invertedBestEstimateColorBoxPlot} indicate severe fit problems.  

\begin{figure}
\begin{center}
\putfield{directLongSeqGSTColorBoxPlot}{Box plot of direct MLEGST logL}
\caption{\putfield{tt_directLongSeqGSTColorBoxPlot}{}\textbf{$2\Delta\log(\mathcal{L})$ values for ``direct GST'' fit.}  This plot indicates how well direct GST analysis of each base sequence fits the observed data.  By decoupling different base sequences, this analysis largely avoids making any assumptions about Markovianity, and therefore serves as a sanity check on the full GST analysis.  See text for details.\label{directMLEGSTLogLBoxPlot}}
\end{center}
\end{figure}

Figure \ref{directMLEGSTDeviationBoxPlot} uses direct GST analysis in another way, but to detect similar effects.   The goal here is to to compare two different predictions for each base sequence:  (1) the one given by the overall GST fit; and (2) the one obtained by direct GST on that base sequence, as in Figure \ref{directMLEGSTLogLBoxPlot}.  The analysis shown in Figure \ref{directMLEGSTDeviationBoxPlot} does so by computing each process's fidelity with the closest unitary.  This is a measure of non-unitary decoherence.  Then, it plots the \emph{difference} between the values of this ``unitarity'' for (1) the overall GST fit, and (2) the direct GST estimate.  The direct GST estimate is not very precise, but it is extremely reliable, because it is not influenced by any data that are not \emph{directly} connected with that base sequence.  Thus, this serves as another sanity check and debugging aid.  Large absolute values indicate that the full GST fit is signicantly inconsistent with the data (complementing the analysis in Figure \ref{bestEstimateColorBoxPlot}).  Positive numbers indicate that full GST has \emph{overestimated} the amount of decoherence, while negative numbers indicate that it \emph{underestimated} it.

\begin{figure}
\begin{center}
\putfield{directLongSeqGSTDeviationColorBoxPlot}{Box plot of direct LSGST Deviation}
\caption{\putfield{tt_directLongSeqGSTDeviationColorBoxPlot}{}\textbf{Inconsistency of unitarity between GST and direct GST.}  This plot shows, for each base sequence, the increase in ``upper bound of fidelity with unitary'' (see Table \ref{bestGatesetClosestUnitaryTable}) when using the direct-GST result for a gate sequence instead of the process given by the best gate set.\label{directMLEGSTDeviationBoxPlot}}
\end{center}
\end{figure}

Finally, for various reasons including the diagnosis of non-Markovian behavior, it is often useful to have a direct and reliable estimate of the per-gate incoherent error rate observed in each base sequence.  This is shown in Figure \ref{smallEigvalErrRateColorBoxPlot}.  To obtain these numbers, direct GST is performed on each base sequence.  Then, each resulting process matrices is diagonalized, and the smallest eigenvalue (corresponding the most rapid loss of information/coherence/polarization) is extracted.  This eigenvalue is then raised to the $1/L$ power, where $L$ is the length of the base sequence, to estimate the rate of decoherence per gate, and subtracted from 1 (to convert it to an error rate).  These numbers become much more reliable towards the right-hand side of the plot, because errors in LGST become far less significant for these long sequences.  Large changes in this direct-GST error rate as $L$ is changed (on any given row of the table) are a ``smoking gun'' for non-Markovian decoherence -- especially when the error rate \emph{decreases} with increasing $L$.  Ideally, all numbers in a given row should be the same.

\begin{figure}
\begin{center}
\putfield{smallEigvalErrRateColorBoxPlot}{Box plot of small-eigenvalue error rates}
\caption{\putfield{tt_smallEigvalErrRateColorBoxPlot}{}\textbf{Per-gate error rates, extrapolated from the smallest magnitude eigenvalue of the direct GST gate matrix.}  See text for further details.\label{smallEigvalErrRateColorBoxPlot}}
\end{center}
\end{figure}

%\begin{figure}
%\begin{center}
%\XXputfield{bestEstimateColorBoxPlot_hist}{Histogram of best gate set logL}
%\caption{\XXputfield{tt_bestEstimateColorBoxPlot_hist}{}Histogram plot of best gate set $2\Delta\log(\mathcal{L})$ values.}
%\end{center}
%\end{figure}

}{}


\iftoggle{gaugeoptappendix}{
\section{Best gate set in different gauges\label{appendix_gauge_opts}}

In this appendix, we report the non-gauge-invariant quantities from the main text for different gauge choices.  In each section, GST's best gate set estimate is gauge optimized according to a different objective function, as specified within the section.

\subsection{Gauge optimization to the target gate set}
The gauge is chosen to minimize the Frobenius distance between the estimate and the target gates, with equal weight given to the gate and SPAM parameters.

\begin{table}[h]
\begin{center}
\putfield{bestTargetGatesetSpamTable}{BestTarget gate set rho and E vectors table will be placed here}
\caption{\textbf{The GST estimate of the SPAM operations}.  Compare to Table \ref{targetSpamTable}.\label{bestTargetGatesetSpamTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTargetGatesetSpamParametersTable}{BestTarget gate set spam parametesr table will be placed here}
\caption{\textbf{GST estimate of SPAM probabilities}.  Computed by taking the dot products of vectors in Table \ref{bestTargetGatesetSpamTable}.\label{bestTargetGatesetSpamParametersTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTargetGatesetGatesTable}{BestTarget gate set's gates table will be placed here}
\caption{\textbf{The GST estimate of the logic gate operations}.  Compare to Table \ref{targetGatesTable}.\label{bestTargetGatesetGatesTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTargetGatesetVsTargetTable}{BestTarget gate set overview table will be placed here}
\vspace{2em}
\putfield{bestTargetGatesetErrorGenTable}{Best gate set error generator table will be placed here}
\caption{\textbf{Comparison of GST estimated gates to target gates}.  This table presents, for each of the gates, three different measures of distance or discrepancy from the GST estimate to the ideal target operation.  See text for more detail.  The column labeled ``Error Generator'' gives the Lindbladian $\mathbb{L}$ that describes \emph{how} the gate is failing to match the target.  This error generator is defined by the equation \putfield{errorgenformula}{??}. \label{bestTargetGatesetVsTargetTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTargetGatesetDecompTable}{BestTarget gate set overview table will be placed here}
\vspace{2em}
\putfield{bestTargetGatesetRotnAxisTable}{Best gate set rotn axis table will be placed here}
\caption{\textbf{Eigen-decomposition of estimated gates}.  Each estimated gate is described in terms of: (1) the eigenvalues of the superoperator; (2) the gate's fixed point (as a vector in $\mathcal{B}(\mathcal{H})$, in the Pauli basis); (3)  the axis around which it rotates, as a vector in $\mathcal{B}(\mathcal{H})$; (4) the angle of the rotation that it applies; (5) the decay rate along the axis of rotation (``diagonal decay''); and (6) the decay rate perpendicular to the axis of rotation (``off-diagonal decay'').  ``--'' indicates that the decomposition failed or couldn't be interpreted. \label{bestTargetGatesetDecompTable}}
\end{center}
\end{table}


\begin{table}[h]
\begin{center}
\putfield{bestTargetGatesetClosestUnitaryTable}{BestTarget gate set overview table will be placed here}
\caption{Information pertaining to the closest unitary gate to each of the estimated gates.\label{bestTargetGatesetClosestUnitaryTable}}
\end{center}
\end{table}


\begin{table}[h]
\begin{center}
\putfield{bestTargetGatesetChoiTable}{BestTarget gate set's choi matrix table will be placed here}
\caption{\textbf{Choi matrix representation of the GST estimated gate set}.  This table lists Choi representations of the estimated gates, and their eigenvalues.  Unitary gates have a spectrum $(1,0,0\ldots)$, just like pure quantum states.  Negative eigenvalues are non-physical, and may represent either statistical fluctuations or violations of the CPTP model used by GST.\label{bestTargetGatesetChoiTable}}
\end{center}
\end{table}


\clearpage

\subsection{Gauge optimization to the target SPAM}
The gauge is chosen to minimize the Frobenius distance between the estimate and the target gates, with 99\% weight given to the SPAM parameters, 1\% to the gate parameters.

\begin{table}[h]
\begin{center}
\putfield{bestTargetSpamGatesetSpamTable}{BestTarget gate set rho and E vectors table will be placed here}
\caption{\textbf{The GST estimate of the SPAM operations}.  Compare to Table \ref{targetSpamTable}.\label{bestTargetSpamGatesetSpamTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTargetSpamGatesetSpamParametersTable}{BestTarget gate set spam parametesr table will be placed here}
\caption{\textbf{GST estimate of SPAM probabilities}.  Computed by taking the dot products of vectors in Table \ref{bestTargetSpamGatesetSpamTable}.\label{bestTargetSpamGatesetSpamParametersTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTargetSpamGatesetGatesTable}{BestTarget gate set's gates table will be placed here}
\caption{\textbf{The GST estimate of the logic gate operations}.  Compare to Table \ref{targetGatesTable}.\label{bestTargetSpamGatesetGatesTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTargetSpamGatesetVsTargetTable}{BestTarget gate set overview table will be placed here}
\vspace{2em}
\putfield{bestTargetSpamGatesetErrorGenTable}{Best gate set error generator table will be placed here}
\caption{\textbf{Comparison of GST estimated gates to target gates}.  This table presents, for each of the gates, three different measures of distance or discrepancy from the GST estimate to the ideal target operation.  See text for more detail.  The column labeled ``Error Generator'' gives the Lindbladian $\mathbb{L}$ that describes \emph{how} the gate is failing to match the target.  This error generator is defined by the equation \putfield{errorgenformula}{??}. \label{bestTargetSpamGatesetVsTargetTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTargetSpamGatesetDecompTable}{BestTarget gate set overview table will be placed here}
\vspace{2em}
\putfield{bestTargetSpamGatesetRotnAxisTable}{Best gate set rotn axis table will be placed here}
\caption{\textbf{Eigen-decomposition of estimated gates}.  Each estimated gate is described in terms of: (1) the eigenvalues of the superoperator; (2) the gate's fixed point (as a vector in $\mathcal{B}(\mathcal{H})$, in the Pauli basis); (3)  the axis around which it rotates, as a vector in $\mathcal{B}(\mathcal{H})$; (4) the angle of the rotation that it applies; (5) the decay rate along the axis of rotation (``diagonal decay''); and (6) the decay rate perpendicular to the axis of rotation (``off-diagonal decay'').  ``--'' indicates that the decomposition failed or couldn't be interpreted. \label{bestTargetSpamGatesetDecompTable}}
\end{center}
\end{table}


\begin{table}[h]
\begin{center}
\putfield{bestTargetSpamGatesetClosestUnitaryTable}{BestTarget gate set overview table will be placed here}
\caption{Information pertaining to the closest unitary gate to each of the estimated gates.\label{bestTargetSpamGatesetClosestUnitaryTable}}
\end{center}
\end{table}


\begin{table}[h]
\begin{center}
\putfield{bestTargetSpamGatesetChoiTable}{BestTarget gate set's choi matrix table will be placed here}
\caption{\textbf{Choi matrix representation of the GST estimated gate set}.  This table lists Choi representations of the estimated gates, and their eigenvalues.  Unitary gates have a spectrum $(1,0,0\ldots)$, just like pure quantum states.  Negative eigenvalues are non-physical, and may represent either statistical fluctuations or violations of the CPTP model used by GST.\label{bestTargetSpamGatesetChoiTable}}
\end{center}
\end{table}

\clearpage

\subsection{Gauge optimization to the target gates:}
The gauge is chosen to minimize the Frobenius distance between the estimate and the target gates, with 99\% weight given to the gate parameters, 1\% to the SPAM parameters.


\begin{table}[h]
\begin{center}
\putfield{bestTargetGatesGatesetSpamTable}{BestTarget gate set rho and E vectors table will be placed here}
\caption{\textbf{The GST estimate of the SPAM operations}.  Compare to Table \ref{targetSpamTable}.\label{bestTargetGatesGatesetSpamTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTargetGatesGatesetSpamParametersTable}{BestTarget gate set spam parametesr table will be placed here}
\caption{\textbf{GST estimate of SPAM probabilities}.  Computed by taking the dot products of vectors in Table \ref{bestTargetGatesGatesetSpamTable}.\label{bestTargetGatesGatesetSpamParametersTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTargetGatesGatesetGatesTable}{BestTarget gate set's gates table will be placed here}
\caption{\textbf{The GST estimate of the logic gate operations}.  Compare to Table \ref{targetGatesTable}.\label{bestTargetGatesGatesetGatesTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTargetGatesGatesetVsTargetTable}{BestTarget gate set overview table will be placed here}
\vspace{2em}
\putfield{bestTargetGatesGatesetErrorGenTable}{Best gate set error generator table will be placed here}
\caption{\textbf{Comparison of GST estimated gates to target gates}.  This table presents, for each of the gates, three different measures of distance or discrepancy from the GST estimate to the ideal target operation.  See text for more detail.  The column labeled ``Error Generator'' gives the Lindbladian $\mathbb{L}$ that describes \emph{how} the gate is failing to match the target.  This error generator is defined by the equation \putfield{errorgenformula}{??}. \label{bestTargetGatesGatesetVsTargetTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTargetGatesGatesetDecompTable}{BestTarget gate set overview table will be placed here}
\vspace{2em}
\putfield{bestTargetGatesGatesetRotnAxisTable}{Best gate set rotn axis table will be placed here}
\caption{\textbf{Eigen-decomposition of estimated gates}.  Each estimated gate is described in terms of: (1) the eigenvalues of the superoperator; (2) the gate's fixed point (as a vector in $\mathcal{B}(\mathcal{H})$, in the Pauli basis); (3)  the axis around which it rotates, as a vector in $\mathcal{B}(\mathcal{H})$; (4) the angle of the rotation that it applies; (5) the decay rate along the axis of rotation (``diagonal decay''); and (6) the decay rate perpendicular to the axis of rotation (``off-diagonal decay'').  ``--'' indicates that the decomposition failed or couldn't be interpreted. \label{bestTargetGatesGatesetDecompTable}}
\end{center}
\end{table}


\begin{table}[h]
\begin{center}
\putfield{bestTargetGatesGatesetClosestUnitaryTable}{BestTarget gate set overview table will be placed here}
\caption{Information pertaining to the closest unitary gate to each of the estimated gates.\label{bestTargetGatesGatesetClosestUnitaryTable}}
\end{center}
\end{table}


\begin{table}[h]
\begin{center}
\putfield{bestTargetGatesGatesetChoiTable}{BestTarget gate set's choi matrix table will be placed here}
\caption{\textbf{Choi matrix representation of the GST estimated gate set}.  This table lists Choi representations of the estimated gates, and their eigenvalues.  Unitary gates have a spectrum $(1,0,0\ldots)$, just like pure quantum states.  Negative eigenvalues are non-physical, and may represent either statistical fluctuations or violations of the CPTP model used by GST.\label{bestTargetGatesGatesetChoiTable}}
\end{center}
\end{table}

\clearpage

\subsection{Gauge optimization to TP}
The gauge is chosen to make the gate set as trace-preserving as possible.  This is done by minimizing the sum of the squared euclidian distance between the first row of each estimated gate matrix and the vector $(1,0,\cdots 0)$.  The Frobenius distance between the estimate and the target gate set, weighted by $10^{-4}$, is added to the aforementioned sum of distances is to give the final objective function.  Ideally, a perfectly TP gate set will be found and the Frobenius distance term causes the optimization to choose the gate set closest to the target gates that is also in TP.  If a perfectly TP gate set cannot be gauge-optimized to, then the resulting gate set compromises between being TP and being close to the target gate set, with the intent that the TP penalty term dominates.

\begin{table}[h]
\begin{center}
\putfield{bestTPGatesetSpamTable}{BestTarget gate set rho and E vectors table will be placed here}
\caption{\textbf{The GST estimate of the SPAM operations}.  Compare to Table \ref{targetSpamTable}.\label{bestTPGatesetSpamTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTPGatesetSpamParametersTable}{BestTarget gate set spam parametesr table will be placed here}
\caption{\textbf{GST estimate of SPAM probabilities}.  Computed by taking the dot products of vectors in Table \ref{bestTPGatesetSpamTable}.\label{bestTPGatesetSpamParametersTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTPGatesetGatesTable}{BestTarget gate set's gates table will be placed here}
\caption{\textbf{The GST estimate of the logic gate operations}.  Compare to Table \ref{targetGatesTable}.\label{bestTPGatesetGatesTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTPGatesetVsTargetTable}{BestTarget gate set overview table will be placed here}
\vspace{2em}
\putfield{bestTPGatesetErrorGenTable}{Best gate set error generator table will be placed here}
\caption{\textbf{Comparison of GST estimated gates to target gates}.  This table presents, for each of the gates, three different measures of distance or discrepancy from the GST estimate to the ideal target operation.  See text for more detail.  The column labeled ``Error Generator'' gives the Lindbladian $\mathbb{L}$ that describes \emph{how} the gate is failing to match the target.  This error generator is defined by the equation \putfield{errorgenformula}{??}. \label{bestTPGatesetVsTargetTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestTPGatesetDecompTable}{BestTarget gate set overview table will be placed here}
\vspace{2em}
\putfield{bestTPGatesetRotnAxisTable}{Best gate set rotn axis table will be placed here}
\caption{\textbf{Eigen-decomposition of estimated gates}.  Each estimated gate is described in terms of: (1) the eigenvalues of the superoperator; (2) the gate's fixed point (as a vector in $\mathcal{B}(\mathcal{H})$, in the Pauli basis); (3)  the axis around which it rotates, as a vector in $\mathcal{B}(\mathcal{H})$; (4) the angle of the rotation that it applies; (5) the decay rate along the axis of rotation (``diagonal decay''); and (6) the decay rate perpendicular to the axis of rotation (``off-diagonal decay'').  ``--'' indicates that the decomposition failed or couldn't be interpreted. \label{bestTPGatesetDecompTable}}
\end{center}
\end{table}


\begin{table}[h]
\begin{center}
\putfield{bestTPGatesetClosestUnitaryTable}{BestTarget gate set overview table will be placed here}
\caption{Information pertaining to the closest unitary gate to each of the estimated gates.\label{bestTPGatesetClosestUnitaryTable}}
\end{center}
\end{table}


\begin{table}[h]
\begin{center}
\putfield{bestTPGatesetChoiTable}{BestTarget gate set's choi matrix table will be placed here}
\caption{\textbf{Choi matrix representation of the GST estimated gate set}.  This table lists Choi representations of the estimated gates, and their eigenvalues.  Unitary gates have a spectrum $(1,0,0\ldots)$, just like pure quantum states.  Negative eigenvalues are non-physical, and may represent either statistical fluctuations or violations of the CPTP model used by GST.\label{bestTPGatesetChoiTable}}
\end{center}
\end{table}

\clearpage

\subsection{Gauge optimization to CPTP}
The gauge is chosen to minimize a quantity indicating the ``non-CPTP-ness'' of the gate set, along with a slight preference for being close to the target gate set.  In particular, we first optimize the gate set to TP (as described above), and then minimize the logarithm of a CP ``penalty term'' which we take as the sum of
\begin{enumerate}
\item the absolute values of any negative eigenvalues possessed by a gate's Choi matrix
\item the absolute value of any negative eigenvalues of a state preparation density matrix
\item the absolute difference between the trace of a state preparation density matrix and one
\item the distance between an eigenvalue of an effect operator and the interval $[0,1]$.
\end{enumerate}
within the space of TP-preserving gauge transformations.  This CP penalty term is added to the Frobenius distance between the estimate and the target gate set, weighted by $10^{-4}$ to give the final objective function.

\begin{table}[h]
\begin{center}
\putfield{bestCPTPGatesetSpamTable}{BestTarget gate set rho and E vectors table will be placed here}
\caption{\textbf{The GST estimate of the SPAM operations}.  Compare to Table \ref{targetSpamTable}.\label{bestCPTPGatesetSpamTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestCPTPGatesetSpamParametersTable}{BestTarget gate set spam parametesr table will be placed here}
\caption{\textbf{GST estimate of SPAM probabilities}.  Computed by taking the dot products of vectors in Table \ref{bestCPTPGatesetSpamTable}.\label{bestCPTPGatesetSpamParametersTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestCPTPGatesetGatesTable}{BestTarget gate set's gates table will be placed here}
\caption{\textbf{The GST estimate of the logic gate operations}.  Compare to Table \ref{targetGatesTable}.\label{bestCPTPGatesetGatesTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestCPTPGatesetVsTargetTable}{BestTarget gate set overview table will be placed here}
\vspace{2em}
\putfield{bestCPTPGatesetErrorGenTable}{Best gate set error generator table will be placed here}
\caption{\textbf{Comparison of GST estimated gates to target gates}.  This table presents, for each of the gates, three different measures of distance or discrepancy from the GST estimate to the ideal target operation.  See text for more detail.  The column labeled ``Error Generator'' gives the Lindbladian $\mathbb{L}$ that describes \emph{how} the gate is failing to match the target.  This error generator is defined by the equation \putfield{errorgenformula}{??}. \label{bestCPTPGatesetVsTargetTable}}
\end{center}
\end{table}

\begin{table}[h]
\begin{center}
\putfield{bestCPTPGatesetDecompTable}{BestTarget gate set overview table will be placed here}
\vspace{2em}
\putfield{bestCPTPGatesetRotnAxisTable}{Best gate set rotn axis table will be placed here}
\caption{\textbf{Eigen-decomposition of estimated gates}.  Each estimated gate is described in terms of: (1) the eigenvalues of the superoperator; (2) the gate's fixed point (as a vector in $\mathcal{B}(\mathcal{H})$, in the Pauli basis); (3)  the axis around which it rotates, as a vector in $\mathcal{B}(\mathcal{H})$; (4) the angle of the rotation that it applies; (5) the decay rate along the axis of rotation (``diagonal decay''); and (6) the decay rate perpendicular to the axis of rotation (``off-diagonal decay'').  ``--'' indicates that the decomposition failed or couldn't be interpreted. \label{bestCPTPGatesetDecompTable}}
\end{center}
\end{table}


\begin{table}[h]
\begin{center}
\putfield{bestCPTPGatesetClosestUnitaryTable}{BestTarget gate set overview table will be placed here}
\caption{Information pertaining to the closest unitary gate to each of the estimated gates.\label{bestCPTPGatesetClosestUnitaryTable}}
\end{center}
\end{table}


\begin{table}[h]
\begin{center}
\putfield{bestCPTPGatesetChoiTable}{BestTarget gate set's choi matrix table will be placed here}
\caption{\textbf{Choi matrix representation of the GST estimated gate set}.  This table lists Choi representations of the estimated gates, and their eigenvalues.  Unitary gates have a spectrum $(1,0,0\ldots)$, just like pure quantum states.  Negative eigenvalues are non-physical, and may represent either statistical fluctuations or violations of the CPTP model used by GST.\label{bestCPTPGatesetChoiTable}}
\end{center}
\end{table}

\clearpage
}{}

\iftoggle{pixelplotsappendix}{
\section{Pixel plots for intermediate gate sets\label{appendix_logL_pixelplots}}

This appendix contains $2\Delta\log(\mathcal{L})$ pixel-plots for the intermediate estimates computed by GST on dataset ``\putfield{datasetLabel}{DATASET LABEL HERE}'' using a subset of the available data.  Each estimate was computed using only base sequences of length up to $L$, for $L=1,2,4,8,\ldots$.  These plots are \emph{not} identical to subsets of Figure \ref{bestEstimateColorBoxPlot}, because the estimated gate set is different.  Since these estimates only attempt to fit a subset of the data, they generally do much better at fitting that subset.  (They do very badly, in general, at predicting longer sequences; for this reason the $2\Delta\log(\mathcal{L})$ values of those out-of-sample sequences are not shown).  See main text and caption of Figure \ref{bestEstimateColorBoxPlot} for more details.

\putfield{intermediate_pixel_plot_figures}{LogL pixel plots for intermediate gate sets will be placed here}
}{}

\iftoggle{whackamoleappendix}{
\section{Whack-a-mole plots for select gate sequences\label{appendix_whack_a_mole}}

This appendix shows whimsically named ``Whack-a-mole'' plots.  The point of these plots is to answer the question ``Why is GST failing to fit the data in the block corresponding to base sequence XXX?''  This question usually comes up after examining Figure \ref{bestEstimateColorBoxPlot} and identifying a particularly bad block.  Usually, the answer is ``Because GST was also trying to fit other data, in block YYY.''  It's often useful to know specifically \emph{which} experiments are the stumbling block -- i.e., which experiments would be even more badly fit by the estimate \emph{if} we demanded that the data in base sequence XXX be fit better.

This question can be answered by examining the derivatives of $2\Delta\log(\mathcal{L})$ with respect to  the gate set, evaluated at the stationary point (local minimum) corresponding to the GST estimate.  By doing so, it is possible to simulate what would happen if, by demanding a better fit to the data in block XXX, we attempted to ``whack'' the large $2\Delta\log(\mathcal{L})$ values in block XXX.  Unsurprisingly, whacking the XXX mole causes another one to pop up somewhere else (the GST fit is a local minimum of $2\Delta\log(\mathcal{L})$, and hopefully a global one too, so there is no way to improve $2\Delta\log(\mathcal{L})$).  Where this occurs can provide some insight into what is stopping GST from fitting the data better (and therefore into what's wrong with the gates).

In the Whack-a-mole plots shown below, each of the longest base sequences is independently ``whacked'' -- i.e., the analysis attempts to reduce the $2\Delta\log(\mathcal{L})$ for that particular base sequence.  The plots answer the question, ``If the $2\Delta\log(\mathcal{L})$ contribution for this base sequence was forced downward by 10 units, how much would the $2\Delta\log(\mathcal{L})$ contributions for other experiments have to rise?''  Thus, the number on the ``whacked'' block is always $-10$.  Blocks with negative values in this analysis are correlated tightly with the whacked block (improving the fit on the whacked block improves their fit as well).  Blocks with large positive values are incompatible with the whacked block (improving the fit on the whacked block makes the fit on such a block worse).  These plots can thus be used to identify inconsistencies in the data.

\putfield{whackamole_plot_figures}{Whack-a-mole plots for select gate sets will be placed here}
}{}
