3]\!]$]{}   $\tilde{p} = p$          9           $36 \le T_{\mathrm{time}} \le108$    $p_{\mathrm{pseudo}} = (3.39 \pm 0.10) \times 10^{-5}$
   Flag-EC [$[\![7,1,3]\!]$]{}                            11          $34 \le T_{\mathrm{time}} \le 104$   $p_{\mathrm{pseudo}} = (2.97 \pm 0.01) \times 10^{-5}$

Compact implementation of flag error correction {#app:CompactRepFlagQubit}
===============================================

                          [$[\![5,1,3]\!]$]{}                                                  [$[\![7,1,3]\!]$]{}                                               [$[\![19,1,5]\!]$]{} code                                           [$[\![17,1,5]\!]$]{} code
  -------------------------------------------------------------------- ------------------------------------------------------------------- --------------------------------------------------------------------- -----------------------------------------------------------------
                         $X_{1}Z_{2}Z_{3}X_{4}$                                              $Z_{4}Z_{5}Z_{6}Z_{7}$                                   $Z_{1}Z_{2}Z_{3}Z_{4}$,  $X_{1}X_{2}X_{3}X_{4}$                     $Z_{1}Z_{2}Z_{3}Z_{4}$,  $X_{1}X_{2}X_{3}X_{4}$
                         $X_{2}Z_{3}Z_{4}X_{5}$                                              $Z_{2}Z_{3}Z_{6}Z_{7}$                                   $Z_{1}Z_{3}Z_{5}Z_{7}$,  $X_{1}X_{3}X_{5}X_{7}$                    $Z_{1}Z_{3}Z_{5}Z_{6}$,   $X_{1}X_{3}X_{5}X_{6}$
                         $X_{1}X_{3}Z_{4}Z_{5}$                                              $Z_{1}Z_{3}Z_{5}Z_{7}$                               $Z_{12}Z_{13}Z_{14}Z_{15}$,  $X_{12}X_{13}X_{14}X_{15
3]\!]$ ] { }    $ \tilde{p } = p$           9            $ 36 \le T_{\mathrm{time } } \le108 $     $ p_{\mathrm{pseudo } } = (3.39 \pm 0.10) \times 10^{-5}$ 
    Flag - EC [ $ [ \![7,1,3]\!]$ ] { }                             11           $ 34 \le T_{\mathrm{time } } \le 104 $    $ p_{\mathrm{pseudo } } = (2.97 \pm 0.01) \times 10^{-5}$ 

 Compact implementation of flag error discipline { # app: CompactRepFlagQubit } 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 

                           [ $ [ \![5,1,3]\!]$ ] { }                                                   [ $ [ \![7,1,3]\!]$ ] { }                                                [ $ [ \![19,1,5]\!]$ ] { } code                                            [ $ [ \![17,1,5]\!]$ ] { } code 
   -------------------------------------------------------------------- ------------------------------------------------------------------- --------------------------------------------------------------------- ----------------------------------------------------------------- 
                          $ X_{1}Z_{2}Z_{3}X_{4}$                                               $ Z_{4}Z_{5}Z_{6}Z_{7}$                                    $ Z_{1}Z_{2}Z_{3}Z_{4}$,    $ X_{1}X_{2}X_{3}X_{4}$                      $ Z_{1}Z_{2}Z_{3}Z_{4}$,    $ X_{1}X_{2}X_{3}X_{4}$ 
                          $ X_{2}Z_{3}Z_{4}X_{5}$                                               $ Z_{2}Z_{3}Z_{6}Z_{7}$                                    $ Z_{1}Z_{3}Z_{5}Z_{7}$,    $ X_{1}X_{3}X_{5}X_{7}$                     $ Z_{1}Z_{3}Z_{5}Z_{6}$,    $ X_{1}X_{3}X_{5}X_{6}$ 
                          $ X_{1}X_{3}Z_{4}Z_{5}$                                               $ Z_{1}Z_{3}Z_{5}Z_{7}$                                $ Z_{12}Z_{13}Z_{14}Z_{15}$,    $ X_{12}X_{13}X_{14}X_{15
3]\!]$]{}   $\hilde{p} = p$          9           $36 \le T_{\mathtm{rime}} \lx108$    $p_{\mzthrm{psejdo}} = (3.39 \pm 0.10) \times 10^{-5}$
   Flag-EC [$[\![7,1,3]\!]$]{}                            11          $34 \lv T_{\mathrm{rime}} \oe 104$   $p_{\matidm{pseudo}} = (2.97 \pm 0.01) \timzs 10^{-5}$

