Skip to content

Commit

Permalink
revert to 8036e3c
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumjim committed Feb 16, 2024
1 parent a41cc3d commit 03df44e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 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 @@ -104,7 +104,7 @@ std::vector<int> check_nodes(
int root;
int max_num = 0;
for (auto & nq_num: nq_nums){
if (nq_num.second == max_num){
if (nq_num.second > max_num){
root = nq_num.first;
max_num = nq_num.second;
}
Expand Down
9 changes: 2 additions & 7 deletions src/qiskit_qec/decoders/hdrg_decoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,9 @@ def cluster(self, nodes: List):
self._create_new_cluster(node_index)

j = 0
while self.odd_cluster_roots and j < 2 * self.code.d * self.code.T:
while self.odd_cluster_roots and j < 2 * self.code.d * (self.code.T + 1):
self._grow_and_merge_clusters()
j += 1

# compile info into standard clusters dict
clusters = {}
Expand All @@ -394,12 +395,6 @@ def cluster(self, nodes: List):
# put them in the required dict
for n in neutral_nodes:
clusters[n] = c
if j == 2 * self.code.d * (self.code.T + 1):
print(self.code)
print(self.code.T, self.code.d)
print(nodes)
print(clusters)
print()

# also compile into form required for peeling
self._clusters4peeling = []
Expand Down

0 comments on commit 03df44e

Please sign in to comment.