Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
CodingTheory = "7ca085cf-10e4-43da-ad7d-8f62f68877b3"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
Hecke = "3e1990a7-5d81-5526-99ce-9ba3ff248f21"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
Oscar = "f1435218-dba5-11e9-1e4d-f1a5fab5fc13"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Documenter.makedocs(;
modules = Module[CodingTheory],
repo = "",
highlightsig = true,
sitename = "Coding Theory Documentation",
sitename = "CodingTheory.jl",
expandfirst = [],
warnonly = [:missing_docs],
pages = ["Introduction" => "index.md",
Expand Down
45 changes: 15 additions & 30 deletions docs/src/Tutorials/Weight Reduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -678,42 +678,27 @@ Dict(78 => 28, 56 => 2894, 16 => 13428, 20 => 24654, 58 => 15616, 52 => 7728, 60
## Lifted Products
Classical weight reduction also applies to other types of inputs, although with the current function, the row and column indices must be specified explicitly either as a vector or a range.
```
julia> F = GF(2);

julia> S, x = PolynomialRing(F, "x");
julia> S, x = polynomial_ring(Oscar.Nemo.Native.GF(2), "x");

julia> l = 63;

julia> R = ResidueRing(S, x^l - 1);
julia> R, = residue_ring(S, x^l - 1);

julia> A = matrix(R, 7, 7,
[x^27, 0, 0, 1, x^18, x^27, 1,
1, x^27, 0, 0, 1, x^18, x^27,
x^27, 1, x^27, 0, 0, 1, x^18,
x^18, x^27, 1, x^27, 0, 0, 1,
1, x^18, x^27, 1, x^27, 0, 0,
0, 1, x^18, x^27, 1, x^27, 0,
0, 0, 1, x^18, x^27, 1, x^27])
[x^27 0 0 1 x^18 x^27 1]
[ 1 x^27 0 0 1 x^18 x^27]
[x^27 1 x^27 0 0 1 x^18]
[x^18 x^27 1 x^27 0 0 1]
[ 1 x^18 x^27 1 x^27 0 0]
[ 0 1 x^18 x^27 1 x^27 0]
[ 0 0 1 x^18 x^27 1 x^27]

julia> b = R(1 + x + x^6)
x^6 + x + 1

julia> LiftedProductCode(A, b)
┌ Warning: Commutativity of A and b required but not yet enforced.
└ @ CodingTheory ~/Documents/GitHub/CodingTheory/src/Quantum/product_codes.jl:354
[[882, 48]]_2 CSS stabilizer code
[x^27, 0 , 0 , 1 , x^18, x^27, 1 ,
1 , x^27, 0 , 0 , 1 , x^18, x^27,
x^27, 1 , x^27, 0 , 0 , 1 , x^18,
x^18, x^27, 1 , x^27, 0 , 0 , 1 ,
1 , x^18, x^27, 1 , x^27, 0 , 0 ,
0 , 1 , x^18, x^27, 1 , x^27, 0 ,
0 , 0 , 1 , x^18, x^27, 1 , x^27]);

julia> A_wtred = weight_reduction(A, row_indices = 1:4, column_indices = 1:4, permute_rows = false, permute_columns = false);
julia> b = R(1 + x + x^6);

julia> LiftedProductCode(A_wtred, b)
julia> code = LiftedProductCode(A, b);
┌ Warning: Commutativity of A and b required but not yet enforced.
└ @ CodingTheory ~/Documents/GitHub/CodingTheory/src/Quantum/product_codes.jl:354
[[4914, 48]]_2 CSS stabilizer code
└ @ CodingTheory ~/Documents/GitHub/CodingTheory/src/Quantum/product_codes.jl:340

julia> length(code), dimension(code)
(882, 48)
```
21 changes: 21 additions & 0 deletions docs/src/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,17 @@ @misc{Vasmer_2020
year={2020}
}

@article{poulin2005stabilizer,
title={Stabilizer formalism for operator quantum error correction},
author={Poulin, David},
journal={Physical review letters},
volume={95},
number={23},
pages={230504},
year={2005},
publisher={APS}
}

% Product Codes

@article{bacon2006quantum,
Expand Down Expand Up @@ -202,6 +213,16 @@ @article{wang2024coprime
year={2024}
}

@article{ostrev2024classical,
title={Classical product code constructions for quantum Calderbank-Shor-Steane codes},
author={Ostrev, Dimiter and Orsucci, Davide and L{\'a}zaro, Francisco and Matuz, Balazs},
journal={Quantum},
volume={8},
pages={1420},
year={2024},
publisher={Verein zur F{\"o}rderung des Open Access Publizierens in den Quantenwissenschaften}
}

@book{kreher1999combinatorial,
title={Combinatorial algorithms: generation, enumeration, and search},
author={Kreher, Donald L and Stinson, Douglas R},
Expand Down
2 changes: 1 addition & 1 deletion ext/MakieExt/Classical/Tanner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# LICENSE file in the root directory of this source tree.

"""
Tanner_graph_plot(H::Union{CTMatrixTypes, Matrix{Int}})
$TYPEDSIGNATURES

Return the Tanner graph of the matrix `H` as a `Figure` object.

Expand Down
2 changes: 1 addition & 1 deletion ext/MakieExt/Classical/weight_dist.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#############################

"""
weight_plot(C::AbstractLinearCode; alg::Symbol = :auto)
$TYPEDSIGNATURES

Return a bar graph of the weight distribution of `C`.

Expand Down
2 changes: 1 addition & 1 deletion ext/MakieExt/LDPC/analysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#############################

"""
EXIT_chart_plot(E::LDPCEnsemble, Ch::AbstractClassicalNoiseChannel; tol::Float64 = 1e-9)
$TYPEDSIGNATURES

Return a plot of the EXIT chart for the ensemble given the channel up to a numerical tolerance of `tol`.

Expand Down
10 changes: 5 additions & 5 deletions ext/MakieExt/LDPC/codes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#############################

"""
degree_distributions_plot(C::AbstractLDPCCode)
$TYPEDSIGNATURES

Return a bar plot of the column and row degree distributions of `C`.

Expand Down Expand Up @@ -44,7 +44,7 @@ function CodingTheory.degree_distributions_plot(C::AbstractLDPCCode)
end

"""
count_short_cycles_plot(C::AbstractLDPCCode)
$TYPEDSIGNATURES

Return a bar graph and a dictionary of (length, count) pairs for unique short
cycles in the Tanner graph of `C`. An empty graph and dictionary are returned
Expand Down Expand Up @@ -82,7 +82,7 @@ function CodingTheory.count_short_cycles_plot(C::AbstractLDPCCode)
end

"""
count_elementary_cycles_plot(C::AbstractLDPCCode)
$TYPEDSIGNATURES

Return a bar graph and a dictionary of (length, count) pairs for unique elementary
cycles in the Tanner graph of `C`. An empty graph and dictionary are returned
Expand Down Expand Up @@ -120,7 +120,7 @@ function CodingTheory.count_elementary_cycles_plot(C::AbstractLDPCCode)
end

"""
ACE_spectrum(C::AbstractLDPCCode)
$TYPEDSIGNATURES

Return an interactive figure and data for the ACE spectrum of the Tanner graph of `C`.

Expand Down Expand Up @@ -171,7 +171,7 @@ end
# doesn't seem to be a point in making this dynamic with a slider, as it simply
# continues in the same tree shape and no useful information is gained from watching it
"""
computation_graph(C::AbstractLDPCCode, lvl::Int, v::Int, v_type::Symbol=:v)
$TYPEDSIGNATURES

Return a figure representing the expansion of the Tanner graph of `C` to level `lvl`
for node `v`. If `v_type` is `:v`, `v` is interpreted as a variable node; otherwise,
Expand Down
8 changes: 4 additions & 4 deletions ext/MakieExt/Quantum/weight_dist.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#############################

"""
weight_plot(S::AbstractStabilizerCode; alg::Symbol = :auto, type::Symbol = :stabilizer)
$TYPEDSIGNATURES

Return a bar graph of the weight distribution related to `S`.

Expand Down Expand Up @@ -49,7 +49,7 @@ function CodingTheory.weight_plot(S::AbstractStabilizerCode; alg::Symbol = :auto
end

"""
weight_plot_CSS_X(S::AbstractStabilizerCodeCSS; alg::Symbol = :auto)
$TYPEDSIGNATURES

Return a bar graph of the weight distribution of the `X` stabilizers.

Expand All @@ -73,7 +73,7 @@ function CodingTheory.weight_plot_CSS_X(S::AbstractStabilizerCodeCSS; alg::Symbo
end

"""
weight_plot_CSS_Z(S::AbstractStabilizerCodeCSS; alg::Symbol = :auto)
$TYPEDSIGNATURES

Return a bar graph of the weight distribution of the `Z` stabilizers.

Expand All @@ -97,7 +97,7 @@ function CodingTheory.weight_plot_CSS_Z(S::AbstractStabilizerCodeCSS; alg::Symbo
end

"""
weight_plot_CSS(S::AbstractStabilizerCodeCSS; alg::Symbol = :auto)
$TYPEDSIGNATURES

Return bar graphs of the weight distribution of both the `X` and 'Z' stabilizers, separately.

Expand Down
Loading
Loading