Skip to content

Commit

Permalink
lintng
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumjim committed Nov 3, 2023
1 parent 6186a4a commit 122d94c
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/repetition_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def string2raw_logicals(self, string):
Returns:
list: Raw values for logical operators that correspond to nodes.
"""
return string.split(' ')[0][-1]
return string.split(" ", maxsplit=1)[0][-1]

def check_nodes(self, nodes, ignore_extra_boundary=False, minimal=False):
"""
Expand Down
2 changes: 1 addition & 1 deletion test/code_circuits/test_rep_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ def clustering_decoder_test(
for j, z_logical in enumerate(decoder.measured_logicals):
error = corrected_z_logicals[j] != 1
if error:
error_num = string.split(" ")[0].count("0")
error_num = string.split(" ", maxsplit=1)[0].count("0")
if error_num < min_error_num:
min_error_num = error_num
min_error_string = string
Expand Down

0 comments on commit 122d94c

Please sign in to comment.