Skip to content

Commit

Permalink
minor modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Fe-r-oz committed Mar 16, 2024
1 parent 3e5d4a7 commit 035c006
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/ecc/codes/gottesmancode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ Notes:

struct Gottesman <: AbstractECC
j::Int
rows = c.j + 2
cols = 2^c.j
Hx = Matrix{Bool}(undef, rows, cols)
Hz = Matrix{Bool}(undef, rows, cols)
Hx = Matrix{Bool}
Hz = Matrix{Bool}
function Gottesman(j)
(j >= 3 && j < 21) || error("In `Gottesman(j)`, `j` must be ≥ 3 in order to obtain a valid code and `j` must be < 21 to remain tractable")
new(j)
Expand All @@ -24,6 +22,9 @@ end
code_n(c::Gottesman) = 2^c.j

function parity_checks(c::Gottesman)
rows = c.j + 2
cols = 2^c.j

extended_Hx = c.Hx
extended_Hz = c.Hz

Expand Down

0 comments on commit 035c006

Please sign in to comment.