\chapter{Fault Tolerant QEC} \section{Fault Tolerance} \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} \subsection{Stim} \begin{figure}[t] \centering \newcommand{\xerr}{\gate[style={fill=KITblue!50}]{\phantom{1}}} \newcommand{\xyzerr}{\gate[style={ draw=black, fill=KITred, path picture={ % tex-fmt: off \fill[KITblue!60] ($(path picture bounding box.south west)+(0,0)$) -- ($(path picture bounding box.north west)+(0,0)$) -- ($(path picture bounding box.north west)+(0.28,0)$) -- cycle; \fill[KITorange!60] ($(path picture bounding box.north east)+(0,0)$) -- ($(path picture bounding box.south east)+(0,0)$) -- ($(path picture bounding box.south east)+(-0.28,0)$) -- cycle; \fill[KITred!60] ($(path picture bounding box.north east)+(0,0)$) -- ($(path picture bounding box.south east)+(-0.28,0)$) -- ($(path picture bounding box.south west)+(0,0)$) -- ($(path picture bounding box.north west)+(0.28,0)$) -- cycle; % tex-fmt: on } }]{\phantom{1}}} \begin{subfigure}{0.48\textwidth} \centering % tex-fmt: off \begin{quantikz}[row sep=4mm, column sep=4mm] & \xyzerr & \ctrl{3} & & & & & \\ \lstick{$\ket{\psi}$} & \xyzerr & & \ctrl{2} & \ctrl{3} & & & \\ & \xyzerr & & & & \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 \caption{Depolarizing channel.} \end{subfigure}% \begin{subfigure}{0.48\textwidth} \centering % tex-fmt: off \begin{quantikz}[row sep=4mm, column sep=4mm] & \xerr & \ctrl{3} & & & & & & \\ \lstick{$\ket{\psi}$} & \xerr & & \ctrl{2} & \ctrl{3} & & & & \\ & \xerr & & & & \ctrl{2} & & & \\ \lstick{$\ket{0}_{\text{A}_1}$} & & \targ{} & \targ{} & & & \xerr & \meter{} & \setwiretype{c} \\ \lstick{$\ket{0}_{\text{A}_2}$} & & & & \targ{} & \targ{} & \xerr & \meter{} & \setwiretype{c} \end{quantikz} % tex-fmt: on \caption{Phenomenological noise.} \end{subfigure} \vspace*{3mm} \centering \begin{subfigure}[c]{0.75\textwidth} \centering % tex-fmt: off \begin{quantikz}[row sep=4mm, column sep=2mm] & \xyzerr & \ctrl{3} & \xyzerr \wire[d][3]{q} & & & & & & & & & \\ \lstick{$\ket{\psi}$} & \xyzerr & & & \ctrl{2} & \xyzerr \wire[d][2]{q} & \ctrl{3} & \xyzerr \wire[d][3]{q} & & & & & \\ & \xyzerr & & & & & & & \ctrl{2} & \xyzerr \wire[d][2]{q} & & & \\ \lstick{$\ket{0}_{\text{A}_1}$} & \xyzerr & \targ{} & \xyzerr & \targ{} & \xyzerr & & & & & \xerr & \meter{} & \setwiretype{c} \\ \lstick{$\ket{0}_{\text{A}_2}$} & \xyzerr & & & & & \targ{} & \xyzerr & \targ{} & \xyzerr & \xerr & \meter{} & \setwiretype{c} \end{quantikz} % tex-fmt: on \caption{Circuit-level noise.} \end{subfigure}% \hfill% \begin{subfigure}[c]{0.25\textwidth} \centering % tex-fmt: off \begin{quantikz}[row sep=4mm, column sep=2mm] \setwiretype{n} & \xerr & \gate[style={right, draw=none, xshift=-15mm}]{\text{X error}} \\ \setwiretype{n} & \xyzerr & \gate[style={right, draw=none, xshift=-15mm}]{\text{X,Z, or Y error}} \\ \setwiretype{n} & \gate{\phantom{1}}\wire[d][1]{q} & \gate[style={right, draw=none, xshift=-15mm},2]{\text{Correlated error}} \\ \setwiretype{n} & \gate{\phantom{1}} & \end{quantikz} % tex-fmt: on \end{subfigure} \caption{Types of noise models.} \label{fig:Types of noise models.} \end{figure} \begin{figure}[t] \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} \begin{figure}[t] \centering \begin{minipage}{0.3\textwidth} \centering \begin{tikzpicture} \node{$% \bm{\Omega} = \begin{pmatrix} 1 & 1 & 0 \\ 0 & 1 & 1 \\ 1 & 1 & 0 \\ 0 & 1 & 1 \\ 1 & 1 & 0 \\ 0 & 1 & 1 \end{pmatrix}% $ }; \draw [ line width=1pt, decorate, decoration={brace,mirror,amplitude=3mm,raise=5mm} ] (1,0.55) -- (1,1.4) node[midway,right,xshift=10mm]{$\text{SE}_1$}; \draw [ line width=1pt, decorate, decoration={brace,mirror,amplitude=3mm,raise=5mm} ] (1,-0.4) -- (1,0.45) node[midway,right,xshift=10mm]{$\text{SE}_2\hspace{2mm},$}; \draw [ line width=1pt, decorate, decoration={brace,mirror,amplitude=3mm,raise=5mm} ] (1,-1.38) -- (1,-0.5) node[midway,right,xshift=10mm]{$\text{SE}_3$}; \end{tikzpicture} \end{minipage}% \begin{minipage}{0.3\textwidth} \centering \vspace*{-6mm} \begin{gather*} \bm{s} \in \text{span} \mleft\{ \bm{\Omega} \mright\} \end{gather*} \end{minipage} \newcommand{\preperr}[1]{ \gate[style={fill=orange!20}]{\scriptstyle #1} } \vspace*{10mm} \begin{quantikz}[ row sep=4mm, column sep=4mm, wire types={q,q,q,q,q,n,n,n,n}, execute at end picture={ \draw [ line width=1pt, decorate, decoration={brace,amplitude=3mm,raise=9mm} ] (\tikzcdmatrixname-4-19.north east) -- (\tikzcdmatrixname-5-19.south east) node[midway,right,xshift=14mm]{$\text{SE}_1$}; \draw [ line width=1pt, decorate, decoration={brace,amplitude=3mm,raise=9mm} ] (\tikzcdmatrixname-6-19.north east) -- (\tikzcdmatrixname-7-19.south east) node[midway,right,xshift=14mm]{$\text{SE}_2$}; \draw [ line width=1pt, decorate, decoration={brace,amplitude=3mm,raise=9mm} ] (\tikzcdmatrixname-8-19.north east) -- (\tikzcdmatrixname-9-19.south east) node[midway,right,xshift=14mm]{$\text{SE}_3$}; } ] % tex-fmt: off \lstick[3]{$\ket{\psi}$} & \preperr{E_0} & \ctrl{3} & & & & & & \ctrl{5} & & & & & & \ctrl{7} & & & & & \\ & \preperr{E_1} & & \ctrl{2} & \ctrl{3} & & & & & \ctrl{4} & \ctrl{5} & & & & & \ctrl{6} & \ctrl{7} & & & \\ & \preperr{E_2} & & & & \ctrl{2} & & & & & & \ctrl{4} & & & & & & \ctrl{6} & & \\ \lstick{$\ket{0}_{\text{A}_1}$} & & \targ{} & \targ{} & & & & & & & & & & & & & & & \meter{} & \setwiretype{c} \\ \lstick{$\ket{0}_{\text{A}_2}$} & & & & \targ{} & \targ{} & & & & & & & & & & & & & \meter{} & \setwiretype{c} \\ & & & & & & \lstick{$\ket{0}_{\text{A}_3}$} & \setwiretype{q} & \targ{} & \targ{} & & & & & & & & & \meter{} & \setwiretype{c} \\ & & & & & & \lstick{$\ket{0}_{\text{A}_4}$} & \setwiretype{q} & & & \targ{} & \targ{} & & & & & & & \meter{} & \setwiretype{c} \\ & & & & & & & & & & & & \lstick{$\ket{0}_{\text{A}_5}$} & \setwiretype{q} & \targ{} & \targ{} & & & \meter{} & \setwiretype{c} \\ & & & & & & & & & & & & \lstick{$\ket{0}_{\text{A}_6}$} & \setwiretype{q} & & & \targ{} & \targ{} & \meter{} & \setwiretype{c} % tex-fmt: on \end{quantikz} \caption{ Repeated syndrome extraction circuit for the two-qubit repetition code under bit flip noise. } \end{figure} \begin{figure}[t] \begin{gather*} \hspace*{-33.3mm}% \begin{array}{c} E_6 \\ \downarrow \end{array} \end{gather*} \vspace*{-8mm} \begin{gather*} \bm{\Omega} = \left( \begin{array}{ cccccc% >{\columncolor{red!20}}c% cccccccc } 1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 0 & 0 & 1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 1 & 1 & 0 & 0 & 0 & 1 & 1 & 0 & 1 & 0 \\ 0 & 1 & 1 & 0 & 0 & 0 & 1 & 1 & 0 & 0 & 0 & 1 & 1 & 0 & 1 \end{array} \right), \hspace*{7mm} \bm{s} \in \text{span} \mleft\{ \bm{\Omega} \mright\} \end{gather*} \vspace*{10mm} \newcommand{\preperr}[1]{ \gate[style={fill=orange!20}]{\scriptstyle #1} } \newcommand{\measerr}{\gate[style={fill=blue!20}]{\phantom{1}}} \newcommand{\noise}{ \gate[style={noisy}]{\text{\small X}}% \setwiretype{n}% \wire[l][1]{q} } \newcommand{\redwire}[1]{ \wire[r][#1][style={draw=red, line width=1.5pt}]{q} } \newcommand{\redtarg}{ \targ[style={draw=red}]{}% \setwiretype{n}% \wire[l][1]{q} } \newcommand{\redctrl}[1]{ \ctrl[style={draw=red,fill=red,line width=1.5pt}]{#1} } \newcommand{\redmeter}{\meter[style={draw=red,fill=red!20}]{}} \tikzset{ noisy/.style={ starburst, starburst point height=2.5mm, fill=red!25, draw=red!85!black, line width=1.5pt, inner xsep=-2pt, inner ysep=-2pt }, } \centering \scalebox{0.9}{ % tex-fmt: off \begin{quantikz}[row sep=4mm, column sep=4mm, wire types={q,q,q,q,q,n,n,n,n}] \lstick[3]{$\ket{\psi}$} & \preperr{E_0} & \ctrl{3} & & & & \preperr{E_5} & & \ctrl{5} & & & & \preperr{E_{10}} & & \ctrl{7} & & & & & & \\ & \preperr{E_1} & & \ctrl{2} & \ctrl{3} & & \noise\redwire{14} & & & \redctrl{4} & \redctrl{5} & & \preperr{E_{11}} & & & \redctrl{6} & \redctrl{7} & & & & \\ & \preperr{E_2} & & & & \ctrl{2} & \preperr{E_7} & & & & & \ctrl{4} & \preperr{E_{12}} & & & & & \ctrl{6} & & & \\ \lstick{$\ket{0}_{\text{A}_1}$} & & \targ{} & \targ{} & & & & & & & & & & & & & & & \preperr{E_3} & \meter{} & \setwiretype{c} \\ \lstick{$\ket{0}_{\text{A}_2}$} & & & & \targ{} & \targ{} & & & & & & & & & & & & & \preperr{E_4} & \meter{} & \setwiretype{c} \\ & & & & & & \lstick{$\ket{0}_{\text{A}_3}$} & \setwiretype{q} & \targ{} & \redtarg\redwire{10} & & & & & & & & & \preperr{E_8} & \redmeter\wire[r][1][style={draw=red,double, line width=1.5pt}]{q} & \setwiretype{n} \\ & & & & & & \lstick{$\ket{0}_{\text{A}_4}$} & \setwiretype{q} & & & \redtarg\redwire{9} & \targ{} & & & & & & & \preperr{E_9} & \redmeter\wire[r][1][style={draw=red,double, line width=1.5pt}]{q} & \setwiretype{n} \\ & & & & & & & & & & & & \lstick{$\ket{0}_{\text{A}_5}$} & \setwiretype{q} & \targ{} & \redtarg\redwire{4} & & & \preperr{E_{13}} & \redmeter\wire[r][1][style={draw=red,double, line width=1.5pt}]{q} & \setwiretype{n} \\ & & & & & & & & & & & & \lstick{$\ket{0}_{\text{A}_6}$} & \setwiretype{q} & & & \redtarg\redwire{3} & \targ{} & \preperr{E_{14}} & \redmeter\wire[r][1][style={draw=red,double, line width=1.5pt}]{q} & \setwiretype{n} \end{quantikz} % tex-fmt: on } \caption{ Repeated syndrome extraction circuit for the two-qubit repetition code under phenomenological noise. } \end{figure} \begin{figure}[t] \centering \hspace*{-5mm} \begin{minipage}{0.42\textwidth} \newcommand{\redwire}[1]{ \wire[r][#1][style={draw=red, line width=1.5pt, double}]{q} } \newcommand{\inwire}{ \wire[l][1][style={draw=red, line width=1.5pt}]{q} } \newcommand{\redtarg}{ \targ[style={draw=red,line width=1.5pt}]{}% \setwiretype{n}% } \newcommand{\redctrl}[1]{ \ctrl[style={draw=red,fill=red, line width=1.5pt}]{0}% \wire[d][#1][style={draw=red, line width=1.5pt, double}]{q} } \newcommand{\redmeter}{\meter[style={draw=red,fill=red!20}]{}} \newcommand{\redgate}[1]{\gate[style={draw=red,fill=red!20}]{\textcolor{red}{#1}}} \scalebox{0.9}{ % tex-fmt: off \begin{quantikz}[row sep=4mm, column sep=4mm, wire types={n,n,n,n,n,n}] & \meter{}\wire[l][1]{q}\wire[r][1]{c} & \setwiretype{c} & & & \ctrl[vertical wire=c]{2} & & \gate{D_1} \\ & \meter{}\wire[l][1]{q}\wire[r][1]{c} & \setwiretype{c} & & & & \ctrl[vertical wire=c]{2} & \gate{D_2} \\ & \redmeter{}\inwire\redwire{6} & & \redctrl{2} & & \targ{} & & \redgate{D_3} \\ & \redmeter{}\inwire\redwire{6} & & & \redctrl{2} & & \targ{} & \redgate{D_4} \\ & \redmeter{}\inwire\redwire{2} & & \redtarg\wire[r][4]{c} & & & & \gate{D_5} \\ & \redmeter{}\inwire\redwire{3} & & & \redtarg\wire[r][3]{c} & & & \gate{D_6} \end{quantikz} % tex-fmt: on } \end{minipage}% \begin{minipage}{0.56\textwidth} \newcommand\cc{\cellcolor{blue!20}} \begin{align*} \bm{H} = % tex-fmt: off \left(\begin{array}{ccccccccccccccc} 1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \cc{0} & \cc{0} & \cc{0} & \cc{1} & \cc{0} & 1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ \cc{0} & \cc{0} & \cc{0} & \cc{0} & \cc{1} & 0 & 1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ \cc{0} & \cc{0} & \cc{0} & \cc{0} & \cc{0} & \cc{0} & \cc{0} & \cc{0} & \cc{1} & \cc{0} & 1 & 1 & 0 & 1 & 0 \\ \cc{0} & \cc{0} & \cc{0} & \cc{0} & \cc{0} & \cc{0} & \cc{0} & \cc{0} & \cc{0} & \cc{1} & 0 & 1 & 1 & 0 & 1 \end{array}\right) % tex-fmt: on \end{align*} \end{minipage} \caption{Construction of the detectors from the measurements.} \label{fig:Construction of the detectors from the measurements} \end{figure} \begin{figure}[t] \centering \hspace*{-114mm}% \begin{tikzpicture} \draw[decorate, decoration={brace, amplitude=10pt}, line width=1pt] (0,0) -- (3.1,0) node[midway, above=4mm] {Commit region}; \end{tikzpicture} \centering \includegraphics[scale=0.75]{res/72_bb_dem.pdf} \vspace*{-25.3mm} \hspace*{-98mm}% \begin{tikzpicture} \draw[{Latex}-{Latex}, line width=.7pt] (0, -0.75mm) -- (0, 5mm); \draw[line width=1pt] (-1mm,-0.75mm) -- (3mm,-0.75mm); \draw[line width=1pt] (-1mm,5mm) -- (3mm,5mm); \node[left] at (-2mm,2.125mm) {$\sim W$}; \draw[{Latex}-{Latex}, line width=.3pt] (6.5cm,1.6mm) -- (6.5cm,5mm); \draw[line width=1pt] (6.5cm,4.9mm) -- (6.5cm,7mm); \node[above] at (6.5cm,7mm) {$\sim F$}; \end{tikzpicture} \vspace*{10mm} \caption{ Visualization of the windowing process on the detector error matrix. } \label{fig:windowing_pcm} \end{figure} \begin{figure}[t] \centering \tikzset{ VN/.style={ circle, fill=KITgreen, minimum width=1mm, minimum height=1mm, }, CN/.style={ rectangle, fill=KITblue, minimum width=1mm, minimum height=1mm, }, } \begin{tikzpicture}[node distance = 5mm] \node[VN] (vn00) {}; \node[VN, below = of vn00] (vn01) {}; \node[VN, below = of vn01] (vn02) {}; \node[VN, below = of vn02] (vn03) {}; \node[VN, below = of vn03] (vn04) {}; \coordinate (temp) at ($(vn01)!0.5!(vn02)$); \node[CN, left =10mm of temp] (cn00) {}; \node[CN, below = of cn00] (cn01) {}; \draw (vn00) -- (cn00); \draw (vn01) -- (cn00); \draw (vn03) -- (cn00); \draw (vn01) -- (cn01); \draw (vn02) -- (cn01); \draw (vn04) -- (cn01); \foreach \i in {1,2,3,4} { \pgfmathtruncatemacro{\prev}{\i-1} \node[VN, right = 25mm of vn\prev 0] (vn\i0) {}; \node[VN, below = of vn\i0] (vn\i1) {}; \node[VN, below = of vn\i1] (vn\i2) {}; \node[VN, below = of vn\i2] (vn\i3) {}; \node[VN, below = of vn\i3] (vn\i4) {}; \coordinate (temp) at ($(vn\i1)!0.5!(vn\i2)$); \node[CN, left = 10mm of temp] (cn\i0) {}; \node[CN, below = of cn\i0] (cn\i1) {}; \draw (vn\i0) -- (cn\i0); \draw (vn\i1) -- (cn\i0); \draw (vn\i3) -- (cn\i0); \draw (vn\i1) -- (cn\i1); \draw (vn\i2) -- (cn\i1); \draw (vn\i4) -- (cn\i1); } \foreach \i in {1,2,3,4} { \pgfmathtruncatemacro{\prev}{\i-1} \draw (vn\prev 3) -- (cn\i 0); \draw (vn\prev 4) -- (cn\i 1); } \node[ draw, inner sep=5mm,line width=1pt, fit=(vn00)(vn04)(cn00)(cn01)(vn20)(vn24)(cn20)(cn21) ] (box1) {}; \node[ draw, dashed, inner sep=5mm, inner ysep=8mm,line width=1pt, fit=(vn10)(vn14)(cn10)(cn11)(vn30)(vn34)(cn30)(cn31) ] (box2) {}; % Marker for W on the bottom \draw[line width=1pt] ([yshift=-5mm, line width=1pt]box1.south west) -- ++(0,-4mm) coordinate (dim1l); \draw[line width=1pt] ([yshift=-5mm]box1.south east) -- ++(0,-4mm) coordinate (dim1r); \draw[{Latex}-{Latex}, line width=1pt] ([yshift=1mm]dim1l) -- ([yshift=1mm]dim1r) node[midway, below=2pt] {$W$}; % Marker for F on top \draw[line width=1pt] ([yshift=3mm]box2.north west) -- ++(0,4mm) coordinate (dim3l); \draw[line width=1pt] ([yshift=3mm]box2.north west -| box1.north west) -- ++(0,4mm) coordinate (dim3r); \draw[{Latex}-{Latex}, line width=1pt] ([yshift=-1mm]dim3l) -- ([yshift=-1mm]dim3r) node[midway, above=2pt] {$F$}; % Arrow on the top right \draw[-{Latex}, line width=1pt] ([yshift=8mm] box1.north east) -- ++(28mm,0); \end{tikzpicture} \caption{Visualization of the windowing process on the Tanner graph.} \label{fig:windowing_tanner} \end{figure} \begin{figure}[t] \centering \tikzset{ VN/.style={ circle, fill=KITgreen, minimum width=1mm, minimum height=1mm, }, CN/.style={ rectangle, fill=KITblue, minimum width=1mm, minimum height=1mm, }, } \begin{tikzpicture}[node distance = 5mm] \node[VN] (vn00) {}; \node[VN, below = of vn00] (vn01) {}; \node[VN, below = of vn01] (vn02) {}; \node[VN, below = of vn02] (vn03) {}; \node[VN, below = of vn03] (vn04) {}; \coordinate (temp) at ($(vn01)!0.5!(vn02)$); \node[CN, left =10mm of temp] (cn00) {}; \node[CN, below = of cn00] (cn01) {}; \draw (vn00) -- (cn00); \draw (vn01) -- (cn00); \draw (vn03) -- (cn00); \draw (vn01) -- (cn01); \draw (vn02) -- (cn01); \draw (vn04) -- (cn01); \foreach \i in {1,2,3,4} { \pgfmathtruncatemacro{\prev}{\i-1} \node[VN, right = 25mm of vn\prev 0] (vn\i0) {}; \node[VN, below = of vn\i0] (vn\i1) {}; \node[VN, below = of vn\i1] (vn\i2) {}; \node[VN, below = of vn\i2] (vn\i3) {}; \node[VN, below = of vn\i3] (vn\i4) {}; \coordinate (temp) at ($(vn\i1)!0.5!(vn\i2)$); \node[CN, left = 10mm of temp] (cn\i0) {}; \node[CN, below = of cn\i0] (cn\i1) {}; \draw (vn\i0) -- (cn\i0); \draw (vn\i1) -- (cn\i0); \draw (vn\i3) -- (cn\i0); \draw (vn\i1) -- (cn\i1); \draw (vn\i2) -- (cn\i1); \draw (vn\i4) -- (cn\i1); } \foreach \i in {1,2,3,4} { \pgfmathtruncatemacro{\prev}{\i-1} \draw (vn\prev 3) -- (cn\i 0); \draw (vn\prev 4) -- (cn\i 1); } \node[ draw, inner sep=5mm,line width=1pt, fit=(vn00)(vn04)(cn00)(cn01)(vn20)(vn24)(cn20)(cn21) ] (box1) {}; \node[ draw, dashed, inner sep=5mm, inner ysep=8mm,line width=1pt, fit=(vn10)(vn14)(cn10)(cn11)(vn30)(vn34)(cn30)(cn31) ] (box2) {}; \draw[KITorange, line width=2pt] (cn10) -- (vn10); \draw[KITorange, line width=2pt] (cn10) -- (vn11); \draw[KITorange, line width=2pt] (cn10) -- (vn13); \draw[KITorange, line width=2pt] (cn11) -- (vn11); \draw[KITorange, line width=2pt] (cn11) -- (vn12); \draw[KITorange, line width=2pt] (cn11) -- (vn14); \draw[KITorange, line width=2pt] (vn13) -- (cn20); \draw[KITorange, line width=2pt] (vn14) -- (cn21); \draw[KITorange, line width=2pt] (cn20) -- (vn20); \draw[KITorange, line width=2pt] (cn20) -- (vn21); \draw[KITorange, line width=2pt] (cn20) -- (vn23); \draw[KITorange, line width=2pt] (cn21) -- (vn21); \draw[KITorange, line width=2pt] (cn21) -- (vn22); \draw[KITorange, line width=2pt] (cn21) -- (vn24); % Marker for W on the bottom \draw[line width=1pt] ([yshift=-5mm, line width=1pt]box1.south west) -- ++(0,-4mm) coordinate (dim1l); \draw[line width=1pt] ([yshift=-5mm]box1.south east) -- ++(0,-4mm) coordinate (dim1r); \draw[{Latex}-{Latex}, line width=1pt] ([yshift=1mm]dim1l) -- ([yshift=1mm]dim1r) node[midway, below=2pt] {$W$}; % Marker for F on top \draw[line width=1pt] ([yshift=3mm]box2.north west) -- ++(0,4mm) coordinate (dim3l); \draw[line width=1pt] ([yshift=3mm]box2.north west -| box1.north west) -- ++(0,4mm) coordinate (dim3r); \draw[{Latex}-{Latex}, line width=1pt] ([yshift=-1mm]dim3l) -- ([yshift=-1mm]dim3r) node[midway, above=2pt] {$F$}; % Arrow on the top right \draw[-{Latex}, line width=1pt] ([yshift=8mm] box1.north east) -- ++(28mm,0); \end{tikzpicture} \caption{ Visualization of the messages used for the initialization of the next window. } \label{fig:messages_tanner} \end{figure} \begin{figure}[t] \centering \tikzset{ VN/.style={ circle, fill=KITgreen, minimum width=1mm, minimum height=1mm, }, CN/.style={ rectangle, fill=KITblue, minimum width=1mm, minimum height=1mm, }, } \begin{tikzpicture}[node distance = 5mm] \node[VN] (vn00) {}; \node[VN, below = of vn00] (vn01) {}; \node[VN, below = of vn01] (vn02) {}; \node[VN, below = of vn02] (vn03) {}; \node[VN, below = of vn03] (vn04) {}; \coordinate (temp) at ($(vn01)!0.5!(vn02)$); \node[CN, left =10mm of temp] (cn00) {}; \node[CN, below = of cn00] (cn01) {}; \draw (vn00) -- (cn00); \draw (vn01) -- (cn00); \draw (vn03) -- (cn00); \draw (vn01) -- (cn01); \draw (vn02) -- (cn01); \draw (vn04) -- (cn01); \foreach \i in {1,2,3,4} { \pgfmathtruncatemacro{\prev}{\i-1} \node[VN, right = 25mm of vn\prev 0] (vn\i0) {}; \node[VN, below = of vn\i0] (vn\i1) {}; \node[VN, below = of vn\i1] (vn\i2) {}; \node[VN, below = of vn\i2] (vn\i3) {}; \node[VN, below = of vn\i3] (vn\i4) {}; \coordinate (temp) at ($(vn\i1)!0.5!(vn\i2)$); \node[CN, left = 10mm of temp] (cn\i0) {}; \node[CN, below = of cn\i0] (cn\i1) {}; \draw (vn\i0) -- (cn\i0); \draw (vn\i1) -- (cn\i0); \draw (vn\i3) -- (cn\i0); \draw (vn\i1) -- (cn\i1); \draw (vn\i2) -- (cn\i1); \draw (vn\i4) -- (cn\i1); } \foreach \i in {1,2,3,4} { \pgfmathtruncatemacro{\prev}{\i-1} \draw (vn\prev 3) -- (cn\i 0); \draw (vn\prev 4) -- (cn\i 1); } \node[ draw, inner sep=5mm,line width=1pt, fit=(vn00)(vn04)(cn00)(cn01)(vn20)(vn24)(cn20)(cn21) ] (box1) {}; \node[ draw, dashed, inner sep=5mm, inner ysep=8mm,line width=1pt, fit=(vn10)(vn14)(cn10)(cn11)(vn30)(vn34)(cn30)(cn31) ] (box2) {}; \draw[KITorange, line width=2pt] (cn10) -- (vn10); \draw[KITorange, line width=2pt] (cn10) -- (vn11); \draw[KITorange, line width=2pt] (cn10) -- (vn13); \draw[KITorange, line width=2pt] (cn11) -- (vn11); \draw[KITorange, line width=2pt] (cn11) -- (vn12); \draw[KITorange, line width=2pt] (cn11) -- (vn14); \draw[KITorange, line width=2pt] (vn13) -- (cn20); \draw[KITorange, line width=2pt] (vn14) -- (cn21); \draw[KITorange, line width=2pt] (cn20) -- (vn20); \draw[KITorange, line width=2pt] (cn20) -- (vn21); \draw[KITorange, line width=2pt] (cn20) -- (vn23); \draw[KITorange, line width=2pt] (cn21) -- (vn21); \draw[KITorange, line width=2pt] (cn21) -- (vn22); \draw[KITorange, line width=2pt] (cn21) -- (vn24); \node[VN, draw=KITorange, fill=KITorange] at (vn10) {}; \node[VN, draw=KITorange, fill=KITorange] at (vn11) {}; \node[VN, draw=KITorange, fill=KITorange] at (vn12) {}; \node[VN, draw=KITorange, fill=KITorange] at (vn13) {}; \node[VN, draw=KITorange, fill=KITorange] at (vn14) {}; \node[VN, draw=KITorange, fill=KITorange] at (vn20) {}; \node[VN, draw=KITorange, fill=KITorange] at (vn21) {}; \node[VN, draw=KITorange, fill=KITorange] at (vn22) {}; \node[VN, draw=KITorange, fill=KITorange] at (vn23) {}; \node[VN, draw=KITorange, fill=KITorange] at (vn24) {}; % Marker for W on the bottom \draw[line width=1pt] ([yshift=-5mm, line width=1pt]box1.south west) -- ++(0,-4mm) coordinate (dim1l); \draw[line width=1pt] ([yshift=-5mm]box1.south east) -- ++(0,-4mm) coordinate (dim1r); \draw[{Latex}-{Latex}, line width=1pt] ([yshift=1mm]dim1l) -- ([yshift=1mm]dim1r) node[midway, below=2pt] {$W$}; % Marker for F on top \draw[line width=1pt] ([yshift=3mm]box2.north west) -- ++(0,4mm) coordinate (dim3l); \draw[line width=1pt] ([yshift=3mm]box2.north west -| box1.north west) -- ++(0,4mm) coordinate (dim3r); \draw[{Latex}-{Latex}, line width=1pt] ([yshift=-1mm]dim3l) -- ([yshift=-1mm]dim3r) node[midway, above=2pt] {$F$}; % Arrow on the top right \draw[-{Latex}, line width=1pt] ([yshift=8mm] box1.north east) -- ++(28mm,0); \end{tikzpicture} \caption{ Visualization of the messages and decimation information used for the initialization of the next window. } \label{fig:messages_decimation_tanner} \end{figure}