Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding iscss for issue #222 #241

Merged
merged 43 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
4dbc3fa
adding iscss
Mar 18, 2024
0bb6ad7
updating changelog
Mar 18, 2024
3942a72
adding iscss function
Mar 18, 2024
0c6a646
multimethods
Mar 18, 2024
0274e62
changes
Mar 18, 2024
d1b1e2f
function iscss
Mar 18, 2024
e199ac2
iscss function
Mar 18, 2024
7d2cad8
iscss function
Mar 18, 2024
7d940b7
iscss function
Mar 18, 2024
9a10fd1
iscss function
Mar 18, 2024
baa6538
iscss function
Mar 18, 2024
490ae99
iscss function
Mar 19, 2024
75864d7
iscss function
Mar 19, 2024
a9b14fd
iscss function
Mar 19, 2024
c39abd0
iscss function
Mar 19, 2024
624f5e8
iscss function
Mar 19, 2024
664dc1b
iscss function
Mar 19, 2024
ce63f8e
iscss function
Mar 19, 2024
d52b2b6
iscss function
Mar 19, 2024
80e5693
iscss function
Mar 19, 2024
db6ff0f
iscss function
Mar 19, 2024
074bc47
iscss function
Mar 19, 2024
cfed1ee
iscss function
Mar 19, 2024
4f43dc2
iscss function
Mar 19, 2024
f82a018
iscss function
Mar 19, 2024
4411b85
adding iscss function
Mar 19, 2024
e7d171f
Update test/test_iscss.jl
Fe-r-oz Mar 19, 2024
a62aa4f
adding iscss function
Mar 19, 2024
033fff5
adding iscss function
Mar 19, 2024
5c2e7b6
adding iscss function
Mar 19, 2024
e742b75
adding iscss function
Mar 19, 2024
c674273
Update src/ecc/codes/clevecode.jl
Fe-r-oz Mar 19, 2024
b03ed6a
Merge branch 'master' into isCSS
Fe-r-oz Mar 19, 2024
ccc51fd
Update CHANGELOG.md
Fe-r-oz Mar 19, 2024
9dadece
Update test_ecc_iscss.jl
Fe-r-oz Mar 19, 2024
a84a6b2
Update fivequbit.jl
Fe-r-oz Mar 19, 2024
460a489
Update gottesman.jl
Fe-r-oz Mar 19, 2024
43b3ce8
Update CHANGELOG.md
Fe-r-oz Mar 19, 2024
56e1705
Update test_ecc_iscss.jl
Fe-r-oz Mar 20, 2024
e966c1c
Update test_ecc_iscss.jl
Fe-r-oz Mar 20, 2024
a8ed100
Update test_ecc_iscss.jl
Fe-r-oz Mar 20, 2024
063b417
Update test_ecc_iscss.jl
Fe-r-oz Mar 20, 2024
6eabd9c
Update CHANGELOG.md
Krastanov Mar 20, 2024
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# News

## v0.8.21 - 2024-03-17

- adding iscss function
Fe-r-oz marked this conversation as resolved.
Show resolved Hide resolved
- Implemented the Gottesman code family, also known as [[2^j, 2^j - j - 2, 3]] quantum Hamming codes.
- Bump the `PyQDecoders` dependency, switching to `PythonCall` behind the scenes for reliability.
- Bump the `LDPCDecoders` dependency.
Expand Down
7 changes: 6 additions & 1 deletion src/ecc/ECC.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

abstract type AbstractECC end

export parity_checks, parity_checks_x, parity_checks_z,
export parity_checks, parity_checks_x, parity_checks_z, iscss,
code_n, code_s, code_k, rate, distance,
isdegenerate, faults_matrix,
naive_syndrome_circuit, shor_syndrome_circuit, naive_encoding_circuit,
Expand Down Expand Up @@ -49,6 +49,11 @@
throw(lazy"Codes of type $(typeof(code)) do not have separate X and Z parity checks, either because they are not a CSS code and thus inherently do not have separate checks, or because its separate checks are not yet implemented in this library.")
end

# default CSS method
Fe-r-oz marked this conversation as resolved.
Show resolved Hide resolved
function iscss(::Type{T}) where T<:AbstractECC
Fe-r-oz marked this conversation as resolved.
Show resolved Hide resolved
return true

Check warning on line 54 in src/ecc/ECC.jl

View check run for this annotation

Codecov / codecov/patch

src/ecc/ECC.jl#L53-L54

Added lines #L53 - L54 were not covered by tests
end

parity_checks(s::Stabilizer) = s
Stabilizer(c::AbstractECC) = parity_checks(c)
MixedDestabilizer(c::AbstractECC; kwarg...) = MixedDestabilizer(Stabilizer(c); kwarg...)
Expand Down
4 changes: 4 additions & 0 deletions src/ecc/codes/gottesman.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
end
end

function iscss(::Type{Gottesman})
return false

Check warning on line 16 in src/ecc/codes/gottesman.jl

View check run for this annotation

Codecov / codecov/patch

src/ecc/codes/gottesman.jl#L15-L16

Added lines #L15 - L16 were not covered by tests
end
Fe-r-oz marked this conversation as resolved.
Show resolved Hide resolved

code_n(c::Gottesman) = 2^c.j

function parity_checks(c::Gottesman)
Expand Down
4 changes: 4 additions & 0 deletions src/ecc/codes/steanecode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

struct Steane7 <: AbstractECC end

function iscss(::Type{Steane7})
return true
end

Check warning on line 8 in src/ecc/codes/steanecode.jl

View check run for this annotation

Codecov / codecov/patch

src/ecc/codes/steanecode.jl#L5-L8

Added lines #L5 - L8 were not covered by tests
parity_checks(c::Steane7) = S"___XXXX
_XX__XX
X_X_X_X
Expand Down
4 changes: 4 additions & 0 deletions src/ecc/codes/toric.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ struct Toric <: AbstractECC
dz::Int
end

function iscss(::Type{Toric})
return true
end

code_n(c::Toric) = 2*c.dx*c.dz

function parity_checks_xz(c::Toric)
Expand Down
Loading