-
Notifications
You must be signed in to change notification settings - Fork 65
correctness tests for classical ECCs #588
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
base: master
Are you sure you want to change the base?
Conversation
3fe8b69
to
28ea18b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #588 +/- ##
==========================================
- Coverage 85.09% 76.78% -8.32%
==========================================
Files 122 121 -1
Lines 7362 7349 -13
==========================================
- Hits 6265 5643 -622
- Misses 1097 1706 +609 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
28ea18b
to
60b9796
Compare
function all_testable_classical_code_instances(;maxn=nothing) | ||
types = subtypes(AbstractCECC) | ||
concrete = Type[] | ||
while !isempty(types) | ||
t = popfirst!(types) | ||
isabstracttype(t) ? append!(types, subtypes(t)) : push!(concrete, t) | ||
end | ||
codeinstances = [] | ||
for t in concrete | ||
t_name = Symbol(split(string(t), ".")[end]) | ||
for args in get(classical_code_instance_args, t_name, []) | ||
try | ||
codeinstance = t(args...) | ||
!isnothing(maxn) && code_n(codeinstance) > maxn && continue | ||
push!(codeinstances, codeinstance) | ||
catch e | ||
@warn "Failed to create $t with args $args: $e" | ||
end | ||
end | ||
end | ||
return codeinstances | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will improve this so it also check with pop that all the codes are tests and simplify this similar to what is done for QECCs
This PR adds the automated tests for the classical ECCs by creating the
test_cecc_base.jl
that has all the classical ECCs instances which are then utilized in thetest_cecc.jl
to test the general properties of the parity check matrices of the classical error correcting codes. This resolves #268