File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,26 @@ def test_decode_to_edges_with_correlations():
400400 assert np .array_equal (edges , expected_edges )
401401
402402
403+ def test_correlated_matching_handles_single_detector_components ():
404+ stim = pytest .importorskip ("stim" )
405+ p = 0.1
406+ circuit = stim .Circuit .generated (
407+ code_task = "surface_code:rotated_memory_x" ,
408+ distance = 5 ,
409+ rounds = 5 ,
410+ before_round_data_depolarization = p ,
411+ )
412+ circ_str = str (circuit ).replace (
413+ f"DEPOLARIZE1({ p } )" , f"PAULI_CHANNEL_1(0, { p } , 0)"
414+ )
415+ noisy_circuit = stim .Circuit (circ_str )
416+ dem = noisy_circuit .detector_error_model (
417+ decompose_errors = True , approximate_disjoint_errors = True
418+ )
419+ m = Matching .from_detector_error_model (dem , enable_correlations = True )
420+ assert m .num_detectors > 0
421+
422+
403423def test_load_from_circuit_with_correlations ():
404424 stim = pytest .importorskip ("stim" )
405425 circuit = stim .Circuit .generated (
You can’t perform that action at this time.
0 commit comments