diff --git a/src/qiskit_qec/circuits/intern/arctools.cpp b/src/qiskit_qec/circuits/intern/arctools.cpp index 642ac96b..d14ec7e5 100644 --- a/src/qiskit_qec/circuits/intern/arctools.cpp +++ b/src/qiskit_qec/circuits/intern/arctools.cpp @@ -9,7 +9,7 @@ bool is_cluster_neutral( return nodes.size()%2==0; } else { std::vector output = check_nodes(nodes, ignore_extra_logicals, minimal, cycle_dict, link_graph, link_neighbors, z_logicals); - return (output[0]==1) and (output.size()==0); + return (output[0]==1) and (output.size()==2); } }; diff --git a/src/qiskit_qec/circuits/repetition_code.py b/src/qiskit_qec/circuits/repetition_code.py index 39cc5cf4..c28c3871 100644 --- a/src/qiskit_qec/circuits/repetition_code.py +++ b/src/qiskit_qec/circuits/repetition_code.py @@ -1358,7 +1358,7 @@ def check_nodes(self, nodes, ignore_extra_logical=False, minimal=False, cpp=True return neutral, flipped_logical_nodes, num_errors - def is_cluster_neutral(self, atypical_nodes: dict, cpp=False): + def is_cluster_neutral(self, atypical_nodes: dict, cpp=True): """ Determines whether or not the cluster is neutral, meaning that one or more errors could have caused the set of atypical nodes (syndrome changes) passed