The following code is a simple repetition code (for two qubits and one ancilla) for detecting Z errors:
eps = 0.1
circuit = stim.Circuit()
circuit.append("RX", [0,1,2])
circuit.append("DEPOLARIZE2", [0,2], eps)
circuit.append("CNOT", [2,0])
circuit.append("CNOT", [2,1])
circuit.append("MRX", [2])
circuit.append("DETECTOR", [stim.target_rec(-1)])
circuit.append("CNOT", [2,0])
circuit.append("CNOT", [2,1])
circuit.append("MRX", [2])
circuit.append("DETECTOR", [stim.target_rec(-2),stim.target_rec(-1)])
Errors on detections are different from the ones I expect to get from a transferring depolarzing2 to z2_error model [e---->(12/15 * e)]. In other words, I would expect to get error 4*e/15 for each detection D0, D1, and {D0D1}. I am wondering what I am missing.