Skip to content

Commit 436b84d

Browse files
committed
Reset error counter
1 parent fb4e3a3 commit 436b84d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/bloqade/stim/dialects/noise/emit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ def non_stim_corr_error(
9494
prob_str: str = ", ".join(prob)
9595

9696
res = (
97-
f"I_ERROR[{stmt.name}:{emit.correlation_identifier_offset}]({prob_str}) "
97+
f"I_ERROR[{stmt.name}:{emit.correlated_error_count}]({prob_str}) "
9898
+ " ".join(targets)
9999
)
100-
emit.correlation_identifier_offset += 1
100+
emit.correlated_error_count += 1
101101
emit.writeln(frame, res)
102102

103103
return ()

src/bloqade/stim/emit/stim_str.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def initialize(self):
2626
super().initialize()
2727
self.file.truncate(0)
2828
self.file.seek(0)
29+
self.correlated_error_count = self.correlation_identifier_offset
2930
return self
3031

3132
def eval_stmt_fallback(

0 commit comments

Comments
 (0)