Skip to content

Commit

Permalink
fix is_cluster_neutral
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumjim committed Feb 15, 2024
1 parent 31fa5e7 commit b4d9a2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/qiskit_qec/circuits/intern/arctools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ bool is_cluster_neutral(
return nodes.size()%2==0;
} else {
std::vector<int> 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);
}

};
Expand Down
2 changes: 1 addition & 1 deletion src/qiskit_qec/circuits/repetition_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b4d9a2c

Please sign in to comment.