{"abstract":"A Z stabilizer on the target is not copied onto the control, so a Bell state reports +XX, +ZI instead of +XX, +ZZ.","category":"Quantum circuit simulation","checks":7,"contract":"Input [n, gates] with gates h, s, x, z ([\"g\", q]) and cx ([\"cx\", c, t]). Track the n stabilizer generators of |0...0> (initially Z on each qubit) under the Aaronson-Gottesman update rules and return them as signed strings such as \"+XX\", character q describing qubit q.","evaluation_group":"w2-quantum_circuit_simulation-stabilizer-tableau","failed_approach":"The attempted repair XORs the target x bit into the control z bit, mixing Pauli components.","family":"w2-quantum_circuit_simulation-stabilizer-tableau-cnot-z-back-propagation","id":"FA-91001","implementations":{"attempt":{"sha256":"159b512cb44e3e9ff72a88fc1133e6e3ef314549d0f89a74508c8c89f8ad0938","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    n, gates = x\n    xs = [[0] * n for _ in range(n)]\n    zs = [[1 if i == j else 0 for j in range(n)] for i in range(n)]\n    rs = [0] * n\n    for g in gates:\n        op = g[0]\n        for row in range(n):\n            X, Z = xs[row], zs[row]\n            if op == 'h':\n                a = g[1]\n                rs[row] ^= X[a] & Z[a]\n                X[a], Z[a] = Z[a], X[a]\n            elif op == 's':\n                a = g[1]\n                rs[row] ^= X[a] & Z[a]\n                Z[a] ^= X[a]\n            elif op == 'x':\n                rs[row] ^= Z[g[1]]\n            elif op == 'z':\n                rs[row] ^= X[g[1]]\n            elif op == 'cx':\n                a, b = g[1], g[2]\n                rs[row] ^= X[a] & Z[b] & (X[b] ^ Z[a] ^ 1)\n                X[b] ^= X[a]\n                Z[a] ^= X[b]\n    letters = {(0, 0): 'I', (1, 0): 'X', (0, 1): 'Z', (1, 1): 'Y'}\n    return [('-' if rs[r] else '+') + ''.join(letters[(xs[r][q], zs[r][q])] for q in range(n)) for r in range(n)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: bell preparation', [2, [['h', 0], ['cx', 0, 1]]], ['+XX', '+ZZ']], ['regression: cx on excited control', [2, [['x', 0], ['cx', 0, 1]]], ['-ZI', '+ZZ']], ['regression: ghz', [3, [['h', 0], ['cx', 0, 1], ['cx', 0, 2]]], ['+XXX', '+ZZI', '+ZIZ']], ['control: h then s', [1, [['h', 0], ['s', 0]]], ['+Y']], ['control: s twice after h', [1, [['h', 0], ['s', 0], ['s', 0]]], ['-X']], ['control: x flips z sign', [1, [['x', 0]]], ['-Z']], ['control: z on plus', [1, [['h', 0], ['z', 0]]], ['-X']]], [['regression: random clifford 0', [3, [['cx', 1, 2]]], ['+ZII', '+IZI', '+IZZ']], ['regression: random clifford 2', [3, [['cx', 0, 2], ['z', 2], ['s', 2], ['h', 0], ['cx', 2, 1], ['x', 1], ['cx', 1, 0], ['x', 1], ['x', 1], ['z', 0], ['cx', 2, 1], ['h', 1], ['h', 0]]], ['-ZII', '-IXI', '-ZIZ']], ['regression: ghz', [3, [['h', 0], ['cx', 0, 1], ['cx', 0, 2]]], ['+XXX', '+ZZI', '+ZIZ']], ['control: h on y eigenstate', [1, [['h', 0], ['s', 0], ['h', 0]]], ['-Y']], ['control: random clifford 1', [1, [['z', 0], ['s', 0], ['x', 0], ['x', 0], ['x', 0], ['z', 0], ['z', 0], ['z', 0]]], ['-Z']], ['control: random clifford 3', [1, [['s', 0], ['h', 0], ['h', 0], ['x', 0], ['h', 0], ['h', 0], ['s', 0], ['s', 0]]], ['-Z']], ['control: random clifford 5', [1, [['h', 0], ['h', 0], ['h', 0], ['h', 0], ['z', 0], ['s', 0], ['s', 0], ['s', 0], ['x', 0], ['h', 0], ['x', 0], ['h', 0]]], ['-Z']]], [['regression: random clifford 7', [3, [['cx', 0, 2], ['cx', 2, 1], ['s', 0], ['cx', 0, 2], ['cx', 2, 1], ['z', 1], ['z', 0], ['h', 1], ['x', 1]]], ['+ZII', '+ZXI', '+IIZ']], ['regression: random clifford 8', [3, [['cx', 0, 1], ['h', 2], ['h', 2], ['h', 0], ['cx', 2, 1], ['h', 2], ['z', 0], ['cx', 1, 2]]], ['-XII', '-XZX', '+IIX']], ['regression: random clifford 2', [3, [['cx', 0, 2], ['z', 2], ['s', 2], ['h', 0], ['cx', 2, 1], ['x', 1], ['cx', 1, 0], ['x', 1], ['x', 1], ['z', 0], ['cx', 2, 1], ['h', 1], ['h', 0]]], ['-ZII', '-IXI', '-ZIZ']], ['control: random clifford 6', [1, [['h', 0], ['z', 0], ['h', 0], ['z', 0], ['x', 0], ['h', 0], ['h', 0], ['h', 0], ['h', 0], ['h', 0], ['h', 0], ['s', 0], ['x', 0]]], ['-Z']], ['control: random clifford 10', [1, [['z', 0], ['z', 0], ['s', 0], ['z', 0], ['h', 0], ['h', 0], ['s', 0]]], ['+Z']], ['control: random clifford 12', [1, [['h', 0], ['s', 0], ['h', 0], ['x', 0], ['s', 0], ['x', 0], ['x', 0], ['z', 0], ['h', 0], ['s', 0], ['s', 0]]], ['+Z']], ['control: random clifford 13', [1, [['z', 0], ['x', 0], ['z', 0], ['z', 0], ['s', 0], ['x', 0], ['h', 0], ['h', 0], ['z', 0], ['h', 0]]], ['+X']]], [['regression: random clifford 11', [2, [['s', 1], ['h', 0], ['cx', 0, 1], ['s', 0], ['x', 0]]], ['-YX', '-ZZ']], ['regression: random clifford 15', [2, [['z', 1], ['cx', 0, 1], ['x', 1], ['h', 1]]], ['+ZI', '-ZX']], ['regression: random clifford 7', [3, [['cx', 0, 2], ['cx', 2, 1], ['s', 0], ['cx', 0, 2], ['cx', 2, 1], ['z', 1], ['z', 0], ['h', 1], ['x', 1]]], ['+ZII', '+ZXI', '+IIZ']], ['control: random clifford 14', [1, [['z', 0], ['s', 0], ['h', 0], ['z', 0], ['h', 0], ['x', 0], ['x', 0], ['z', 0], ['h', 0], ['h', 0], ['x', 0], ['x', 0], ['z', 0], ['h', 0]]], ['-X']], ['control: random clifford 16', [1, [['x', 0], ['h', 0], ['h', 0], ['h', 0], ['h', 0], ['z', 0], ['z', 0], ['h', 0], ['x', 0], ['h', 0]]], ['-Z']], ['control: random clifford 17', [1, [['h', 0], ['s', 0], ['h', 0], ['h', 0], ['x', 0], ['s', 0], ['s', 0]]], ['+Y']], ['control: random clifford 24', [1, [['x', 0]]], ['-Z']]], [['regression: random clifford 19', [2, [['h', 0], ['cx', 1, 0], ['cx', 1, 0], ['cx', 0, 1], ['h', 0], ['cx', 1, 0], ['cx', 1, 0], ['cx', 0, 1], ['cx', 0, 1], ['cx', 1, 0], ['cx', 0, 1]]], ['+XZ', '-YY']], ['regression: random clifford 20', [3, [['cx', 2, 0], ['h', 2], ['z', 0], ['cx', 2, 1], ['cx', 0, 2], ['cx', 2, 1]]], ['+ZIX', '+ZZI', '+IIX']], ['regression: random clifford 9', [2, [['cx', 1, 0], ['cx', 1, 0], ['x', 0], ['s', 0], ['cx', 1, 0], ['h', 1], ['x', 0], ['z', 1], ['cx', 0, 1]]], ['-ZX', '-IX']], ['control: random clifford 25', [2, [['cx', 1, 0], ['cx', 1, 0]]], ['+ZI', '+IZ']], ['control: random clifford 26', [1, [['x', 0], ['h', 0], ['x', 0], ['h', 0], ['s', 0], ['h', 0], ['s', 0], ['h', 0], ['s', 0], ['s', 0], ['x', 0]]], ['+Y']], ['control: random clifford 29', [3, [['h', 2], ['s', 0], ['z', 1], ['h', 0], ['s', 0], ['z', 2], ['x', 1], ['z', 0], ['h', 2]]], ['-YII', '-IZI', '-IIZ']], ['control: random clifford 30', [1, [['x', 0], ['z', 0], ['x', 0], ['s', 0], ['z', 0], ['z', 0], ['h', 0]]], ['+X']]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"4b7259c62d42b2cc53fcde16b0e58eefe7f9eefefdb9fa349a827aa0410547a5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    n, gates = x\n    xs = [[0] * n for _ in range(n)]\n    zs = [[1 if i == j else 0 for j in range(n)] for i in range(n)]\n    rs = [0] * n\n    for g in gates:\n        op = g[0]\n        for row in range(n):\n            X, Z = xs[row], zs[row]\n            if op == 'h':\n                a = g[1]\n                rs[row] ^= X[a] & Z[a]\n                X[a], Z[a] = Z[a], X[a]\n            elif op == 's':\n                a = g[1]\n                rs[row] ^= X[a] & Z[a]\n                Z[a] ^= X[a]\n            elif op == 'x':\n                rs[row] ^= Z[g[1]]\n            elif op == 'z':\n                rs[row] ^= X[g[1]]\n            elif op == 'cx':\n                a, b = g[1], g[2]\n                rs[row] ^= X[a] & Z[b] & (X[b] ^ Z[a] ^ 1)\n                X[b] ^= X[a]\n                Z[b] ^= Z[a]\n    letters = {(0, 0): 'I', (1, 0): 'X', (0, 1): 'Z', (1, 1): 'Y'}\n    return [('-' if rs[r] else '+') + ''.join(letters[(xs[r][q], zs[r][q])] for q in range(n)) for r in range(n)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: bell preparation', [2, [['h', 0], ['cx', 0, 1]]], ['+XX', '+ZZ']], ['regression: cx on excited control', [2, [['x', 0], ['cx', 0, 1]]], ['-ZI', '+ZZ']], ['regression: ghz', [3, [['h', 0], ['cx', 0, 1], ['cx', 0, 2]]], ['+XXX', '+ZZI', '+ZIZ']], ['control: h then s', [1, [['h', 0], ['s', 0]]], ['+Y']], ['control: s twice after h', [1, [['h', 0], ['s', 0], ['s', 0]]], ['-X']], ['control: x flips z sign', [1, [['x', 0]]], ['-Z']], ['control: z on plus', [1, [['h', 0], ['z', 0]]], ['-X']]], [['regression: random clifford 0', [3, [['cx', 1, 2]]], ['+ZII', '+IZI', '+IZZ']], ['regression: random clifford 2', [3, [['cx', 0, 2], ['z', 2], ['s', 2], ['h', 0], ['cx', 2, 1], ['x', 1], ['cx', 1, 0], ['x', 1], ['x', 1], ['z', 0], ['cx', 2, 1], ['h', 1], ['h', 0]]], ['-ZII', '-IXI', '-ZIZ']], ['regression: ghz', [3, [['h', 0], ['cx', 0, 1], ['cx', 0, 2]]], ['+XXX', '+ZZI', '+ZIZ']], ['control: h on y eigenstate', [1, [['h', 0], ['s', 0], ['h', 0]]], ['-Y']], ['control: random clifford 1', [1, [['z', 0], ['s', 0], ['x', 0], ['x', 0], ['x', 0], ['z', 0], ['z', 0], ['z', 0]]], ['-Z']], ['control: random clifford 3', [1, [['s', 0], ['h', 0], ['h', 0], ['x', 0], ['h', 0], ['h', 0], ['s', 0], ['s', 0]]], ['-Z']], ['control: random clifford 5', [1, [['h', 0], ['h', 0], ['h', 0], ['h', 0], ['z', 0], ['s', 0], ['s', 0], ['s', 0], ['x', 0], ['h', 0], ['x', 0], ['h', 0]]], ['-Z']]], [['regression: random clifford 7', [3, [['cx', 0, 2], ['cx', 2, 1], ['s', 0], ['cx', 0, 2], ['cx', 2, 1], ['z', 1], ['z', 0], ['h', 1], ['x', 1]]], ['+ZII', '+ZXI', '+IIZ']], ['regression: random clifford 8', [3, [['cx', 0, 1], ['h', 2], ['h', 2], ['h', 0], ['cx', 2, 1], ['h', 2], ['z', 0], ['cx', 1, 2]]], ['-XII', '-XZX', '+IIX']], ['regression: random clifford 2', [3, [['cx', 0, 2], ['z', 2], ['s', 2], ['h', 0], ['cx', 2, 1], ['x', 1], ['cx', 1, 0], ['x', 1], ['x', 1], ['z', 0], ['cx', 2, 1], ['h', 1], ['h', 0]]], ['-ZII', '-IXI', '-ZIZ']], ['control: random clifford 6', [1, [['h', 0], ['z', 0], ['h', 0], ['z', 0], ['x', 0], ['h', 0], ['h', 0], ['h', 0], ['h', 0], ['h', 0], ['h', 0], ['s', 0], ['x', 0]]], ['-Z']], ['control: random clifford 10', [1, [['z', 0], ['z', 0], ['s', 0], ['z', 0], ['h', 0], ['h', 0], ['s', 0]]], ['+Z']], ['control: random clifford 12', [1, [['h', 0], ['s', 0], ['h', 0], ['x', 0], ['s', 0], ['x', 0], ['x', 0], ['z', 0], ['h', 0], ['s', 0], ['s', 0]]], ['+Z']], ['control: random clifford 13', [1, [['z', 0], ['x', 0], ['z', 0], ['z', 0], ['s', 0], ['x', 0], ['h', 0], ['h', 0], ['z', 0], ['h', 0]]], ['+X']]], [['regression: random clifford 11', [2, [['s', 1], ['h', 0], ['cx', 0, 1], ['s', 0], ['x', 0]]], ['-YX', '-ZZ']], ['regression: random clifford 15', [2, [['z', 1], ['cx', 0, 1], ['x', 1], ['h', 1]]], ['+ZI', '-ZX']], ['regression: random clifford 7', [3, [['cx', 0, 2], ['cx', 2, 1], ['s', 0], ['cx', 0, 2], ['cx', 2, 1], ['z', 1], ['z', 0], ['h', 1], ['x', 1]]], ['+ZII', '+ZXI', '+IIZ']], ['control: random clifford 14', [1, [['z', 0], ['s', 0], ['h', 0], ['z', 0], ['h', 0], ['x', 0], ['x', 0], ['z', 0], ['h', 0], ['h', 0], ['x', 0], ['x', 0], ['z', 0], ['h', 0]]], ['-X']], ['control: random clifford 16', [1, [['x', 0], ['h', 0], ['h', 0], ['h', 0], ['h', 0], ['z', 0], ['z', 0], ['h', 0], ['x', 0], ['h', 0]]], ['-Z']], ['control: random clifford 17', [1, [['h', 0], ['s', 0], ['h', 0], ['h', 0], ['x', 0], ['s', 0], ['s', 0]]], ['+Y']], ['control: random clifford 24', [1, [['x', 0]]], ['-Z']]], [['regression: random clifford 19', [2, [['h', 0], ['cx', 1, 0], ['cx', 1, 0], ['cx', 0, 1], ['h', 0], ['cx', 1, 0], ['cx', 1, 0], ['cx', 0, 1], ['cx', 0, 1], ['cx', 1, 0], ['cx', 0, 1]]], ['+XZ', '-YY']], ['regression: random clifford 20', [3, [['cx', 2, 0], ['h', 2], ['z', 0], ['cx', 2, 1], ['cx', 0, 2], ['cx', 2, 1]]], ['+ZIX', '+ZZI', '+IIX']], ['regression: random clifford 9', [2, [['cx', 1, 0], ['cx', 1, 0], ['x', 0], ['s', 0], ['cx', 1, 0], ['h', 1], ['x', 0], ['z', 1], ['cx', 0, 1]]], ['-ZX', '-IX']], ['control: random clifford 25', [2, [['cx', 1, 0], ['cx', 1, 0]]], ['+ZI', '+IZ']], ['control: random clifford 26', [1, [['x', 0], ['h', 0], ['x', 0], ['h', 0], ['s', 0], ['h', 0], ['s', 0], ['h', 0], ['s', 0], ['s', 0], ['x', 0]]], ['+Y']], ['control: random clifford 29', [3, [['h', 2], ['s', 0], ['z', 1], ['h', 0], ['s', 0], ['z', 2], ['x', 1], ['z', 0], ['h', 2]]], ['-YII', '-IZI', '-IIZ']], ['control: random clifford 30', [1, [['x', 0], ['z', 0], ['x', 0], ['s', 0], ['z', 0], ['z', 0], ['h', 0]]], ['+X']]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"c27c8fa19fa7532115f8ff1564725bc211a3dd98db317448242a9eef3834559a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    n, gates = x\n    xs = [[0] * n for _ in range(n)]\n    zs = [[1 if i == j else 0 for j in range(n)] for i in range(n)]\n    rs = [0] * n\n    for g in gates:\n        op = g[0]\n        for row in range(n):\n            X, Z = xs[row], zs[row]\n            if op == 'h':\n                a = g[1]\n                rs[row] ^= X[a] & Z[a]\n                X[a], Z[a] = Z[a], X[a]\n            elif op == 's':\n                a = g[1]\n                rs[row] ^= X[a] & Z[a]\n                Z[a] ^= X[a]\n            elif op == 'x':\n                rs[row] ^= Z[g[1]]\n            elif op == 'z':\n                rs[row] ^= X[g[1]]\n            elif op == 'cx':\n                a, b = g[1], g[2]\n                rs[row] ^= X[a] & Z[b] & (X[b] ^ Z[a] ^ 1)\n                X[b] ^= X[a]\n                Z[a] ^= Z[b]\n    letters = {(0, 0): 'I', (1, 0): 'X', (0, 1): 'Z', (1, 1): 'Y'}\n    return [('-' if rs[r] else '+') + ''.join(letters[(xs[r][q], zs[r][q])] for q in range(n)) for r in range(n)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: bell preparation', [2, [['h', 0], ['cx', 0, 1]]], ['+XX', '+ZZ']], ['regression: cx on excited control', [2, [['x', 0], ['cx', 0, 1]]], ['-ZI', '+ZZ']], ['regression: ghz', [3, [['h', 0], ['cx', 0, 1], ['cx', 0, 2]]], ['+XXX', '+ZZI', '+ZIZ']], ['control: h then s', [1, [['h', 0], ['s', 0]]], ['+Y']], ['control: s twice after h', [1, [['h', 0], ['s', 0], ['s', 0]]], ['-X']], ['control: x flips z sign', [1, [['x', 0]]], ['-Z']], ['control: z on plus', [1, [['h', 0], ['z', 0]]], ['-X']]], [['regression: random clifford 0', [3, [['cx', 1, 2]]], ['+ZII', '+IZI', '+IZZ']], ['regression: random clifford 2', [3, [['cx', 0, 2], ['z', 2], ['s', 2], ['h', 0], ['cx', 2, 1], ['x', 1], ['cx', 1, 0], ['x', 1], ['x', 1], ['z', 0], ['cx', 2, 1], ['h', 1], ['h', 0]]], ['-ZII', '-IXI', '-ZIZ']], ['regression: ghz', [3, [['h', 0], ['cx', 0, 1], ['cx', 0, 2]]], ['+XXX', '+ZZI', '+ZIZ']], ['control: h on y eigenstate', [1, [['h', 0], ['s', 0], ['h', 0]]], ['-Y']], ['control: random clifford 1', [1, [['z', 0], ['s', 0], ['x', 0], ['x', 0], ['x', 0], ['z', 0], ['z', 0], ['z', 0]]], ['-Z']], ['control: random clifford 3', [1, [['s', 0], ['h', 0], ['h', 0], ['x', 0], ['h', 0], ['h', 0], ['s', 0], ['s', 0]]], ['-Z']], ['control: random clifford 5', [1, [['h', 0], ['h', 0], ['h', 0], ['h', 0], ['z', 0], ['s', 0], ['s', 0], ['s', 0], ['x', 0], ['h', 0], ['x', 0], ['h', 0]]], ['-Z']]], [['regression: random clifford 7', [3, [['cx', 0, 2], ['cx', 2, 1], ['s', 0], ['cx', 0, 2], ['cx', 2, 1], ['z', 1], ['z', 0], ['h', 1], ['x', 1]]], ['+ZII', '+ZXI', '+IIZ']], ['regression: random clifford 8', [3, [['cx', 0, 1], ['h', 2], ['h', 2], ['h', 0], ['cx', 2, 1], ['h', 2], ['z', 0], ['cx', 1, 2]]], ['-XII', '-XZX', '+IIX']], ['regression: random clifford 2', [3, [['cx', 0, 2], ['z', 2], ['s', 2], ['h', 0], ['cx', 2, 1], ['x', 1], ['cx', 1, 0], ['x', 1], ['x', 1], ['z', 0], ['cx', 2, 1], ['h', 1], ['h', 0]]], ['-ZII', '-IXI', '-ZIZ']], ['control: random clifford 6', [1, [['h', 0], ['z', 0], ['h', 0], ['z', 0], ['x', 0], ['h', 0], ['h', 0], ['h', 0], ['h', 0], ['h', 0], ['h', 0], ['s', 0], ['x', 0]]], ['-Z']], ['control: random clifford 10', [1, [['z', 0], ['z', 0], ['s', 0], ['z', 0], ['h', 0], ['h', 0], ['s', 0]]], ['+Z']], ['control: random clifford 12', [1, [['h', 0], ['s', 0], ['h', 0], ['x', 0], ['s', 0], ['x', 0], ['x', 0], ['z', 0], ['h', 0], ['s', 0], ['s', 0]]], ['+Z']], ['control: random clifford 13', [1, [['z', 0], ['x', 0], ['z', 0], ['z', 0], ['s', 0], ['x', 0], ['h', 0], ['h', 0], ['z', 0], ['h', 0]]], ['+X']]], [['regression: random clifford 11', [2, [['s', 1], ['h', 0], ['cx', 0, 1], ['s', 0], ['x', 0]]], ['-YX', '-ZZ']], ['regression: random clifford 15', [2, [['z', 1], ['cx', 0, 1], ['x', 1], ['h', 1]]], ['+ZI', '-ZX']], ['regression: random clifford 7', [3, [['cx', 0, 2], ['cx', 2, 1], ['s', 0], ['cx', 0, 2], ['cx', 2, 1], ['z', 1], ['z', 0], ['h', 1], ['x', 1]]], ['+ZII', '+ZXI', '+IIZ']], ['control: random clifford 14', [1, [['z', 0], ['s', 0], ['h', 0], ['z', 0], ['h', 0], ['x', 0], ['x', 0], ['z', 0], ['h', 0], ['h', 0], ['x', 0], ['x', 0], ['z', 0], ['h', 0]]], ['-X']], ['control: random clifford 16', [1, [['x', 0], ['h', 0], ['h', 0], ['h', 0], ['h', 0], ['z', 0], ['z', 0], ['h', 0], ['x', 0], ['h', 0]]], ['-Z']], ['control: random clifford 17', [1, [['h', 0], ['s', 0], ['h', 0], ['h', 0], ['x', 0], ['s', 0], ['s', 0]]], ['+Y']], ['control: random clifford 24', [1, [['x', 0]]], ['-Z']]], [['regression: random clifford 19', [2, [['h', 0], ['cx', 1, 0], ['cx', 1, 0], ['cx', 0, 1], ['h', 0], ['cx', 1, 0], ['cx', 1, 0], ['cx', 0, 1], ['cx', 0, 1], ['cx', 1, 0], ['cx', 0, 1]]], ['+XZ', '-YY']], ['regression: random clifford 20', [3, [['cx', 2, 0], ['h', 2], ['z', 0], ['cx', 2, 1], ['cx', 0, 2], ['cx', 2, 1]]], ['+ZIX', '+ZZI', '+IIX']], ['regression: random clifford 9', [2, [['cx', 1, 0], ['cx', 1, 0], ['x', 0], ['s', 0], ['cx', 1, 0], ['h', 1], ['x', 0], ['z', 1], ['cx', 0, 1]]], ['-ZX', '-IX']], ['control: random clifford 25', [2, [['cx', 1, 0], ['cx', 1, 0]]], ['+ZI', '+IZ']], ['control: random clifford 26', [1, [['x', 0], ['h', 0], ['x', 0], ['h', 0], ['s', 0], ['h', 0], ['s', 0], ['h', 0], ['s', 0], ['s', 0], ['x', 0]]], ['+Y']], ['control: random clifford 29', [3, [['h', 2], ['s', 0], ['z', 1], ['h', 0], ['s', 0], ['z', 2], ['x', 1], ['z', 0], ['h', 2]]], ['-YII', '-IZI', '-IIZ']], ['control: random clifford 30', [1, [['x', 0], ['z', 0], ['x', 0], ['s', 0], ['z', 0], ['z', 0], ['h', 0]]], ['+X']]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"A deterministic bounded teaching model with a stipulated toy contract; amplitudes are rounded to fixed decimals for strict JSON output. It is not a production quantum SDK and claims no standards conformance. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-quantum_circuit_simulation-stabilizer-tableau-cnot-z-back-propagation","generated_at":"2026-09-29T14:51:31.810914+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Stabilizer simulators verify Clifford circuits and error-correction encoders; a phase-bit rule error yields wrong syndromes.","repair":"Set z_control ^= z_target.","root_cause":"The CNOT rule updates z_target ^= z_control; Z propagates from target to control.","sha256":"d6ff9b00fd0ff595d8fa9ac0113fe61121c51836eb7eb0f665f14810106f3699","title":"Tableau CNOT propagates Z forward instead of backward · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.433,"exit_code":1,"observations":[{"actual":["+YX","+IZ"],"check":"regression: bell preparation","expected":["+XX","+ZZ"],"passed":false},{"actual":["-ZI","+IZ"],"check":"regression: cx on excited control","expected":["-ZI","+ZZ"],"passed":false},{"actual":["+XXX","+IZI","+IIZ"],"check":"regression: ghz","expected":["+XXX","+ZZI","+ZIZ"],"passed":false},{"actual":["+Y"],"check":"control: h then s","expected":["+Y"],"passed":true},{"actual":["-X"],"check":"control: s twice after h","expected":["-X"],"passed":true},{"actual":["-Z"],"check":"control: x flips z sign","expected":["-Z"],"passed":true},{"actual":["-X"],"check":"control: z on plus","expected":["-X"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: bell preparation\", \"actual\": [\"+YX\", \"+IZ\"], \"expected\": [\"+XX\", \"+ZZ\"], \"passed\": false}, {\"check\": \"regression: cx on excited control\", \"actual\": [\"-ZI\", \"+IZ\"], \"expected\": [\"-ZI\", \"+ZZ\"], \"passed\": false}, {\"check\": \"regression: ghz\", \"actual\": [\"+XXX\", \"+IZI\", \"+IIZ\"], \"expected\": [\"+XXX\", \"+ZZI\", \"+ZIZ\"], \"passed\": false}, {\"check\": \"control: h then s\", \"actual\": [\"+Y\"], \"expected\": [\"+Y\"], \"passed\": true}, {\"check\": \"control: s twice after h\", \"actual\": [\"-X\"], \"expected\": [\"-X\"], \"passed\": true}, {\"check\": \"control: x flips z sign\", \"actual\": [\"-Z\"], \"expected\": [\"-Z\"], \"passed\": true}, {\"check\": \"control: z on plus\", \"actual\": [\"-X\"], \"expected\": [\"-X\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.016,"exit_code":1,"observations":[{"actual":["+XX","+IZ"],"check":"regression: bell preparation","expected":["+XX","+ZZ"],"passed":false},{"actual":["-ZZ","+IZ"],"check":"regression: cx on excited control","expected":["-ZI","+ZZ"],"passed":false},{"actual":["+XXX","+IZI","+IIZ"],"check":"regression: ghz","expected":["+XXX","+ZZI","+ZIZ"],"passed":false},{"actual":["+Y"],"check":"control: h then s","expected":["+Y"],"passed":true},{"actual":["-X"],"check":"control: s twice after h","expected":["-X"],"passed":true},{"actual":["-Z"],"check":"control: x flips z sign","expected":["-Z"],"passed":true},{"actual":["-X"],"check":"control: z on plus","expected":["-X"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: bell preparation\", \"actual\": [\"+XX\", \"+IZ\"], \"expected\": [\"+XX\", \"+ZZ\"], \"passed\": false}, {\"check\": \"regression: cx on excited control\", \"actual\": [\"-ZZ\", \"+IZ\"], \"expected\": [\"-ZI\", \"+ZZ\"], \"passed\": false}, {\"check\": \"regression: ghz\", \"actual\": [\"+XXX\", \"+IZI\", \"+IIZ\"], \"expected\": [\"+XXX\", \"+ZZI\", \"+ZIZ\"], \"passed\": false}, {\"check\": \"control: h then s\", \"actual\": [\"+Y\"], \"expected\": [\"+Y\"], \"passed\": true}, {\"check\": \"control: s twice after h\", \"actual\": [\"-X\"], \"expected\": [\"-X\"], \"passed\": true}, {\"check\": \"control: x flips z sign\", \"actual\": [\"-Z\"], \"expected\": [\"-Z\"], \"passed\": true}, {\"check\": \"control: z on plus\", \"actual\": [\"-X\"], \"expected\": [\"-X\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.866,"exit_code":0,"observations":[{"actual":["+XX","+ZZ"],"check":"regression: bell preparation","expected":["+XX","+ZZ"],"passed":true},{"actual":["-ZI","+ZZ"],"check":"regression: cx on excited control","expected":["-ZI","+ZZ"],"passed":true},{"actual":["+XXX","+ZZI","+ZIZ"],"check":"regression: ghz","expected":["+XXX","+ZZI","+ZIZ"],"passed":true},{"actual":["+Y"],"check":"control: h then s","expected":["+Y"],"passed":true},{"actual":["-X"],"check":"control: s twice after h","expected":["-X"],"passed":true},{"actual":["-Z"],"check":"control: x flips z sign","expected":["-Z"],"passed":true},{"actual":["-X"],"check":"control: z on plus","expected":["-X"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: bell preparation\", \"actual\": [\"+XX\", \"+ZZ\"], \"expected\": [\"+XX\", \"+ZZ\"], \"passed\": true}, {\"check\": \"regression: cx on excited control\", \"actual\": [\"-ZI\", \"+ZZ\"], \"expected\": [\"-ZI\", \"+ZZ\"], \"passed\": true}, {\"check\": \"regression: ghz\", \"actual\": [\"+XXX\", \"+ZZI\", \"+ZIZ\"], \"expected\": [\"+XXX\", \"+ZZI\", \"+ZIZ\"], \"passed\": true}, {\"check\": \"control: h then s\", \"actual\": [\"+Y\"], \"expected\": [\"+Y\"], \"passed\": true}, {\"check\": \"control: s twice after h\", \"actual\": [\"-X\"], \"expected\": [\"-X\"], \"passed\": true}, {\"check\": \"control: x flips z sign\", \"actual\": [\"-Z\"], \"expected\": [\"-Z\"], \"passed\": true}, {\"check\": \"control: z on plus\", \"actual\": [\"-X\"], \"expected\": [\"-X\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}