You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
all(elem.parent == GA for elem in A) &&all(elem.parent == GA for elem in B) ||error("The base rings of all elements in both matrices must be the same as the group algebra")
107
-
new(A, B, GA, repr)
107
+
code =new(A, B, GA, repr)
108
+
QuantumClifford.check_allrowscommute(parity_checks(code)) ||error("The Lifted Product Code just created is invalid -- its rows do not commute. This is either a bug in this library, or a non-commutative group algebra was used.")
# we are using the group algebra and the representation function of the first lifted code
112
114
c₁.GA == GA && c₂.GA == GA ||error("The base rings of both lifted codes must be the same as the group algebra")
113
-
new(c₁.A, c₂.A, GA, repr)
115
+
code =new(c₁.A, c₂.A, GA, repr)
116
+
QuantumClifford.check_allrowscommute(parity_checks(code)) ||error("The Lifted Product Code just created is invalid -- its rows do not commute. This is either a bug in this library, or a non-commutative group algebra was used.")
ERROR: The CSS code just created is invalid -- its rows do not commute. This is either a bug in this library, or an inconsistent parity check matrices were provided to the CSS constructor.
61
+
[...]
67
62
```
68
63
69
64
### Cyclic Groups
@@ -111,6 +106,8 @@ where the order is `2m`.
111
106
The [[24, 8, 3]] 2BGA code from Appendix C, Table III in [lin2024quantum](@cite) is constructed
112
107
by specifying a group presentation below (giving the group `D₆ = C₆ ⋉ C₂`).
113
108
109
+
Currently unsupported as it requires a non-commutative group algebra.
110
+
114
111
```jldoctest finitegrp
115
112
julia> m = 6;
116
113
@@ -129,15 +126,8 @@ julia> a = [one(G), r^4];
129
126
julia> b = [one(G), s*r^4, r^3, r^4, s*r^2, r];
130
127
131
128
julia> c = twobga_from_fp_group(a, b, GA);
132
-
133
-
julia> order(G)
134
-
12
135
-
136
-
julia> code_n(c), code_k(c)
137
-
(24, 8)
138
-
139
-
julia> describe(G), small_group_identification(G)
140
-
("D12", (12, 4))
129
+
ERROR: The CSS code just created is invalid -- its rows do not commute. This is either a bug in this library, or an inconsistent parity check matrices were provided to the CSS constructor.
Copy file name to clipboardExpand all lines: lib/QECCore/src/codes/css.jl
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -15,10 +15,21 @@ struct CSS <: AbstractCSSCode
15
15
n =size(Hx, 2)
16
16
if n !=size(Hz, 2) error("When constructing a CSS quantum code, the two classical codes are required to have the same block size") end
17
17
#if size(Hx,1)+size(Hz,1) >= n error("When constructing a CSS quantum code, the total number of checks (rows) in the parity checks of the two classical codes have to be lower than the block size (the number of columns).") end
18
+
check_allrowscommute(Hx, Hz) ||error("The CSS code just created is invalid -- its rows do not commute. This is either a bug in this library, or an inconsistent parity check matrices were provided to the CSS constructor.")
0 commit comments