Skip to content

Commit dc65a44

Browse files
authored
Merge branch 'dev' into fixdev
2 parents 2eb8ee4 + 6659f43 commit dc65a44

File tree

6 files changed

+365
-140
lines changed

6 files changed

+365
-140
lines changed

src/Classical/weight_dist.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,7 @@ function Gray_code_minimum_distance(C::AbstractLinearCode; verbose::Bool = false
595595

596596
if uppers[m] > w
597597
uppers[m] = w
598+
# TODO maybe so .= here
598599
founds[m] = c
599600
perms[m] = i
600601
# verbose && println("Adjusting upper bound: $upperlocal")

src/CodingTheory.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ export AbstractSubsystemCode, AbstractSubsystemCodeCSS, AbstractStabilizerCode,
7070
AbstractGraphStateStabilizerCSS, AbstractHypergraphProductCode, AbstractEASubsystemCode,
7171
AbstractEASubsystemCodeCSS, AbstractEAStabilizerCode, AbstractEAStabilizerCodeCSS
7272
# misc
73-
export LogicalTrait, GaugeTrait, HasLogicals, HasNoLogicals, HasGauges, HasNoGauges, copy, ChainComplex
73+
export LogicalTrait, GaugeTrait, CSSTrait, HasLogicals, HasNoLogicals, HasGauges, HasNoGauges,
74+
IsCSS, IsNotCSS, copy, ChainComplex
7475

7576
#############################
7677
# utils.jl
@@ -360,8 +361,8 @@ export polynomial, type, CWE_to_HWE, weight_enumerator, MacWilliams_identity,
360361
include("Quantum/weight_dist.jl")
361362
# export weight_plot_CSS_X, weight_plot_CSS_Z, weight_plot_CSS, minimum_distance_X_Z,
362363
# minimum_distance_X, minimum_distance_Z, is_pure, QDistRndCSS
363-
export minimum_distance_upper_bound!
364-
export QDistRndCSS
364+
export minimum_distance_upper_bound!, random_information_set_minimum_distance_bound!,
365+
QDistRand
365366

366367
#############################
367368
# Quantum/product_codes.jl

src/Quantum/graph_state.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
1010
Return the graph state defined by the graph `G`.
1111
"""
12-
function GraphState(G::SimpleGraph{Int64})
12+
function GraphState(G::SimpleGraph{Int})
1313
# probably need some checks on G here but maybe the function args are good enough
1414
A = adjacency_matrix(G)
1515
_, nc = size(A)
1616
for i in 1:nc
1717
iszero(A[i, i]) || throw(ArgumentError("Graph cannot have self-loops."))
1818
end
1919
# are there non-binary graph states?
20-
F = GF(2)
20+
F = Oscar.Nemo.Native.GF(2)
2121
Fone = F(1)
2222
sym_stabs = zero_matrix(F, nc, 2 * nc)
2323
for r in 1:nc
@@ -38,6 +38,7 @@ Return the cluster state (graph state) on the rectangular lattice with width `w`
3838
function ClusterState(w::Int, h::Int)
3939
(0 <= w && 0 <= h) || throw(ArgumentError("Rectangle dimensions must be positive."))
4040

41+
# BUG this function has never been updated from the quadratic form
4142
E = GF(2, 2, )
4243
ω = gen(E)
4344
Eone = E(1)

src/Quantum/misc_known_codes.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,12 +865,15 @@ end
865865
Return the `[[144, 12, 12]]` gross code.
866866
"""
867867
function GrossCode()
868+
S, (x, y) = polynomial_ring(Oscar.Nemo.Native.GF(2), [:x, :y])
868869
l = 12
869870
m = 6
870871
R, _ = quo(S, ideal(S, [x^l - 1, y^m - 1]))
871872
a = R(x^3 + y + y^2)
872873
b = R(y^3 + x + x^2)
873-
return BivariateBicycleCode(a, b)
874+
S = BivariateBicycleCode(a, b)
875+
# set_minimum_distance!(S, 12)
876+
return S
874877
end
875878

876879
#############################

src/Quantum/subsystem_code.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ function SubsystemCode(G::CTMatrixTypes; char_vec::Union{Vector{zzModRingElem},
177177
stabs_stand, stand_r, stand_k, P_stand, missing)
178178
else
179179
# bare
180+
# TODO use ! versions throughout after vcats
180181
_, mat = _remove_empty(_rref_symp_col_swap(vcat(stabs, bare_logs)), :rows)
181182
anti = hcat(logs_mat[:, n + 1:end], -logs_mat[:, 1:n]) * transpose(_remove_empty(mat, :rows))
182183
u_bound_bare, _ = minimum(row_wts_symplectic(mat[findall(!iszero(anti[i:i, :]) for i in axes(anti, 1)), :]))

0 commit comments

Comments
 (0)