Skip to content

Commit

Permalink
minor code issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasberent committed Jan 31, 2024
1 parent b17284e commit 57083b2
Show file tree
Hide file tree
Showing 7 changed files with 412 additions and 494 deletions.
4 changes: 2 additions & 2 deletions cpp_test/TestUnionFind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ TEST(UfDecoder, ring_code3){

auto syndrome = vector<uint8_t>{1, 0, 1};

auto decoding = bpd.peel_decode(syndrome, ldpc::uf::NULL_DOUBLE_VECTOR,3);
auto decoding = bpd.peel_decode(syndrome, ldpc::uf::EMPTY_DOUBLE_VECTOR, 3);

ASSERT_TRUE(bpd.pcm_max_bit_degree_2);
tsl::robin_set<int> boundary_bits = {};
Expand All @@ -133,7 +133,7 @@ TEST(UfDecoder, rep_code){
auto syndrome = vector<uint8_t>(n,0);
syndrome[0] = 1;
syndrome[n-2] = 1;
auto decoding = bpd.peel_decode(syndrome, ldpc::uf::NULL_DOUBLE_VECTOR,1);
auto decoding = bpd.peel_decode(syndrome, ldpc::uf::EMPTY_DOUBLE_VECTOR, 1);
auto expected_decoding = vector<uint8_t>(n,0);
expected_decoding[0] = 1;
expected_decoding[n-1] = 1;
Expand Down
6 changes: 3 additions & 3 deletions python_test/test_qcodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ def quantum_mc_sim(hx, lx, error_rate, run_count, seed, DECODER, run_label, DEBU


def test_400_16_6_hgp():
hx = scipy.sparse.load_npz("/home/luca/Documents/codeRepos/ldpc/python_test/pcms/hx_400_16_6.npz")
lx = scipy.sparse.load_npz("/home/luca/Documents/codeRepos/ldpc/python_test/pcms/lx_400_16_6.npz")
hx = scipy.sparse.load_npz("pcms/hx_400_16_6.npz")
lx = scipy.sparse.load_npz("pcms/lx_400_16_6.npz")

error_rate = 0.03
run_count = 1000
Expand Down Expand Up @@ -99,7 +99,7 @@ def test_400_16_6_hgp():
decoder = BpLsdDecoder(hx, error_rate=error_rate, max_iter=max_iter, bp_method="ms", ms_scaling_factor=0.625,
schedule="parallel", bits_per_step=1, lsd_order=0)
ler, min_logical, speed, _ = quantum_mc_sim(hx, lx, error_rate, run_count, seed, decoder,
f"Min-sum LSD parallel schedule osd={osd_order}")
f"Min-sum LSD-0 parallel schedule")

decoder = BpLsdDecoder(hx, error_rate=error_rate, max_iter=5, bp_method="ms", ms_scaling_factor=0.625,
schedule="parallel", bits_per_step=1, lsd_order=osd_order)
Expand Down
Loading

0 comments on commit 57083b2

Please sign in to comment.