Documentation

QEC1.Remarks.Rem_16_PracticalMeasurementRounds

Rem_16: Practical Measurement Rounds #

Statement #

The $d$ rounds of quantum error correction in the original code before and after the gauging measurement are required for the proof of fault-tolerance but are overkill in practice.

In a full fault-tolerant computation, the number of rounds required before and after a gauging measurement depends on the surrounding operations:

The theoretical requirement of $d$ rounds serves as a worst-case guarantee but practical implementations may use fewer rounds based on the specific computation context.

Main Definitions #

Main Results #

Section 1: Round Requirements #

The theoretical proof of fault tolerance requires d rounds of error correction before and after the gauging measurement. In practice, fewer rounds may suffice.

The type of round requirement: theoretical worst-case or practical.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      A round requirement specifies how many EC rounds are needed before and after gauging.

      • codeDistance :

        Code distance d

      • distance_pos : 0 < self.codeDistance

        Distance is positive

      • roundsBefore :

        Number of rounds before gauging

      • roundsAfter :

        Number of rounds after gauging

      • Type of requirement

      Instances For

        The theoretical requirement: d rounds before and after

        Equations
        Instances For
          def QEC1.practicalRoundRequirement (d : ) (hd : 0 < d) (rBefore rAfter : ) :

          A practical round requirement with potentially fewer rounds

          Equations
          Instances For

            Whether a round requirement uses full d rounds

            Equations
            Instances For

              Whether a round requirement uses fewer than d rounds

              Equations
              Instances For
                @[simp]

                The theoretical requirement uses full d rounds

                @[simp]

                The theoretical requirement uses d rounds before

                @[simp]

                The theoretical requirement uses d rounds after

                Section 2: Computation Context #

                The number of practical rounds depends on the surrounding computation context.

                Where in a computation the gauging measurement occurs

                Instances For
                  Equations
                  Instances For

                    The surrounding computation context for a gauging measurement

                    • position : GaugingPosition

                      Position of the gauging measurement in the computation

                    • totalOperations :

                      Total number of logical operations in the computation

                    • surroundingECPresent : Bool

                      Whether the surrounding operations provide additional error correction

                    • surroundingECRounds :

                      The effective number of EC rounds provided by surrounding operations

                    Instances For
                      def QEC1.midComputationContext (totalOps surroundingEC : ) :

                      A mid-computation context where surrounding operations provide EC

                      Equations
                      Instances For

                        An isolated context with no surrounding EC

                        Equations
                        Instances For

                          Whether a context provides additional error correction from surrounding operations

                          Equations
                          Instances For

                            Section 3: Practical Round Configuration #

                            A practical configuration allows fewer rounds based on computation context.

                            Configuration for practical round counts based on context

                            Instances For

                              Practical round counts are at most d

                              Whether a practical configuration uses strictly fewer rounds than d

                              Equations
                              Instances For

                                Whether a practical configuration uses a constant number of rounds (independent of d)

                                Equations
                                Instances For
                                  def QEC1.constantRoundConfig (d : ) (hd : 0 < d) (c : ) (hc : c d) (ctx : ComputationContext) :

                                  A constant-round configuration for mid-computation gauging

                                  Equations
                                  • QEC1.constantRoundConfig d hd c hc ctx = { codeDistance := d, distance_pos := hd, context := ctx, practicalRoundsBefore := c, practicalRoundsAfter := c, before_le_d := hc, after_le_d := hc }
                                  Instances For
                                    theorem QEC1.constant_rounds_suffice_mid_computation (d : ) (hd : 0 < d) (c : ) (hc : c d) (hc_pos : 0 < c) (ctx : ComputationContext) (_h_mid : ctx.position = GaugingPosition.middle) (_h_surrounding : ctx.hasSurroundingEC) :
                                    have config := constantRoundConfig d hd c hc ctx; config.usesConstantRounds c config.practicalRoundsBefore > 0 config.practicalRoundsAfter > 0

                                    Theorem: Constant rounds suffice in mid-computation

                                    If a gauging measurement occurs in the middle of a large computation with surrounding error correction, a constant number c of rounds before and after is expected to be sufficient to ensure fault tolerance.

                                    theorem QEC1.constant_rounds_fewer_than_d (d : ) (hd : 0 < d) (c : ) (hc_le : c d) (hc_lt : c < d) (ctx : ComputationContext) :

                                    Constant rounds may use strictly fewer than d rounds (when c < d)

                                    Section 4: Effective Code Parameters #

                                    The choice of round count affects the effective distance and threshold.

                                    Effective code parameters under a given round configuration

                                    • originalDistance :

                                      The original code distance d

                                    • effectiveDistance :

                                      The effective distance (may be reduced with fewer rounds)

                                    • hasThreshold : Bool

                                      Whether a fault-tolerance threshold exists

                                    • roundConfig : RoundRequirement

                                      The round configuration used

                                    Instances For

                                      With full d rounds, the effective distance equals the original distance

                                      Equations
                                      Instances For
                                        def QEC1.reducedRoundsParameters (d : ) (hd : 0 < d) (effectiveDist rBefore rAfter : ) :

                                        With fewer rounds, the effective distance may be reduced

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          @[simp]

                                          Full rounds preserve the original distance

                                          theorem QEC1.fewer_rounds_affect_effective_distance (d : ) (_hd : 0 < d) (params : EffectiveCodeParameters) (_h_fewer : params.roundConfig.usesFewerRounds) (h_eff_le : params.effectiveDistance params.originalDistance) (h_orig : params.originalDistance = d) :

                                          Theorem: Fewer rounds affect effective distance

                                          The choice of fewer EC rounds before and after gauging affects the effective code distance and threshold, depending on the surrounding operations.

                                          With full d rounds, effective distance is exactly d

                                          Section 5: Worst-Case vs Practical Guarantees #

                                          The theoretical d-round requirement is a worst-case guarantee.

                                          A guarantee type: worst-case (proven for all contexts) or context-dependent

                                          Instances For
                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For

                                              A fault-tolerance guarantee with its type and associated round count

                                              • guaranteeType : GuaranteeType

                                                Type of guarantee

                                              • codeDistance :

                                                Code distance

                                              • roundsBefore :

                                                Rounds before gauging

                                              • roundsAfter :

                                                Rounds after gauging

                                              • isValid : Bool

                                                The guarantee is valid (fault tolerance holds with these rounds)

                                              Instances For

                                                The worst-case guarantee with d rounds

                                                Equations
                                                Instances For

                                                  A context-dependent guarantee with constant rounds

                                                  Equations
                                                  Instances For

                                                    Theorem: d rounds is a worst-case guarantee

                                                    The theoretical requirement of d rounds serves as a worst-case guarantee: it ensures fault tolerance regardless of what surrounds the gauging measurement.

                                                    Context-dependent guarantees use fewer rounds

                                                    Both guarantees are valid (for their respective contexts)

                                                    Section 6: Practical Implementations #

                                                    Practical implementations may use fewer rounds based on the specific computation context.

                                                    A practical implementation choice for round counts

                                                    Instances For

                                                      Whether the implementation uses fewer than d rounds

                                                      Equations
                                                      Instances For
                                                        theorem QEC1.practical_depends_on_context (impl1 impl2 : PracticalImplementation) (_h_same_d : impl1.codeDistance = impl2.codeDistance) (_h_diff_ctx : impl1.context.position impl2.context.position) (h_diff_rounds : impl1.chosenRoundsBefore impl2.chosenRoundsBefore) :

                                                        Theorem: Practical choice depends on context

                                                        The number of rounds required depends on the surrounding operations.

                                                        theorem QEC1.mid_computation_allows_fewer (_d : ) (_hd : 0 < _d) (c : ) (_hc_pos : 0 < c) (_hc_le : c _d) (hc_lt : c < _d) (impl_mid : PracticalImplementation) (_h_mid_pos : impl_mid.context.position = GaugingPosition.middle) (h_mid_rounds : impl_mid.chosenRoundsBefore = c) (impl_iso : PracticalImplementation) (_h_iso_pos : impl_iso.context.position = GaugingPosition.isolated) (h_iso_rounds : impl_iso.chosenRoundsBefore = _d) (_h_same_d : impl_mid.codeDistance = impl_iso.codeDistance) :

                                                        Mid-computation context allows fewer rounds than isolated context

                                                        Section 7: Connection to Rem_11 (Boundary Conditions) #

                                                        This remark builds on the boundary condition convention from Rem_11. The d rounds justify the perfect boundary convention (Rem_11), but fewer rounds may suffice in practical contexts.

                                                        Convert a PracticalRoundConfig to an ErrorCorrectionRounds (from Rem_11)

                                                        Equations
                                                        Instances For

                                                          With full d rounds, the conversion gives full protection (from Rem_11)

                                                          theorem QEC1.fewer_rounds_no_full_protection (d : ) (hd : 0 < d) (c : ) (hc_le : c d) (hc_lt : c < d) (ctx : ComputationContext) :

                                                          With fewer rounds, full protection is not provided

                                                          Section 8: Summary of the Remark #

                                                          The key points formalized:

                                                          1. Theoretical requirement: d rounds before and after gauging
                                                          2. Worst-case guarantee: d rounds ensures fault tolerance in all contexts
                                                          3. Practical sufficiency: constant rounds suffice in mid-computation settings
                                                          4. Trade-off: fewer rounds affect effective distance and threshold
                                                          5. Context-dependence: optimal choice depends on surrounding operations

                                                          Complete summary of the practical measurement rounds trade-off

                                                          • theoreticalRequirement :

                                                            d rounds are theoretically required

                                                          • isWorstCase : Bool

                                                            d rounds are a worst-case guarantee

                                                          • practicalMayUseFewer : Bool

                                                            Practical implementations may use fewer

                                                          • affectsDistance : Bool

                                                            Choice affects effective distance

                                                          • contextDependent : Bool

                                                            Choice depends on context

                                                          Instances For

                                                            The summary capturing all aspects of the remark

                                                            Equations
                                                            Instances For

                                                              Summary theorem: d rounds are overkill in practice

                                                              theorem QEC1.exists_constant_round_config (d : ) (hd : 0 < d) (ctx : ComputationContext) (_h_mid : ctx.position = GaugingPosition.middle) (_h_ec : ctx.hasSurroundingEC) :
                                                              ∃ (c : ) (_hc : c d), 0 < c (constantRoundConfig d hd c _hc ctx).usesConstantRounds c

                                                              Existence of a valid practical configuration with constant rounds