I'm trying to simulate 3 qubit (distance 3) bit-flip code in stim. I wrote code similar to How to import a generic stabilizer code in stim using MPP operation. I found the following way yields logical error rate below physical error rate
MPP Z0*Z1 #stabilizer measurement in the last round MPP Z1*Z2 #stabilizer measurement in the last round M 0 1 2 #measure logical Z DETECTOR rec[-2] rec[-3] rec[-5] DETECTOR rec[-1] rec[-2] rec[-4] OBSERVABLE_INCLUDE(0) rec[-1]
However is it possible to use MPP in the end? If so, how? I'm asking this because I'm confused when trying to write a similar readout for 7-qubit code where the relation is more complex.