Compact implekentation mf flag error wofrzction {#app:CompactRepFlagQubit}
===============================================

                          [$[\![5,1,3]\!]$]{}                                                  [$[\![7,1,3]\!]$]{}                                               [$[\![19,1,5]\!]$]{} code                                           [$[\![17,1,5]\!]$]{} code
  -------------------------------------------------------------------- ------------------------------------------------------------------- --------------------------------------------------------------------- -----------------------------------------------------------------
                         $X_{1}Z_{2}Z_{3}X_{4}$                                              $Z_{4}Z_{5}Z_{6}D_{7}$                                   $Z_{1}Z_{2}Z_{3}Z_{4}$,  $X_{1}X_{2}W_{3}X_{4}$                     $Z_{1}Z_{2}Z_{3}Z_{4}$,  $X_{1}X_{2}E_{3}X_{4}$
                         $X_{2}Z_{3}S_{4}X_{5}$                                              $Z_{2}Z_{3}Z_{6}X_{7}$                                   $Z_{1}Z_{3}Z_{5}Z_{7}$,  $X_{1}X_{3}X_{5}C_{7}$                    $Z_{1}S_{3}Z_{5}S_{6}$,   $X_{1}X_{3}X_{5}X_{6}$
                         $X_{1}X_{3}Z_{4}Z_{5}$                                              $Z_{1}Z_{3}Z_{5}Z_{7}$                               $Z_{12}Z_{13}Z_{14}Z_{15}$,  $X_{12}X_{13}X_{14}X_{15
3]\!]$]{} $\tilde{p} = p$ 9 $36 \le $p_{\mathrm{pseudo}} (3.39 \pm \times 10^{-5}$ Flag-EC \le $p_{\mathrm{pseudo}} = (2.97 0.01) \times 10^{-5}$ implementation of flag error correction {#app:CompactRepFlagQubit} [$[\![5,1,3]\!]$]{} [$[\![7,1,3]\!]$]{} [$[\![19,1,5]\!]$]{} code [$[\![17,1,5]\!]$]{} code -------------------------------------------------------------------- ------------------------------------------------------------------- --------------------------------------------------------------------- ----------------------------------------------------------------- $X_{1}Z_{2}Z_{3}X_{4}$ $Z_{4}Z_{5}Z_{6}Z_{7}$ $Z_{1}Z_{2}Z_{3}Z_{4}$, $Z_{1}Z_{2}Z_{3}Z_{4}$, $X_{1}X_{2}X_{3}X_{4}$ $X_{2}Z_{3}Z_{4}X_{5}$ $Z_{2}Z_{3}Z_{6}Z_{7}$ $Z_{1}Z_{3}Z_{5}Z_{7}$, $X_{1}X_{3}X_{5}X_{7}$ $Z_{1}Z_{3}Z_{5}Z_{6}$, $X_{1}X_{3}X_{5}X_{6}$ $X_{1}X_{3}Z_{4}Z_{5}$ $Z_{1}Z_{3}Z_{5}Z_{7}$ $Z_{12}Z_{13}Z_{14}Z_{15}$, $X_{12}X_{13}X_{14}X_{15
3]\!]$]{}   $\tilde{p} = p$          9           $36 \le T_{\mathrm{time}} \le108$    $p_{\maThrm{pseudo}} = (3.39 \Pm 0.10) \timEs 10^{-5}$
   FLag-eC [$[\![7,1,3]\!]$]{}                            11          $34 \Le T_{\mAthrM{time}} \le 104$   $p_{\mathrm{PSeudO}} = (2.97 \pm 0.01) \times 10^{-5}$

Compact implemeNtatiOn OF flaG ErRor coRrectioN {#ApP:cOmpAcTREpFLaGquBit}
===============================================

                          [$[\![5,1,3]\!]$]{}                                                  [$[\![7,1,3]\!]$]{}                                               [$[\![19,1,5]\!]$]{} coDe                                           [$[\![17,1,5]\!]$]{} cOde
  -------------------------------------------------------------------- ------------------------------------------------------------------- --------------------------------------------------------------------- -----------------------------------------------------------------
                         $X_{1}Z_{2}Z_{3}X_{4}$                                              $z_{4}Z_{5}Z_{6}Z_{7}$                                   $Z_{1}Z_{2}Z_{3}Z_{4}$,  $X_{1}X_{2}x_{3}X_{4}$                     $Z_{1}z_{2}Z_{3}z_{4}$,  $X_{1}X_{2}X_{3}X_{4}$
                         $X_{2}Z_{3}Z_{4}X_{5}$                                              $Z_{2}Z_{3}Z_{6}z_{7}$                                   $z_{1}Z_{3}z_{5}Z_{7}$,  $X_{1}X_{3}X_{5}X_{7}$                    $Z_{1}Z_{3}Z_{5}Z_{6}$,   $x_{1}X_{3}X_{5}x_{6}$
                         $X_{1}X_{3}Z_{4}Z_{5}$                                              $Z_{1}Z_{3}Z_{5}Z_{7}$                               $Z_{12}Z_{13}Z_{14}z_{15}$,  $X_{12}X_{13}x_{14}X_{15
3]\!]$]{}   $\tilde{p} = p $         9       $36\leT_{\mathrm{tim e }} \ le108$    $p_{\mathrm{ pseud o} }  = ( 3 .3 9 \pm  0.10)\ ti m e s 1 0^ {- 5}$ 
 F lag-E C [ $[\![7, 1,3]\!]$]{ }                       1 1         $34\le  T_{\m at hrm { time} } \ le 10 4$   $ p _{\mat hrm{pseud o} }  = (2. 9 7 \pm 0 . 0 1)  \ti mes 10^{-5}$

