Skip to content

Commit

Permalink
add detail to error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumjim committed Feb 15, 2024
1 parent 998e992 commit 3af0466
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/code_circuits/test_rep_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ def single_error_test(
neutral, flipped_logicals, _ = code.check_nodes(nodes)
self.assertTrue(
neutral and flipped_logicals == [],
"Error: Single error nodes are not neutral: " + string,
"Error: Single error nodes are not neutral for string "
+ string
+ " which yeilds "
+ str(code.check_nodes(nodes)),
)
# and that the given flipped logical makes sense
for node in nodes:
Expand Down Expand Up @@ -568,6 +571,9 @@ def clustering_decoder_test(
+ str(c)
+ " with "
+ min_error_string
+ "."
+ " Corresponding clusters are "
+ str(decoder.cluster(code.string2nodes(string, all_logicals=True)))
+ ".",
)

Expand Down

0 comments on commit 3af0466

Please sign in to comment.