Skip to content

Conversation

Fe-r-oz
Copy link
Contributor

@Fe-r-oz Fe-r-oz commented Aug 31, 2025

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 the test_cecc.jl to test the general properties of the parity check matrices of the classical error correcting codes. This resolves #268

  • The code is properly formatted and commented.
  • Substantial new functionality is documented within the docs.
  • All new functionality is tested.
  • All of the automated tests on github pass.
  • We recently started enforcing formatting checks. If formatting issues are reported in the new code you have written, please correct them.

@Fe-r-oz Fe-r-oz force-pushed the fa/automated_cecc_tests branch 3 times, most recently from 3fe8b69 to 28ea18b Compare August 31, 2025 23:02
Copy link

codecov bot commented Aug 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.78%. Comparing base (5b44b1c) to head (28ea18b).

❗ There is a different number of reports uploaded between BASE (5b44b1c) and HEAD (28ea18b). Click for more details.

HEAD has 5 uploads less than BASE
Flag BASE (5b44b1c) HEAD (28ea18b)
12 7
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Fe-r-oz Fe-r-oz marked this pull request as ready for review September 1, 2025 00:54
@Fe-r-oz Fe-r-oz added the Skip-Changelog label for control of CI: skips the changelog check label Sep 1, 2025
@Fe-r-oz Fe-r-oz force-pushed the fa/automated_cecc_tests branch from 28ea18b to 60b9796 Compare September 1, 2025 02:34
@Fe-r-oz Fe-r-oz requested a review from Krastanov September 1, 2025 14:47
Comment on lines +52 to +73
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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip-Changelog label for control of CI: skips the changelog check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Correctness checks for classical ECCs
1 participant