From aba9d5a734c362fa2f31264ce2133fd29cd28bc1 Mon Sep 17 00:00:00 2001 From: James Wootton Date: Mon, 2 Oct 2023 16:45:48 +0200 Subject: [PATCH] 389 arc nodes (#390) * fix make_syndrome_graph * Update test_rep_codes.py test logical 1 ARCs --- src/qiskit_qec/circuits/repetition_code.py | 2 +- test/code_circuits/test_rep_codes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qiskit_qec/circuits/repetition_code.py b/src/qiskit_qec/circuits/repetition_code.py index a1d2d9e2..6177c1ae 100644 --- a/src/qiskit_qec/circuits/repetition_code.py +++ b/src/qiskit_qec/circuits/repetition_code.py @@ -1408,7 +1408,7 @@ def _make_syndrome_graph(self): + "1" * len(self.links) ) nodes: List[DecodingGraphNode] = [] - for node in self.string2nodes(string): + for node in self.string2nodes(string, all_logicals=True): if not node.is_boundary: for t in range(self.T + 1): new_node = deepcopy(node) diff --git a/test/code_circuits/test_rep_codes.py b/test/code_circuits/test_rep_codes.py index f0a9e146..1b65cd3c 100644 --- a/test/code_circuits/test_rep_codes.py +++ b/test/code_circuits/test_rep_codes.py @@ -516,7 +516,7 @@ def clustering_decoder_test( codes = [RepetitionCode(d, 1)] # then a linear ARC links = [(2 * j, 2 * j + 1, 2 * (j + 1)) for j in range(d - 1)] - codes.append(ArcCircuit(links, 0)) + codes.append(ArcCircuit(links, 0, logical="1")) # then make a bunch of non-linear ARCs links_cross = [(2 * j, 2 * j + 1, 2 * (j + 1)) for j in range(d - 2)] links_cross.append((2 * (d - 2), 2 * (d - 2) + 1, 2 * (int(d / 2))))