0
$\begingroup$

I'm trying to simulate surface-like codes under phenomenological and circuit-level noise using stim with PyMatching for the decoding algorithm. I've constructed error correction circuits in stim comprised of the encoding circuit and the $n$ rounds of stabilizer measurement circuits. These measurement circuits are followed up by detectors used for decoding. However, when simulating the error correction loop, no matter what I specify the one-qubit, two-qubit, and measurement error rates to be, PyMatching always returns with 0 logical errors. I'm trying to debug this but am not quite sure where the issue lies. Below is an example circuit for one of these surface-like codes on a 4 $\times$ 4 lattice with 2 rounds of stabilizer measurements. Any help would be greatly appreciated, thanks!

stim.Circuit('''
    H 8 1 2 3 4 6
    TICK
    CX 8 13 1 0 2 7 4 5
    TICK
    CX 8 10 1 13 3 7
    TICK
    CX 8 14 1 10 4 13 6 7
    TICK
    CX 8 12 1 14 2 10
    TICK
    CX 8 9 1 12 4 10
    TICK
    CX 8 11 4 14 6 10
    TICK
    CX 8 15 1 11 4 12
    TICK
    CX 1 15 2 11
    TICK
    CX 4 11
    TICK
    CX 4 15 6 11
    TICK
    H 8
    PAULI_CHANNEL_1(0, 0, 0) 8
    CX 8 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 8 16
    H 8
    PAULI_CHANNEL_1(0, 0, 0) 8
    H 9
    PAULI_CHANNEL_1(0, 0, 0) 9
    CX 9 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 9 16
    H 9
    PAULI_CHANNEL_1(0, 0, 0) 9
    H 10
    PAULI_CHANNEL_1(0, 0, 0) 10
    CX 10 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 10 16
    H 10
    PAULI_CHANNEL_1(0, 0, 0) 10
    H 11
    PAULI_CHANNEL_1(0, 0, 0) 11
    CX 11 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 11 16
    H 11
    PAULI_CHANNEL_1(0, 0, 0) 11
    H 12
    PAULI_CHANNEL_1(0, 0, 0) 12
    CX 12 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 12 16
    H 12
    PAULI_CHANNEL_1(0, 0, 0) 12
    H 13
    PAULI_CHANNEL_1(0, 0, 0) 13
    CX 13 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 13 16
    H 13
    PAULI_CHANNEL_1(0, 0, 0) 13
    H 14
    PAULI_CHANNEL_1(0, 0, 0) 14
    CX 14 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 14 16
    H 14
    PAULI_CHANNEL_1(0, 0, 0) 14
    H 15
    PAULI_CHANNEL_1(0, 0, 0) 15
    CX 15 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 15 16
    H 15
    PAULI_CHANNEL_1(0, 0, 0) 15
    MR(0) 16
    H 0
    PAULI_CHANNEL_1(0, 0, 0) 0
    CX 0 17
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 0 17
    H 0
    PAULI_CHANNEL_1(0, 0, 0) 0
    H 1
    PAULI_CHANNEL_1(0, 0, 0) 1
    CX 1 17
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 1 17
    H 1
    PAULI_CHANNEL_1(0, 0, 0) 1
    H 4
    PAULI_CHANNEL_1(0, 0, 0) 4
    CX 4 17
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 4 17
    H 4
    PAULI_CHANNEL_1(0, 0, 0) 4
    H 5
    PAULI_CHANNEL_1(0, 0, 0) 5
    CX 5 17
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 5 17
    H 5
    PAULI_CHANNEL_1(0, 0, 0) 5
    MR(0) 17
    H 2
    PAULI_CHANNEL_1(0, 0, 0) 2
    CX 2 18
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 2 18
    H 2
    PAULI_CHANNEL_1(0, 0, 0) 2
    H 6
    PAULI_CHANNEL_1(0, 0, 0) 6
    CX 6 18
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 6 18
    H 6
    PAULI_CHANNEL_1(0, 0, 0) 6
    MR(0) 18
    H 3
    PAULI_CHANNEL_1(0, 0, 0) 3
    CX 3 19
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 3 19
    H 3
    PAULI_CHANNEL_1(0, 0, 0) 3
    H 7
    PAULI_CHANNEL_1(0, 0, 0) 7
    CX 7 19
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 7 19
    H 7
    PAULI_CHANNEL_1(0, 0, 0) 7
    MR(0) 19
    H 4
    PAULI_CHANNEL_1(0, 0, 0) 4
    CX 4 20
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 4 20
    H 4
    PAULI_CHANNEL_1(0, 0, 0) 4
    H 5
    PAULI_CHANNEL_1(0, 0, 0) 5
    CX 5 20
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 5 20
    H 5
    PAULI_CHANNEL_1(0, 0, 0) 5
    H 8
    PAULI_CHANNEL_1(0, 0, 0) 8
    CX 8 20
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 8 20
    H 8
    PAULI_CHANNEL_1(0, 0, 0) 8
    H 9
    PAULI_CHANNEL_1(0, 0, 0) 9
    CX 9 20
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 9 20
    H 9
    PAULI_CHANNEL_1(0, 0, 0) 9
    MR(0) 20
    H 6
    PAULI_CHANNEL_1(0, 0, 0) 6
    CX 6 21
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 6 21
    H 6
    PAULI_CHANNEL_1(0, 0, 0) 6
    H 7
    PAULI_CHANNEL_1(0, 0, 0) 7
    CX 7 21
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 7 21
    H 7
    PAULI_CHANNEL_1(0, 0, 0) 7
    H 10
    PAULI_CHANNEL_1(0, 0, 0) 10
    CX 10 21
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 10 21
    H 10
    PAULI_CHANNEL_1(0, 0, 0) 10
    H 11
    PAULI_CHANNEL_1(0, 0, 0) 11
    CX 11 21
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 11 21
    H 11
    PAULI_CHANNEL_1(0, 0, 0) 11
    MR(0) 21
    CX 0 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 0 16
    CX 1 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 1 16
    CX 4 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 4 16
    CX 5 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 5 16
    CX 8 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 8 16
    CX 9 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 9 16
    CX 12 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 12 16
    CX 13 16
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 13 16
    MR(0) 16
    CX 2 17
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 2 17
    CX 3 17
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 3 17
    CX 6 17
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 6 17
    CX 7 17
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 7 17
    MR(0) 17
    CX 1 18
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 1 18
    CX 2 18
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 2 18
    CX 5 18
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 5 18
    CX 6 18
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 6 18
    CX 9 18
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 9 18
    CX 10 18
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 10 18
    MR(0) 18
    CX 13 19
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 13 19
    CX 14 19
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 14 19
    MR(0) 19
    CX 10 20
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 10 20
    CX 11 20
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 11 20
    MR(0) 20
    CX 14 21
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 14 21
    CX 15 21
    PAULI_CHANNEL_2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 15 21
    MR(0) 21
    H 8
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 8
    CX 8 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 8 16
    H 8
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 8
    H 9
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 9
    CX 9 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 9 16
    H 9
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 9
    H 10
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 10
    CX 10 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 10 16
    H 10
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 10
    H 11
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 11
    CX 11 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 11 16
    H 11
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 11
    H 12
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 12
    CX 12 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 12 16
    H 12
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 12
    H 13
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 13
    CX 13 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 13 16
    H 13
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 13
    H 14
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 14
    CX 14 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 14 16
    H 14
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 14
    H 15
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 15
    CX 15 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 15 16
    H 15
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 15
    MR(0.005) 16
    H 0
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 0
    CX 0 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 0 17
    H 0
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 0
    H 1
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 1
    CX 1 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 1 17
    H 1
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 1
    H 4
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 4
    CX 4 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 4 17
    H 4
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 4
    H 5
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 5
    CX 5 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 5 17
    H 5
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 5
    MR(0.005) 17
    H 2
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 2
    CX 2 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 2 18
    H 2
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 2
    H 6
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 6
    CX 6 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 6 18
    H 6
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 6
    MR(0.005) 18
    H 3
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 3
    CX 3 19
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 3 19
    H 3
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 3
    H 7
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 7
    CX 7 19
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 7 19
    H 7
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 7
    MR(0.005) 19
    H 4
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 4
    CX 4 20
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 4 20
    H 4
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 4
    H 5
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 5
    CX 5 20
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 5 20
    H 5
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 5
    H 8
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 8
    CX 8 20
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 8 20
    H 8
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 8
    H 9
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 9
    CX 9 20
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 9 20
    H 9
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 9
    MR(0.005) 20
    H 6
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 6
    CX 6 21
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 6 21
    H 6
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 6
    H 7
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 7
    CX 7 21
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 7 21
    H 7
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 7
    H 10
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 10
    CX 10 21
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 10 21
    H 10
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 10
    H 11
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 11
    CX 11 21
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 11 21
    H 11
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 11
    MR(0.005) 21
    CX 0 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 0 16
    CX 1 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 1 16
    CX 4 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 4 16
    CX 5 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 5 16
    CX 8 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 8 16
    CX 9 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 9 16
    CX 12 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 12 16
    CX 13 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 13 16
    MR(0.005) 16
    CX 2 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 2 17
    CX 3 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 3 17
    CX 6 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 6 17
    CX 7 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 7 17
    MR(0.005) 17
    CX 1 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 1 18
    CX 2 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 2 18
    CX 5 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 5 18
    CX 6 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 6 18
    CX 9 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 9 18
    CX 10 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 10 18
    MR(0.005) 18
    CX 13 19
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 13 19
    CX 14 19
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 14 19
    MR(0.005) 19
    CX 10 20
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 10 20
    CX 11 20
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 11 20
    MR(0.005) 20
    CX 14 21
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 14 21
    CX 15 21
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 15 21
    MR(0.005) 21
    DETECTOR(0, 1, 0) rec[-7] rec[-19]
    DETECTOR(1, 1, 0) rec[-8] rec[-20]
    DETECTOR(2, 1, 0) rec[-9] rec[-21]
    DETECTOR(3, 1, 0) rec[-10] rec[-22]
    DETECTOR(4, 1, 0) rec[-11] rec[-23]
    DETECTOR(5, 1, 0) rec[-12] rec[-24]
    DETECTOR(0, 1, 1) rec[-1] rec[-13]
    DETECTOR(1, 1, 1) rec[-2] rec[-14]
    DETECTOR(2, 1, 1) rec[-3] rec[-15]
    DETECTOR(3, 1, 1) rec[-4] rec[-16]
    DETECTOR(4, 1, 1) rec[-5] rec[-17]
    DETECTOR(5, 1, 1) rec[-6] rec[-18]
    H 8
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 8
    CX 8 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 8 16
    H 8
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 8
    H 9
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 9
    CX 9 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 9 16
    H 9
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 9
    H 10
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 10
    CX 10 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 10 16
    H 10
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 10
    H 11
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 11
    CX 11 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 11 16
    H 11
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 11
    H 12
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 12
    CX 12 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 12 16
    H 12
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 12
    H 13
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 13
    CX 13 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 13 16
    H 13
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 13
    H 14
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 14
    CX 14 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 14 16
    H 14
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 14
    H 15
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 15
    CX 15 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 15 16
    H 15
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 15
    MR(0.005) 16
    H 0
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 0
    CX 0 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 0 17
    H 0
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 0
    H 1
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 1
    CX 1 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 1 17
    H 1
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 1
    H 4
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 4
    CX 4 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 4 17
    H 4
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 4
    H 5
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 5
    CX 5 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 5 17
    H 5
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 5
    MR(0.005) 17
    H 2
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 2
    CX 2 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 2 18
    H 2
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 2
    H 6
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 6
    CX 6 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 6 18
    H 6
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 6
    MR(0.005) 18
    H 3
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 3
    CX 3 19
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 3 19
    H 3
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 3
    H 7
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 7
    CX 7 19
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 7 19
    H 7
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 7
    MR(0.005) 19
    H 4
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 4
    CX 4 20
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 4 20
    H 4
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 4
    H 5
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 5
    CX 5 20
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 5 20
    H 5
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 5
    H 8
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 8
    CX 8 20
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 8 20
    H 8
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 8
    H 9
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 9
    CX 9 20
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 9 20
    H 9
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 9
    MR(0.005) 20
    H 6
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 6
    CX 6 21
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 6 21
    H 6
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 6
    H 7
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 7
    CX 7 21
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 7 21
    H 7
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 7
    H 10
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 10
    CX 10 21
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 10 21
    H 10
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 10
    H 11
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 11
    CX 11 21
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 11 21
    H 11
    PAULI_CHANNEL_1(0.001, 0.001, 0.001) 11
    MR(0.005) 21
    CX 0 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 0 16
    CX 1 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 1 16
    CX 4 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 4 16
    CX 5 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 5 16
    CX 8 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 8 16
    CX 9 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 9 16
    CX 12 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 12 16
    CX 13 16
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 13 16
    MR(0.005) 16
    CX 2 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 2 17
    CX 3 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 3 17
    CX 6 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 6 17
    CX 7 17
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 7 17
    MR(0.005) 17
    CX 1 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 1 18
    CX 2 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 2 18
    CX 5 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 5 18
    CX 6 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 6 18
    CX 9 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 9 18
    CX 10 18
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 10 18
    MR(0.005) 18
    CX 13 19
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 13 19
    CX 14 19
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 14 19
    MR(0.005) 19
    CX 10 20
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 10 20
    CX 11 20
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 11 20
    MR(0.005) 20
    CX 14 21
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 14 21
    CX 15 21
    PAULI_CHANNEL_2(0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008, 0.008) 15 21
    MR(0.005) 21
    DETECTOR(0, 2, 0) rec[-7] rec[-19]
    DETECTOR(1, 2, 0) rec[-8] rec[-20]
    DETECTOR(2, 2, 0) rec[-9] rec[-21]
    DETECTOR(3, 2, 0) rec[-10] rec[-22]
    DETECTOR(4, 2, 0) rec[-11] rec[-23]
    DETECTOR(5, 2, 0) rec[-12] rec[-24]
    DETECTOR(0, 2, 1) rec[-1] rec[-13]
    DETECTOR(1, 2, 1) rec[-2] rec[-14]
    DETECTOR(2, 2, 1) rec[-3] rec[-15]
    DETECTOR(3, 2, 1) rec[-4] rec[-16]
    DETECTOR(4, 2, 1) rec[-5] rec[-17]
    DETECTOR(5, 2, 1) rec[-6] rec[-18]
''')```
$\endgroup$
1

1 Answer 1

0
$\begingroup$

You haven't declared any observables, so it's impossible for the circuit to fail. It's vacuously succeeding.

Methods like stim.Circuit.shortest_graphlike_error() will catch this kind of thing.

Less importantly, simulation will be faster for circuits that go

H 0 1
X_ERROR(0.1) 0 1

rather than

H 0
X_ERROR(0.1) 0
H 1
X_ERROR(0.1) 1
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.