Skip to content

Commit

Permalink
Fix order to flatten loop by default
Browse files Browse the repository at this point in the history
  • Loading branch information
inmzhang committed Mar 28, 2024
1 parent 6985a6c commit 3eaf798
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions glue/sample/src/sinter/_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,21 @@ def auto_dem(circuit: 'stim.Circuit') -> 'stim.DetectorErrorModel':
approximate_disjoint_errors=True,
block_decomposition_from_introducing_remnant_edges=False,
decompose_errors=True,
flatten_loops=False,
flatten_loops=True,
ignore_decomposition_failures=False,
)
except ValueError:
pass

# This might be https://github.com/quantumlib/Stim/issues/393
# Try turning on loop flattening.
# Try turning off loop flattening.
try:
return circuit.detector_error_model(
allow_gauge_detectors=False,
approximate_disjoint_errors=True,
block_decomposition_from_introducing_remnant_edges=False,
decompose_errors=True,
flatten_loops=True,
flatten_loops=False,
ignore_decomposition_failures=False,
)
except ValueError:
Expand All @@ -94,7 +94,7 @@ def auto_dem(circuit: 'stim.Circuit') -> 'stim.DetectorErrorModel':
approximate_disjoint_errors=True,
block_decomposition_from_introducing_remnant_edges=False,
decompose_errors=False,
flatten_loops=False,
flatten_loops=True,
ignore_decomposition_failures=False,
)
except ValueError:
Expand All @@ -106,7 +106,7 @@ def auto_dem(circuit: 'stim.Circuit') -> 'stim.DetectorErrorModel':
approximate_disjoint_errors=True,
block_decomposition_from_introducing_remnant_edges=False,
decompose_errors=False,
flatten_loops=True,
flatten_loops=False,
ignore_decomposition_failures=False,
)

Expand Down

0 comments on commit 3eaf798

Please sign in to comment.