I am trying to simulate color code on STIM. I have provided my code below. But I am getting the following error
Traceback (most recent call last)
ValueError: Failed to decompose errors into graphlike components with at most two symptoms.
The error component that failed to decompose is 'D9, D18, D27'.
My code:
color_code_tasks = [
sinter.Task(
circuit = stim.Circuit.generated(
"color_code:memory_xyz",
rounds=10,
distance=9,
before_round_data_depolarization=1e-2,
),
)
]
collected_color_code_stats: List[sinter.TaskStats] = sinter.collect(
num_workers=4,
tasks=surface_code_tasks,
decoders=['pymatching'],
max_shots=10000,
max_errors=500,
print_progress=True,
)
I tried to ignore this error by passing ignore_decomposition_failures=True
to stim.Circuit.detector_error_model(...)
. Here is my modified code:
custom_dem = circuit.detector_error_model(
decompose_errors=True,
ignore_decomposition_failures=True,
)
color_code_tasks = [
sinter.Task(
circuit = stim.Circuit.generated(
"color_code:memory_xyz",
rounds=10,
distance=9,
before_round_data_depolarization=1e-2,
),
detector_error_model=custom_dem,
)
]
collected_color_code_stats: List[sinter.TaskStats] = sinter.collect(
num_workers=4,
tasks=surface_code_tasks,
decoders=['pymatching'],
max_shots=10000,
max_errors=500,
print_progress=True,
)
But this time I am getting another ValueError: circuit.num_detectors=300 != detector_error_model.num_detectors=132
How can I solve this issue?