Skip to content

Commit

Permalink
weight syntax change
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumjim authored Feb 26, 2024
1 parent 091da9f commit 354caa2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/qiskit_qec/analysis/distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,12 @@ def _minimum_distance_2_python(stabilizer: np.ndarray, gauge: np.ndarray, max_we
for row in range(xl.shape[0]):
for w in range(1, max_weight + 1):
if _distance_test(stabilizer.astype(int), xl[row].astype(int), w):
if w < weight:
weight = w
weight = min(weight, w)
break
for row in range(zl.shape[0]):
for w in range(1, max_weight + 1):
if _distance_test(stabilizer.astype(int), zl[row].astype(int), w):
if w < weight:
weight = w
weight = min(weight, w)
break
if weight < max_weight + 1:
return weight
Expand Down

0 comments on commit 354caa2

Please sign in to comment.