Documentation

MerLeanBpqc.Definitions.Def_5_LDPCCode

Definition 5: LDPC Code #

A family of CSS codes (Def_4) is called low-density parity-check (LDPC) if there exists some w ∈ ℕ such that for each member of the family, the parity-check matrices H_X and H_Z satisfy: (1) every row has Hamming weight at most w, and (2) every column has Hamming weight at most w. Equivalently, both H_X and H_Z have row weight and column weight bounded by w, uniformly across the family.

Main Definitions #

Row and column weight of a linear map #

For a linear map f : (Fin n → 𝔽₂) →ₗ[𝔽₂] (Fin m → 𝔽₂), corresponding to an m × n matrix:

def rowWeight {n m : } (f : (Fin n𝔽₂) →ₗ[𝔽₂] Fin m𝔽₂) (i : Fin m) :

The Hamming weight of row i of the matrix representation of f. For f : (Fin n → 𝔽₂) →ₗ[𝔽₂] (Fin m → 𝔽₂) and i : Fin m, this counts the number of columns j such that the (i, j)-entry of the matrix is nonzero.

Equations
Instances For
    def colWeight {n m : } (f : (Fin n𝔽₂) →ₗ[𝔽₂] Fin m𝔽₂) (j : Fin n) :

    The Hamming weight of column j of the matrix representation of f. For f : (Fin n → 𝔽₂) →ₗ[𝔽₂] (Fin m → 𝔽₂) and j : Fin n, this counts the number of rows i such that the (i, j)-entry of the matrix is nonzero.

    Equations
    Instances For
      def HasBoundedWeight {n m : } (f : (Fin n𝔽₂) →ₗ[𝔽₂] Fin m𝔽₂) (w : ) :

      A linear map f : (Fin n → 𝔽₂) →ₗ[𝔽₂] (Fin m → 𝔽₂) has bounded weight w if every row and every column of its matrix representation has Hamming weight at most w.

      Equations
      Instances For

        LDPC property for CSS code families #

        The LDPC property is defined for a family of CSS codes indexed by some type ι. For each member, both H_X and H_Z must have bounded row and column weight.

        Since the CSSCode structure stores H_Z^T rather than H_Z, we observe that row weight of H_Z = column weight of H_Z^T and column weight of H_Z = row weight of H_Z^T. Thus "H_Z has bounded weight w" is equivalent to "H_Z^T has bounded weight w", since both row and column weights are bounded by the same w.

        def CSSCode.IsLDPC {ι : Type u_1} {n rX rZ : ι} (family : (α : ι) → CSSCode (n α) (rX α) (rZ α)) :

        A family of CSS codes indexed by ι is low-density parity-check (LDPC) if there exists a uniform bound w : ℕ such that for every member of the family, both H_X and H_Z have all row weights and column weights at most w.

        Since the CSS code stores H_Z^T and the weight bound w applies to both rows and columns, HasBoundedWeight HZT w captures exactly that H_Z has bounded row and column weight w (with rows and columns swapped).

        Equations
        Instances For