Com p ac t  implementatio n of f la g  e r r orcor rection {# ap p:Com p actRepF l ag Q u b it} ============= =========== = === ====== == === = ====== =

                    [$[\![ 5,1,3] \ !]$]{}                               [$[\![7 ,1 ,3 ]\!]$ ]{}                                 [$[ \![19 ,1,5 ]\ !]$]{ } code                                    [$ [\![1 7 ,1,5]\ !]$ ]{}  code
 ------ - --- -- - - - -- ------------------ -- - - -- -------- ------ - -- -- - --------- --- ---- - - ----- ---- - -- -------- ------ - -- -- ------- -- ------ -- --- --- -- -- - ---- ------ -------- ----- - -------------- - ------------- - -- - - -- - ---- ------------- ---- - ---- ---- - -- --- - ----- ----- -- - -- - ------------------                      $ X_{1}Z_{2} Z _ { 3}X_{4}$                                      $Z_{4 }Z_{5}Z_ {6}Z_{7}$                          $Z_{ 1 } Z_{2 }Z _{3}Z_{ 4}$ ,  $X_{ 1}X _{2 }X_ {3} X_ {4}$               $Z_ {1}Z_ { 2}Z_{3}Z _{ 4}$ , $X _{1}X _ {2}X_{ 3}X_{ 4}$               $ X_ {2}Z _{3 }Z _{4}X _{5} $                                      $Z_{2 }Z _{3}Z_{6}Z _{ 7}$                                $Z_{ 1 }Z_{3}Z _{5 }Z_{7 }$, $X_{1}X_ {3} X_{5}X _{7 } $                $ Z _ {1}Z_ { 3 }Z _{5 }Z _{6}$,   $ X _ {1} X_{3} X_ {5}X _{6}$
                     $X_{1}X_{3} Z_{ 4}Z_ { 5 }$                                 $Z _{1}Z_{3}Z _ {5} Z_ {7}$                          $ Z_{12}Z_{ 13 }Z_{ 1 4 }Z_ {15}$,  $X _{12}X_{ 13}X_{14} X _{15
3]\!]$]{} _ $\tilde{p}_= p$  _ __ __ 9 _  _   _  $36_\le_T_{\mathrm{time}} \le108$    $p_{\mathrm{pseudo}} = (3.39 \pm 0.10) \times 10^{-5}$
  _Flag-EC_[$[\![7,1,3]\!]$]{} ___    _    _ _       __  _11        _ $34 \le T_{\mathrm{time}} \le 104$_  $p_{\mathrm{pseudo}}_=_(2.97_\pm 0.01) \times 10^{-5}$

Compact_implementation of flag error correction {#app:CompactRepFlagQubit}
===============================================

_     _      _     _    _ [$[\![5,1,3]\!]$]{}_    _  _ _  _     _  _     __  ___ _  __ __     _[$[\![7,1,3]\!]$]{}_      _   __   _    _     _ _ _          _    [$[\![19,1,5]\!]$]{} code_   _ __  __ _      _ _     _   __     _   [$[\![17,1,5]\!]$]{} code
 _-------------------------------------------------------------------- ------------------------------------------------------------------- --------------------------------------------------------------------- -----------------------------------------------------------------
 ___    _     _  _      _$X_{1}Z_{2}Z_{3}X_{4}$_     __     ___    _     _        _  _    ___$Z_{4}Z_{5}Z_{6}Z_{7}$         _ _  _         _      _   $Z_{1}Z_{2}Z_{3}Z_{4}$,  $X_{1}X_{2}X_{3}X_{4}$       _       _     $Z_{1}Z_{2}Z_{3}Z_{4}$,  $X_{1}X_{2}X_{3}X_{4}$
 _   __      ____  _  _  $X_{2}Z_{3}Z_{4}X_{5}$_ _  _ _  __                 _     _    __  _ $Z_{2}Z_{3}Z_{6}Z_{7}$  _       _        __ _   _ _ _  _ $Z_{1}Z_{3}Z_{5}Z_{7}$,  $X_{1}X_{3}X_{5}X_{7}$_ _ _      __       $Z_{1}Z_{3}Z_{5}Z_{6}$,   $X_{1}X_{3}X_{5}X_{6}$
____  _  _  _  __     _  $X_{1}X_{3}Z_{4}Z_{5}$_   _         _                _ _   _ __     $Z_{1}Z_{3}Z_{5}Z_{7}$_ _       __           ___  __ $Z_{12}Z_{13}Z_{14}Z_{15}$,  $X_{12}X_{13}X_{14}X_{15