Add ReedMullerCSSCode: self-orthogonal CSS(RM(r,m),RM(r,m)) codes with closed-form distance - #567
Conversation
Self-orthogonal CSS code family CSS(RM(r,m), RM(r,m)) with parameters
[[2^m, 2^m - 2*sum_{j<=r} C(m,j), 2^(r+1)]] for 2r < m-1.
- Stabilizer generators: rows of the RM(r,m) generator matrix
(pairwise orthogonal since RM(r,m) is strictly self-orthogonal)
- Closed-form distance 2^(r+1) via Reed-Muller minimum-weight theorem,
making distance evaluation O(1) instead of exponential in block length
- X/Z distances equal; promise_equal_distance_xz=True
- Closes qLDPCOrg#566
89459a6 to
9cae65e
Compare
|
Thank you for the contribution! I'll try to review soon. Meanwhile, could you please change the name to |
|
Done — renamed to |
| self._order = order | ||
| self._size = size | ||
| generator = np.atleast_2d(ReedMullerCode.get_generator(order, size)) | ||
| super().__init__(generator, generator, is_subsystem_code=False, promise_equal_distance_xz=True) |
There was a problem hiding this comment.
nit: if you pass the same generator matrix for X and Z, there's no need to explicitly set promise_equal_distance_xz=True
| super().__init__(generator, generator, is_subsystem_code=False, promise_equal_distance_xz=True) | |
| super().__init__(generator, generator, is_subsystem_code=False) |
|
Fixed the lint failures from the previous CI run (all were introduced by this PR):
The new CI run for daa9ac1 is sitting in |
|
Done. Feel free to merge if+when the checks pass. |
3ff9605 to
daa9ac1
Compare
Closes #566
Adds
ReedMullerCSSCode(order, size), the self-orthogonal CSS code family CSS(RM(r,m), RM(r,m)) with parametersConstruction. Stabilizer generators are the rows of the RM(r,m) generator matrix. When 2r < m-1, RM(r,m) is strictly self-orthogonal (RM(r,m) ⊆ RM(r,m)^⊥ = RM(m-r-1,m)), so the generators are pairwise orthogonal and the CSS construction is valid. The quantum dimension 2**m - 2*dim(RM(r,m)) follows automatically from the matrix ranks.
Closed-form distance. Both X- and Z-distance equal 2**(r+1), the minimum weight of a vector in RM(m-r-1,m) \ RM(r,m), attained by the indicator vector of an affine (r+1)-flat in AG(m,2) (MacWilliams & Sloane, Ch. 13).
_get_distance_exactreturns this value in O(1), replacing the exponential enumeration in the general distance algorithm.promise_equal_distance_xz=Truesince X- and Z-distances provably coincide.Cross-validation. The weight-4 X-logical counts for [[32,20,4]] (1240) and [[64,50,4]] (10416) match the anchors independently verified in the qec-distance-certificates package.
Tests. Parameter table ((0,2)→[[4,2,2]], (1,4)→[[16,6,4]], (1,5)→[[32,20,4]], (2,6)→[[64,20,8]], (2,7)→[[128,70,8]], (3,8)→[[256,70,16]], (2,10)→[[1024,912,8]]), self-orthogonality H_x H_z^T = 0, closed-form vs brute-force distance agreement on small codes, and invalid-parameter rejection (2r ≥ m-1 cases, incl. the k=0 boundaries (1,3), (2,5), (3,7)).
Related to #434 (logical error rates): this family is "directionally complete" — every single-qubit Pauli has a distinct syndrome — so logical operator error rates admit closed forms.
References: