From 42acc71e41ba22cde406c9c3be4791e52f1f2bf9 Mon Sep 17 00:00:00 2001 From: Fe-r-oz Date: Fri, 27 Sep 2024 11:19:23 +0500 Subject: [PATCH] Add BitFlipDecoder for quantum ReedMuller codes --- test/test_ecc_decoder_all_setups.jl | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/test_ecc_decoder_all_setups.jl b/test/test_ecc_decoder_all_setups.jl index 4a8382c17..f64f9dad8 100644 --- a/test/test_ecc_decoder_all_setups.jl +++ b/test/test_ecc_decoder_all_setups.jl @@ -95,6 +95,34 @@ end end end + + @testset "BitFlipDecoder decoder, good for sparse codes" begin + codes = [ + QuantumReedMuller(3), + QuantumReedMuller(4), + QuantumReedMuller(5) + ] + + noise = 0.001 + + setups = [ + CommutationCheckECCSetup(noise), + NaiveSyndromeECCSetup(noise, 0), + ShorSyndromeECCSetup(noise, 0), + ] + + for c in codes + for s in setups + for d in [c->BitFlipDecoder(c)] + e = evaluate_decoder(d(c), s, 100000) + @show c + @show s + @show e + @assert max(e...) < noise/4 + end + end + end + end end @testset "belief prop decoders, good for sparse codes" begin