diff --git a/src/thesis/chapters/3_fault_tolerant_qec.tex b/src/thesis/chapters/3_fault_tolerant_qec.tex index 95d6cd0..37d10a8 100644 --- a/src/thesis/chapters/3_fault_tolerant_qec.tex +++ b/src/thesis/chapters/3_fault_tolerant_qec.tex @@ -1,21 +1,144 @@ +% TODO: Make all [H] -> [t] \chapter{Fault Tolerant QEC} -\section{Fault Tolerance} + +% Intro + +\content{Syndrome extraction circuitry itself introduces errors} +\content{High level explanation of fault tolerance (with figure)} +\content{Mathematical definition of fault tolerance} + +% Practical considerations + +\content{We generally need to perform multiple rounds of syndrome extraction} +\content{The number of rounds of syndrome extraction is usually +chosen equal to the $d_\text{min}$ of the code} +\content{One-shot decoding property} + +\begin{figure}[H] + \centering + + \begin{tikzpicture} + \node[rectangle, draw, fill=orange!20, minimum + height=2cm, minimum width=2.5cm, align=left] at (0,0) + (internal) {Internal\\ Errors}; + + \node[signal, draw, fill=orange!20, minimum height=2cm, + minimum width=2.5cm, align=left, signal pointer angle=140] + at (-2.45, 0) (input) {Input\\ Errors}; + + \node at (1.97,0) {\huge =}; + + \node[rectangle, draw, fill=orange!20, minimum height=2cm, + minimum width=2.5cm, align=left] at (4,0) (output) + {Output\\ Errors}; + + \node[above] at (input.north) {\small Input State}; + \node[above] at (internal.north) {\small QEC}; + \node[above] at (output.north) {\small Output State}; + \end{tikzpicture} + + \caption{Sources of error in a fault-tolerant \ac{qec} system.} +\end{figure} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Noise Models} -\subsection{Depolarizing Channel} -\subsection{Phenomenological Noise} -\subsection{Circuit-Level Noise} -\section{Detector Error Models} -\subsection{Measurement Syndrome Matrix} -\subsection{Detector Error Matrix} -\subsection{Detector Error Models} -\section{Practical Considerations} -\subsection{Practical Methodology} +\label{sec:Noise Models} -\content{Per-round-LER explanation} +% Intro -\subsection{Stim} +\content{Explanation of what a noise model is} +\content{Mention there are different types of noise models, each with +different possible error locations} -\begin{figure}[t] +% Figure intro + +\content{\autoref{fig:pure_syndrome_extraction} shows the syndrome + extraction circuit of a three-qubit repetition code with stabilizers + $Z_1Z_2$ and $Z_2Z_3$. This code is only able to deal with X errors. + We will use it as a propotypical model to examine the different types +of noise models} +\content{This is now a concrete implementation of the syndrome + measurement circuit using CNOT gates, as opposed to the system-level +view in \autoref{subsec:Stabilizer Codes}} +\content{\autoref{fig:noise_model_types} shows a number of diffent +types of noise models} + +% Bit-flip noise + +\content{Bit-flip noise} +\content{Introduce \emph{data qubits}} +\content{Only X errors on data qubits} +\content{Most similar to classical channel coding} +\content{\textbf{TODO}: What is this useful for? Just as a first step?} + +% Depolarizing channel + +\content{Depolarizing channel} +\content{X/Y/Z errors on data qubits} +\content{\textbf{TODO}: What does this model? Memory experiment with +ideal syndrome extraction?} +\content{\textbf{TODO}: Why is it called depolarizing?} + +% Phenomenological noise + +\content{Phenomenological noise} +\content{First noise model that considers errors during syndrome extraction} +\content{X errors before each syndrome extraction round} +\content{X errors before measurements} +\content{\textbf{TODO}: Why is this useful? Derks et al. mentioned +something about it being useful to derive fault-tolerant circuits} +\content{\textbf{TODO}: Make sure phenomenological noise is only X errors} + +% Circuit-level noise + +\content{Circuit-level noise} +\content{This is generally what we strive to be able to decode under} +\content{X/Y/Z errors before each syndrome extraction round} +\content{$n$-qubit Pauli errors after each $n$-qubit Pauli gate} +\content{Define $n$-qubit Pauli errors} +\content{X errors right before the measurements} +\content{Note that the only errors right before the measurements that + have any effect on the measurement outcomes are X errors. That is why +it is enough to consider this type of error at this point in the circuit.} + +% Different noise models for circuit-level noise + +\content{Comparison from Gidney's paper} +\content{In this work we only consider standard circuit-based +depolarizing noise} + +\begin{figure}[H] + \centering + + \begin{minipage}{0.5\textwidth} + \begin{align*} + \bm{H} = + \begin{pmatrix} + 1 & 1 & 0 \\ + 0 & 1 & 1 + \end{pmatrix} + \end{align*} + \end{minipage}% + \begin{minipage}{0.5\textwidth} + % tex-fmt: off + \begin{quantikz}%[row sep=4mm, column sep=4mm] + \lstick[3]{$\ket{\psi}_\text{L}$} & \ctrl{3} & & & & & \\ + & & \ctrl{2} & \ctrl{3} & & & \\ + & & & & \ctrl{2} & & \\ + \lstick{$\ket{0}_{\text{A}_1}$} & \targ{} & \targ{} & & & \meter{} & \setwiretype{c} \\ + \lstick{$\ket{0}_{\text{A}_2}$} & & & \targ{} & \targ{} & \meter{} & \setwiretype{c} + \end{quantikz} + % tex-fmt: on + \end{minipage}% + + \caption{ + Syndrome extraction circuit for the three-qubit repetition + code under bit-flip noise. + } + \label{fig:pure_syndrome_extraction} +\end{figure} + +\begin{figure}[H] \centering \newcommand{\xerr}{\gate[style={fill=KITblue!50}]{\phantom{1}}} @@ -125,67 +248,60 @@ \end{minipage} \caption{Types of noise models.} - \label{fig:Types of noise models.} + \label{fig:noise_model_types} \end{figure} -\begin{figure}[t] - \centering +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{Detector Error Models} +\label{sec:Detector Error Models} - \begin{tikzpicture} - \node[rectangle, draw, fill=orange!20, minimum - height=2cm, minimum width=2.5cm, align=left] at (0,0) - (internal) {Internal\\ Errors}; +\content{\textbf{TODO}: Look up how Derks et al. introduce DEMs} - \node[signal, draw, fill=orange!20, minimum height=2cm, - minimum width=2.5cm, align=left, signal pointer angle=140] - at (-2.45, 0) (input) {Input\\ Errors}; +% Different ways of implementing fault tolerance - \node at (1.97,0) {\huge =}; +\content{Ways of implementing fault tolerance different from DEMs} - \node[rectangle, draw, fill=orange!20, minimum height=2cm, - minimum width=2.5cm, align=left] at (4,0) (output) - {Output\\ Errors}; +% Core idea - \node[above] at (input.north) {\small Input State}; - \node[above] at (internal.north) {\small QEC}; - \node[above] at (output.north) {\small Output State}; - \end{tikzpicture} +\content{Model additional error locations in the code} +\content{Construct ``circuit code'' from original code} - \caption{Sources of error in a fault-tolerant \ac{qec} system.} -\end{figure} +% Benefits -\begin{figure}[t] - \centering +\content{Benefits of this approach} - \begin{minipage}{0.5\textwidth} - \begin{align*} - \bm{H} = - \begin{pmatrix} - 1 & 1 & 0 \\ - 0 & 1 & 1 - \end{pmatrix} - \end{align*} - \end{minipage}% - \begin{minipage}{0.5\textwidth} - % tex-fmt: off - \begin{quantikz}%[row sep=4mm, column sep=4mm] - \lstick[3]{$\ket{\psi}_\text{L}$} & \ctrl{3} & & & & & \\ - & & \ctrl{2} & \ctrl{3} & & & \\ - & & & & \ctrl{2} & & \\ - \lstick{$\ket{0}_{\text{A}_1}$} & \targ{} & \targ{} & & & \meter{} & \setwiretype{c} \\ - \lstick{$\ket{0}_{\text{A}_2}$} & & & \targ{} & \targ{} & \meter{} & \setwiretype{c} - \end{quantikz} - % tex-fmt: on - \end{minipage}% +%%%%%%%%%%%%%%%% +\subsection{Measurement Syndrome Matrix} +\label{subsec:Measurement Syndrome Matrix} - \caption{ - Syndrome extraction circuit for the three-qubit repetition - code under bit-flip noise. - } - \label{fig:} -\end{figure} +% Core idea -\begin{figure}[t] +\content{Core idea: Matrix describes parity checks \\ + $\rightarrow$ A column shows which parity checks the + corresponding VN contributes to \\ + $\rightarrow$ View columns as syndromes corresponding to error + locations in the circuit +} + +% Multiple rounds of syndrome extraction + +% TODO: First introduce syndrome measurement matrix, mathematically +% (consult Derks et al.'s paper). Then use the three-qubit repetition +% code as an example only +\autoref{fig:rep_code_multiple_rounds_bit_flip} shows a circuit +performing three rounds of syndrome extraction for the three-qubit +repetition code introduced earlier. +We are only considering bit-flip noise at this point. +For each syndrome extraction round, we get an additional set of +syndrome measurements. +We combine these measurements by stacking them in a new vector $\bm{s} +\in \mathbb{F}_2^{n_\text{rounds}\cdot(n-k)}$. +To model this behavior mathematically, we append additional rows to +the check matrix. +We call this matrix the \emph{measurement syndrome matrix} +$\bm{\Omega}$. + +\begin{figure}[H] \centering \begin{minipage}{0.3\textwidth} @@ -293,9 +409,10 @@ Repeated syndrome extraction circuit for the three-qubit repetition code under bit flip noise. } + \label{fig:rep_code_multiple_rounds_bit_flip} \end{figure} -\begin{figure}[t] +\begin{figure}[H] \begin{gather*} \hspace*{-33.3mm}% \begin{array}{c} @@ -388,7 +505,52 @@ } \end{figure} -\begin{figure}[t] +%%%%%%%%%%%%%%%% +\subsection{Detector Error Matrix} +\label{subsec:Detector Error Matrix} + +% Core idea + +% TODO: Make this a proper definition? +Instead of using the measurements as parity indicators directly, we +may wish to combine them in some way. +We call such combinations \emph{detectors}. +Formally, a detector is a parity constraint on a set of measurement +outcomes \cite[Def.~2.1]{derks_designing_2025}. + +\content{Detector matrix} + +\content{Detector error matrix} + +\content{One way of defining the detectors is ...} + +\begin{figure}[H] + \centering + + \tikzset{ + gate/.style={ + draw, %line width=1pt, + minimum height=2cm, + } + } + + % tex-fmt: off + \begin{quantikz}[row sep=2mm, column sep=4mm, wire types={q,q,q,n,n,n}] + \lstick[3]{$\ket{\psi}_\text{L}$} & \gate[3]{\text{SE}_1} & & \gate[3]{\text{SE}_2} & & \gate[3]{\text{SE}_3} & & \gate[3]{\text{SE}_4} & \\ + & & & & & & & & & \setwiretype{n} & \ldots \\ + & \wire[d][3]{c} & & \wire[d][1]{c} & & \wire[d][1]{c} & & \wire[d][1]{c} & \\ + & \ctrl[wire=c]{0}\wire[r][1]{c} & \wire[d][1]{c} & \ctrl[vertical wire=c]{1}\wire[r][1]{c} & \wire[d][1]{c} & \ctrl[vertical wire=c]{1}\wire[r][1]{c} & \wire[d][1]{c} & \ctrl[vertical wire=c]{1}\wire[r][1]{c} & \\ + & & \wire[r][1]{c} & \targ{}\wire[d][1]{c} & \wire[r][1]{c} & \targ{}\wire[d][1]{c} & \wire[r][1]{c} & \targ{}\wire[d][1]{c} & \\ + & \gate[1]{\bm{D}_1} & & \gate[1]{\bm{D}_2} & & \gate[1]{\bm{D}_3} & & \gate[1]{\bm{D}_4} & \\ + \end{quantikz} + % tex-fmt: on + + \caption{Construction of detectors from measurements in the general case.} +\end{figure} + +\content{The three-qubit repetition code as an exmaple} + +\begin{figure}[H] \centering \hspace*{-5mm} @@ -444,27 +606,38 @@ \label{fig:Construction of the detectors from the measurements} \end{figure} -\begin{figure}[t] - \centering +%%%%%%%%%%%%%%%% +\subsection{Detector Error Models} +\label{subsec:Detector Error Models} - \tikzset{ - gate/.style={ - draw, %line width=1pt, - minimum height=2cm, - } - } +\content{Combination of detector error matrix and noise model} +\content{Contains all information necessary for decoding +\cite[Intro.]{derks_designing_2025}} +\content{Not only useful for decoding, but also for ... (Derks et al.)} - % tex-fmt: off - \begin{quantikz}[row sep=2mm, column sep=4mm, wire types={q,q,q,n,n,n}] - \lstick[3]{$\ket{\psi}_\text{L}$} & \gate[3]{\text{SE}_1} & & \gate[3]{\text{SE}_2} & & \gate[3]{\text{SE}_3} & & \gate[3]{\text{SE}_4} & \\ - & & & & & & & & & \setwiretype{n} & \ldots \\ - & \wire[d][3]{c} & & \wire[d][1]{c} & & \wire[d][1]{c} & & \wire[d][1]{c} & \\ - & \ctrl[wire=c]{0}\wire[r][1]{c} & \wire[d][1]{c} & \ctrl[vertical wire=c]{1}\wire[r][1]{c} & \wire[d][1]{c} & \ctrl[vertical wire=c]{1}\wire[r][1]{c} & \wire[d][1]{c} & \ctrl[vertical wire=c]{1}\wire[r][1]{c} & \\ - & & \wire[r][1]{c} & \targ{}\wire[d][1]{c} & \wire[r][1]{c} & \targ{}\wire[d][1]{c} & \wire[r][1]{c} & \targ{}\wire[d][1]{c} & \\ - & \gate[1]{\bm{D}_1} & & \gate[1]{\bm{D}_2} & & \gate[1]{\bm{D}_3} & & \gate[1]{\bm{D}_4} & \\ - \end{quantikz} - % tex-fmt: on +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{Practical Considerations} +\label{sec:Practical Considerations} - \caption{Construction of detectors from measurements in the general case.} -\end{figure} +% Intro + +\content{Intro} + +%%%%%%%%%%%%%%%% +\subsection{Practical Methodology} +\label{subsec:Practical Methodology} + +\content{Per-round-LER explanation} + +%%%%%%%%%%%%%%%% +\subsection{Stim} +\label{subsec:Stim} + +\content{Circuit code heavily depends on the exact circuit construction} +\content{Not easy to predict how errors at different locations +propagate through the circuit an what detectors they affect} + +\content{Stim is a software package that generates DEMs from circuits} +\content{The user still has to define the circuit themselves, and +especially the detectors \cite[Sec~2.5]{derks_designing_2025}} diff --git a/src/thesis/chapters/4_decoding_under_dems.tex b/src/thesis/chapters/4_decoding_under_dems.tex index ad28b8e..acb8edb 100644 --- a/src/thesis/chapters/4_decoding_under_dems.tex +++ b/src/thesis/chapters/4_decoding_under_dems.tex @@ -1,3 +1,4 @@ +% TODO: Make all [H] -> [t] \chapter{Decoding under Detector Error Models} % Intro