Skip to content

Commit f65d3eb

Browse files
authored
Merge pull request #40 from Fe-r-oz/fixdev
fix documentation errors in build and add ECC Zoo links for product codes
2 parents f80058d + 4069e31 commit f65d3eb

File tree

11 files changed

+63
-117
lines changed

11 files changed

+63
-117
lines changed

docs/make.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Documenter.makedocs(;
1111
highlightsig = true,
1212
sitename = "Coding Theory Documentation",
1313
expandfirst = [],
14+
warnonly = [:missing_docs],
1415
pages = ["Introduction" => "index.md",
1516
"Tutorials" => [
1617
"Tutorials/Linear Codes.md",

docs/src/Classical/cyclic_code.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ qcosets
8282
qcosets_reps
8383
```
8484

85-
```@docs
86-
defining_set
87-
```
88-
8985
```@docs
9086
zeros
9187
```

docs/src/Classical/linear_code.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ cardinality
3131
rate
3232
```
3333

34+
See also: encode`
35+
3436
If the linear code was created by passing in a generator (parity-check) matrix, then this matrix is stored in addition to the standard form. Note that this matrix is potentially over complete (has more rows than its rank). The standard form is returned when the optional parameter `stand_form` is set to true. Some code families are not constructed using these matrices. In these cases, the matrices are initially `missing` and are computed and cached when these functions are called for the first time. Direct access to the underlying structs is not recommended.
3537
```@docs
3638
generator_matrix
@@ -50,9 +52,6 @@ standard_form_permutation
5052
```
5153

5254
The minimum distance of some code families are known and are set during construction. The minimum distance is automatically computed in the constructor for codes which are deemed "small enough". Otherwise, the minimum distance is `missing`. Primitive bounds on the minimum distance are given by
53-
```@docs
54-
minimum_distance_lower_bound
55-
```
5655

5756
```@docs
5857
minimum_distance_upper_bound
@@ -81,24 +80,18 @@ The minimum distance and its bounds may be manually set as well. Nothing is done
8180
set_distance_lower_bound!
8281
```
8382

84-
```@docs
85-
set_distance_upper_bound!
86-
```
87-
8883
```@docs
8984
set_minimum_distance!
9085
```
9186

87+
See: `minimum_distance_lower_bound`, `set_distance_upper_bound!`
88+
9289
## Methods
9390

9491
```@docs
9592
Singleton_bound
9693
```
9794

98-
```@docs
99-
encode
100-
```
101-
10295
```@docs
10396
syndrome
10497
```

docs/src/Classical/new_codes_from_old.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,26 @@ construction_X3
2222
```
2323

2424
The direct sum code has generator matrix `G1 ⊕ G2` and parity-check matrix `H1 ⊕ H2`.
25+
2526
```@docs
26-
CodingTheory.
27+
2728
```
2829

2930
The generator matrix of the (direct) product code is the kronecker product of the generator matrices of the inputs.
31+
3032
```@docs
31-
CodingTheory.×
33+
×
3234
```
3335

3436
The parity-check matrix of the tensor product code is the kronecker product of the parity-check matrices of the inputs.
35-
```@docs
36-
CodingTheory.⊗
37-
```
3837

3938
There is some debate on how to define this product. This is known to often be the full ambient space.
4039
```@docs
4140
entrywise_product_code
4241
```
4342

4443
```@docs
45-
CodingTheory./
44+
/
4645
```
4746

4847
`juxtaposition` is representation dependent and therefore works on the potentially over-complete generator matrices, not on the standard form.
@@ -52,10 +51,7 @@ juxtaposition
5251

5352
## Methods
5453

55-
If `C` is a quasi-cyclic code, `permute_code` returns a `LinearCode` object.
56-
```@docs
57-
permute_code
58-
```
54+
If `C` is a quasi-cyclic code, `permute_code` returns a `LinearCode` object. See: `permute_code`
5955

6056
The most common way to extend a code is to add an extra column to the generator matrix whose values make the sum of the rows zero. This is called an even extension and is the default for `extend(C)`. Alternatively, this new column may be inserted at any index `c` in the matrix, e.g. `extend(C, c)`. In the most general case, one may provide a vector `a` and define the values of the new column to be `-a` dot the row. The standard definition is clearly just the special case that `a` is the all-ones vector.
6157
```@docs

docs/src/LDPC/analysis.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,8 @@ optimal_threshold
2727
density_evolution
2828
```
2929

30-
```@docs
31-
plot_EXIT_chart
32-
```
3330

3431
# Misc
35-
```@docs
36-
multiplicative_gap
37-
```
3832

3933
```@docs
4034
multiplicative_gap_lower_bound
@@ -44,6 +38,8 @@ multiplicative_gap_lower_bound
4438
density_lower_bound
4539
```
4640

41+
See also: `plot_EXIT_chart`, `multiplicative_gap`
42+
4743
## Comments
4844

4945
(these are just temporary notes)

docs/src/LDPC/codes.md

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,7 @@ Parity-check matrix: 6 × 9
3131
1 1 0 0 0 0 1 1 1
3232
```
3333

34-
Random regular LDPC codes maybe be constructed via
35-
```@docs
36-
regular_LDPC_code
37-
```
38-
and irregular LDPC codes via
39-
```@docs
40-
irregular_LDPC_code
41-
```
34+
Random regular LDPC codes maybe be constructed via `regular_LDPC_code` and `irregular_LDPC_code`
4235

4336
## Attributes
4437
The polynomials ``\lambda(x)`` and ``\rho(x)`` as well as the degrees of each variable and check nodes are computed upon construction.
@@ -116,33 +109,8 @@ To count or explicitly enumerate the short cycles of the Tanner graph, use
116109
count_short_cycles
117110
```
118111

119-
```@docs
120-
shortest_cycles
121-
```
122-
123-
Various information about the ACE values of cycles in the Tanner graph may be computed with the following functions.
124-
```@docs
125-
ACE_spectrum
126-
```
127-
128-
```@docs
129-
shortest_cycle_ACE
130-
```
112+
See also: `shortest_cycles`
131113

132-
```@docs
133-
ACE_distribution
134-
```
135-
136-
```@docs
137-
average_ACE_distribution
138-
```
139-
140-
```@docs
141-
median_ACE_distribution
142-
```
143-
144-
```@docs
145-
mode_ACE_distribution
146-
```
114+
Various information about the ACE value of cycles in the Tanner graph may be computed with the following functions. See: `ACE_spectrum`, `shortest_cycle_ACE`, `ACE_distribution`, `average_ACE_distribution`, `median_ACE_distribution`, `mode_ACE_distribution`
147115

148116
## Greedy Construction Algorithms

docs/src/LDPC/decoders.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ sum_product_box_plus
2121
min_sum
2222
```
2323

24-
```@docs
25-
find_MP_schedule
26-
```
24+
See also: `find_MP_schedule`
2725

2826
## Linear Programming
2927

@@ -33,6 +31,4 @@ LP_decoder_LDPC
3331

3432
## Simulations
3533

36-
```@docs
37-
decoder_simulation
38-
```
34+
See: `decoder_simulation`

docs/src/Quantum/product_codes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Product Codes
22

3-
- Hypergraph product: [tillich2009quantum](@cite)
4-
- Generalized Shor: [bacon2006quantum](@cite)
3+
- [Hypergraph product](https://errorcorrectionzoo.org/c/hypergraph_product): [Tillich_2014](@cite)
4+
- [Generalized Shor](https://errorcorrectionzoo.org/c/generalized_shor): [bacon2006quantum](@cite)
55
- Hyperbicycle: [pryadko2013quantum](@cite)
6-
- Generealized bicycle: [pryadko2013quantum](@cite), [kovalev2013quantum](@cite), [kovalev1212quantum](@cite), [panteleev2021degenerate](@cite)
6+
- [Generealized bicycle](https://errorcorrectionzoo.org/c/generalized_bicycle): [pryadko2013quantum](@cite), [Kovalev_2013](@cite), [panteleev2021degenerate](@cite)
77
- Generalized hypergraph product: [panteleev2021degenerate](@cite)
88
- Bias-tailored lifted product: [roffe2023bias](@cite)
99

docs/src/Tutorials/Message Passing.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ lines!(ax, x, x, color = :black)
247247
f
248248
249249
```
250-
![phi](./../assets/images/phi.png)
251250

252251
Trying to plot this function with the $\tanh$ versus plotting this function with the exponentials makes the numerical instability of the $\tanh$ apparent. Fortunately, the exponential form makes it apparent that it is not only symmetric about $y = x$, but also that the function is dominated by smaller values of $x$:
253252

@@ -406,7 +405,7 @@ julia> Gallager_B(H, y)
406405
```
407406

408407
## Decimation
409-
Decimation was previously used in message-passing applications outside of error correction and was applied to stabilizer codes in [](@cite). The idea is to freeze the value of a variable node. We can either do this from the start to obtain a so-called *genie-aided* decoder, or we can periodically pause message passing to fix a bit. In *guided decimation*, we pause every fixed number of rounds and freeze the value of the variable node with the highest log-likelihood ratio. In *automated decimation*, we pause after every iteration and fix any bit whose absolute value has passed a certain threshold.
408+
Decimation was previously used in message-passing applications outside of error correction and was applied to stabilizer codes [yao2024belief](@cite). The idea is to freeze the value of a variable node. We can either do this from the start to obtain a so-called *genie-aided* decoder, or we can periodically pause message passing to fix a bit. In *guided decimation*, we pause every fixed number of rounds and freeze the value of the variable node with the highest log-likelihood ratio. In *automated decimation*, we pause after every iteration and fix any bit whose absolute value has passed a certain threshold.
410409

411410
It is important to note that when a variable node is fixed to a specific value, the decoder is now sampling possible solutions with that fixed bit, which is different from the ML and MAP problems above. Furthermore, if there is a unique solution and a bit is fixed which does not match the solution, the decoder will fail instead of correcting that bit. For example, fixing the most reliable bit in guided decimation may mean fixing a bit which is still far from reliable and could go either way. On the other hand, fixing a bit could help the decoder converge faster and also break out of trapping sets. In this sense, decimation can be very helpful decoding degenerate stabilizer codes where there are many valid solutions and BP has a difficult time picking one to converge to.
412411

@@ -751,7 +750,6 @@ lines!(noise, FER, color = :red)
751750
scatter!(noise, FER, color = :red)
752751
current_figure()
753752
```
754-
![CSS_FER_test](./../assets/images/CSS_FER_test.png)
755753

756754

757755
TODO REDO THIS FUNCTION
@@ -772,7 +770,6 @@ ax2 = Axis(fig2[1, 2], xlabel = "Iteration Number", ylabel = "Number Of Times Co
772770
barplot!(ax1, collect(keys(X_iters_15)), X_values, bar_width = 1)
773771
barplot!(ax2, collect(keys(Z_iters_15)), Z_values, bar_width = 1)
774772
```
775-
![CSS_test_iters](./../assets/images/CSS_test_iters.png)
776773

777774
The overwhelming majority of convergeneces, for both $X$ and $Z$, occurred within one or two iterations. This is plausible for a couple of reasons. First, note that all variable nodes have degree four but all check nodes have degree nine! This is large for an LDPC code. For low error rates when errors are sparsely distributed over 254 qubits, it may be common that a single check node does not connect to more than one inncorrect variable node and the degrees are high enough to immediately flip any bit.
778775

@@ -805,8 +802,6 @@ false
805802

806803
Rerunning the simulation without using Bayes' Theorem returns almost symmetric $X$ and $Z$ iteration counts. For completeness, we include both runs on a single plot. The first blue point on the left is due to a single convergence error and the spike on the left further shows that direct sampling is either not appropriate for this error rate or it has not been sampled enough times for accuracy.
807804

808-
![CSS_FER_Bayes_test](./../assets/images/CSS_FER_Bayes_test.png)
809-
810805
## Example 2: Single-Shot Decoding With Metachecks
811806
Next we're going to look at two single-shot decoding schemes. We will call the paper [quintavalle2021single](@cite) scheme one and [higgott2023improved](@cite) scheme two. We encourage the reader to check out both papers directly for details. Briefly, both schemes will consider data errors, as in the previous example, plus additional measurement errors (on the syndrome values). The code family we will look at has an extra matrix, $M$, with the property that $Ms = 0$ for any valid syndrome $s$ of the code. Then assuming that the measurement error $s_e$ didn't take us from a valid syndrome to another valid syndrome, $M(s + s_e) = Ms_e \neq 0$. Whether or not this happens depends on the properties of the classical code with $M$ as its parity-check matrix. To correct the syndrome, we decode using the Tanner graph based on $M$. Then we will use the corrected syndrome to decode the stabilizers.
812807

@@ -1220,14 +1215,13 @@ julia> check_weights(X_meta_L)
12201215

12211216
By distance eight, scheme one was difficult to run without a cluster. We did not attempt distance nine with this scheme. This is problematic for many reasons, the most important of which is that many code families do not "settle in" to their asymptotic behaviors until distances much higher than this (although the exact distance depends on the decoder being used). For example, for the surface codes under minimum-weight perfect-matching (MWPM), anything below distance 20 is considered the small-code regime (compare this to distance seven for the same code family using trellis decoding).
12221217

1223-
![CSS_Single_Shot_test](./../assets/images/CSS_Single_Shot_test.png)
1224-
12251218
Logical errors were equally distributed among the cosets and only occurred on odd-distance codes.
12261219

12271220

12281221

12291222

12301223

1224+
12311225
julia> x = -20:.05:20; y = [abs(atanh(tanh(x)) - x) for x in x]; y2 = [exp(2abs(x)) / 2^56 for x in x]; plot(x, [replace(y, 0.0 => 1e-21) y2], ylims = (1e-20, 1), yscale = :log10, linewidth = 0.5, label = ["abs(atanh(tanh(x)) - x)" "exp(2abs(x)) / 2^56"])
12321226

12331227
p = 1 - 1/(1 + exp(LLR)) if LLR = log(p / (1 - p))

docs/src/references.bib

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@ @misc{hastings2021quantum
77
}
88

99
@misc{hastings2016,
10-
archiveprefix = {arxiv},
11-
author = {Hastings, M. B.},
12-
eprint = {1611.03790},
13-
keywords = {Quantum Physics},
14-
month = nov,
15-
number = {arXiv:1611.03790},
16-
publisher = {{arXiv}},
17-
title = {Weight Reduction for Quantum Codes},
18-
urldate = {2023-11-14},
19-
year = {2016}
10+
title={Weight Reduction for Quantum Codes},
11+
author={M. B. Hastings},
12+
year={2016},
13+
eprint={1611.03790},
14+
archivePrefix={arXiv},
15+
primaryClass={quant-ph},
16+
url={https://arxiv.org/abs/1611.03790},
2017
}
2118

2219
@inproceedings{hastings2021fiber,
@@ -121,10 +118,18 @@ @article{bacon2006quantum
121118
year={2006}
122119
}
123120

124-
@inproceedings{tillich2009quantum,
125-
title={Quantum LDPC codes with positive rate and minimum distance proportional to n $1/2$},
126-
author={Tillich, J-P and Zemor, G},
127-
booktitle={2009 IEEE International Symposium on Information Theory}
121+
@article{Tillich_2014,
122+
title={Quantum LDPC Codes With Positive Rate and Minimum Distance Proportional to the Square Root of the Blocklength},
123+
volume={60},
124+
ISSN={1557-9654},
125+
url={http://dx.doi.org/10.1109/TIT.2013.2292061},
126+
DOI={10.1109/tit.2013.2292061},
127+
number={2},
128+
journal={IEEE Transactions on Information Theory},
129+
publisher={Institute of Electrical and Electronics Engineers (IEEE)},
130+
author={Tillich, Jean-Pierre and Zemor, Gilles},
131+
year={2014},
132+
month=feb, pages={1193–1202}
128133
}
129134

130135
@inproceedings{pryadko2013quantum,
@@ -136,22 +141,18 @@ @inproceedings{pryadko2013quantum
136141
year={2013}
137142
}
138143

139-
@article{kovalev2013quantum,
140-
title={Quantum Kronecker sum-product low-density parity-check codes with finite rate},
141-
author={Kovalev, Alexey A and Pryadko, Leonid P},
142-
journal={Physical Review A—Atomic, Molecular, and Optical Physics},
143-
volume={88},
144-
number={1},
145-
pages={012311},
146-
year={2013},
147-
publisher={APS}
148-
}
149-
150-
@article{kovalev1212quantum,
151-
title={Quantum “hyperbicycle” low density parity check codes with finite rate},
152-
author={Kovalev, AA and Pryadko, LP},
153-
journal={arXiv},
154-
volume={1212}
144+
@article{Kovalev_2013,
145+
title={Quantum Kronecker sum-product low-density parity-check codes with finite rate},
146+
volume={88},
147+
ISSN={1094-1622},
148+
url={http://dx.doi.org/10.1103/PhysRevA.88.012311},
149+
DOI={10.1103/physreva.88.012311},
150+
number={1},
151+
journal={Physical Review A},
152+
publisher={American Physical Society (APS)},
153+
author={Kovalev, Alexey A. and Pryadko, Leonid P.},
154+
year={2013},
155+
month=jul
155156
}
156157

157158
@article{panteleev2021degenerate,
@@ -173,3 +174,12 @@ @article{roffe2023bias
173174
year={2023},
174175
publisher={Verein zur F{\"o}rderung des Open Access Publizierens in den Quantenwissenschaften}
175176
}
177+
178+
@inproceedings{yao2024belief,
179+
title={Belief propagation decoding of quantum LDPC codes with guided decimation},
180+
author={Yao, Hanwen and Laban, Waleed Abu and H{\"a}ger, Christian and i Amat, Alexandre Graell and Pfister, Henry D},
181+
booktitle={2024 IEEE International Symposium on Information Theory (ISIT)},
182+
pages={2478--2483},
183+
year={2024},
184+
organization={IEEE}
185+
}

0 commit comments

Comments
 (0)