Skip to content

Commit 0afbc3d

Browse files
committed
fix typos
1 parent cf29b76 commit 0afbc3d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/decoders/belief_propagation_osd.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,25 @@ function decode!(decoder::BeliefPropagationOSDDecoder, syndrome::AbstractVector)
2121
bp_err, converged = decode!(decoder.bp_decoder, syndrome) # hard decisions
2222
bp_log_probabs = decoder.bp_decoder.scratch.log_probabs # soft decisions
2323
bp_probabs = exp.(bp_log_probabs)
24-
# sort colums by reliability, less reliable columns first
24+
# sort columns by reliability, less reliable columns first
2525
sort_by_reliability = sortperm(max.(bp_probabs, 1 .- bp_probabs), rev=true)
2626
H_sorted = decoder.H[:, sort_by_reliability]
2727
bp_err_sorted = bp_err[sort_by_reliability]
28-
# TODO an optmized version of OSD can be implemented when osd_order = 0, see Algorithm 2 in https://doi.org/10.22331/q-2021-11-22-585
28+
# TODO an optimized version of OSD can be implemented when osd_order = 0, see Algorithm 2 in https://doi.org/10.22331/q-2021-11-22-585
2929
err = osd(H_sorted, syndrome, bp_err_sorted, decoder.osd_order)
3030
return err[invperm(sort_by_reliability)], converged # also return whether BP is converged
3131
end
3232

3333
function osd(H, syndrome, bp_err, osd_order)
3434
m, n = size(H)
35-
# diagnolize the submatrix corrsponding to idependent columns via Gaussian elimination
35+
# diagnolize the submatrix corresponding to independent columns via Gaussian elimination
3636
# first obtain the row canonical form
3737
# and find least reliable indices, i.e., the first r pivot columns (assume H is rearranged by reliability)
3838
least_reliable_rows = [] # row indices of pivot elements
3939
least_reliable_cols = [] # column indices of pivot elements
4040
r = 0 # compute rank of H
4141
i, j = 1, 1
42-
s = copy(syndrome) # tranform syndrom along with H in Gaussian elimination
42+
s = copy(syndrome) # transform syndrome along with H in Gaussian elimination
4343

4444
while i <= m && j <= n
4545
k = findfirst(H[i:end, j])
@@ -65,7 +65,7 @@ function osd(H, syndrome, bp_err, osd_order)
6565
end
6666
end
6767

68-
# then obtain a diagnol submatrix on the least reliable part
68+
# then obtain a diagonal submatrix on the least reliable part
6969
for (i, j) in zip(reverse(least_reliable_rows), reverse(least_reliable_cols))
7070
for ii in 1:i-1
7171
if H[ii, j]

0 commit comments

Comments
 (0)