{"abstract":"The product of iX and iZ is reported with phase exponent 1 instead of 2 plus the XZ contribution.","category":"Quantum circuit simulation","checks":7,"contract":"Input [[k1, s1], [k2, s2]] representing i**k1 * s1 and i**k2 * s2 (Pauli strings over IXYZ, equal length). Return [k mod 4, s] with i**k * s = (i**k1 s1)(i**k2 s2), using XY=iZ, YZ=iX, ZX=iY and the reversed products with -i. Error \"length-mismatch\".","evaluation_group":"w2-quantum_circuit_simulation-pauli-product-phase","failed_approach":"The attempted repair adds the powers but folds them modulo 2, discarding the imaginary unit.","family":"w2-quantum_circuit_simulation-pauli-product-phase-global-phase-combination","id":"FA-90966","implementations":{"attempt":{"sha256":"639c153837c9d59a6173397eeff1da5a7b2f3c531e2d15fa738ecbc69cca6b5f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    (k1, s1), (k2, s2) = x\n    if len(s1) != len(s2):\n        return 'length-mismatch'\n    table = {('X', 'Y'): (1, 'Z'), ('Y', 'Z'): (1, 'X'), ('Z', 'X'): (1, 'Y'),\n             ('Y', 'X'): (3, 'Z'), ('Z', 'Y'): (3, 'X'), ('X', 'Z'): (3, 'Y')}\n    k = (k1 + k2) % 2\n    out = []\n    for a, b in zip(s1, s2):\n        if a == 'I':\n            out.append(b)\n        elif b == 'I':\n            out.append(a)\n        elif a == b:\n            out.append('I')\n        else:\n            dk, c = table[(a, b)]\n            k += dk\n            out.append(c)\n    return [k % 4, ''.join(out)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: identity factors', [[1, 'II'], [2, 'IZ']], [3, 'IZ']], ['regression: negative phase input', [[-1, 'Z'], [0, 'X']], [0, 'Y']], ['regression: phases wrap', [[3, 'XX'], [3, 'ZZ']], [0, 'YY']], ['control: X times Y', [[0, 'X'], [0, 'Y']], [1, 'Z']], ['control: Y times X', [[0, 'Y'], [0, 'X']], [3, 'Z']], ['control: X times Z', [[0, 'X'], [0, 'Z']], [3, 'Y']], ['control: Z times X', [[0, 'Z'], [0, 'X']], [1, 'Y']]], [['regression: random product 0', [[0, 'YY'], [2, 'ZY']], [3, 'XI']], ['regression: random product 2', [[0, 'Y'], [1, 'X']], [0, 'Z']], ['regression: phases wrap', [[3, 'XX'], [3, 'ZZ']], [0, 'YY']], ['control: square of Y', [[0, 'Y'], [0, 'Y']], [0, 'I']], ['control: anticommuting pair twice', [[0, 'XY'], [0, 'YX']], [0, 'ZZ']], ['control: length mismatch', [[0, 'X'], [0, 'XY']], 'length-mismatch'], ['control: random product 1', [[-2, 'ZZI'], [2, 'ZXI']], [1, 'IYI']]], [['regression: random product 4', [[0, 'YXY'], [1, 'IZZ']], [1, 'YYX']], ['regression: random product 5', [[0, 'YIXX'], [2, 'ZIYY']], [1, 'XIZZ']], ['regression: random product 8', [[-1, 'XZIY'], [3, 'IXYY']], [3, 'XYYI']], ['control: random product 6', [[0, 'Z'], [0, 'Z']], [0, 'I']], ['control: random product 15', [[0, 'YYZI'], [0, 'XYXZ']], [0, 'ZIYZ']], ['control: random product 19', [[2, 'I'], [2, 'Y']], [0, 'Y']], ['control: random product 21', [[2, 'YY'], [2, 'II']], [0, 'YY']]], [['regression: random product 8', [[-1, 'XZIY'], [3, 'IXYY']], [3, 'XYYI']], ['regression: random product 9', [[0, 'I'], [3, 'I']], [3, 'I']], ['regression: random product 12', [[-2, 'ZXIX'], [1, 'ZYXX']], [0, 'IZXI']], ['control: random product 23', [[0, 'YYI'], [0, 'YYX']], [0, 'IIX']], ['control: random product 34', [[-2, 'XXZ'], [2, 'IYZ']], [1, 'XZI']], ['control: random product 35', [[-2, 'IY'], [2, 'IX']], [3, 'IZ']], ['control: random product 37', [[-2, 'IIZ'], [2, 'XZX']], [1, 'XZY']]], [['regression: random product 11', [[-2, 'ZXI'], [3, 'IZX']], [0, 'ZYX']], ['regression: random product 12', [[-2, 'ZXIX'], [1, 'ZYXX']], [0, 'IZXI']], ['regression: random product 13', [[-1, 'Z'], [3, 'X']], [3, 'Y']], ['control: X times Y', [[0, 'X'], [0, 'Y']], [1, 'Z']], ['control: Y times X', [[0, 'Y'], [0, 'X']], [3, 'Z']], ['control: X times Z', [[0, 'X'], [0, 'Z']], [3, 'Y']], ['control: Z times X', [[0, 'Z'], [0, 'X']], [1, 'Y']]]]\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":"3274e3215e1ea8d4cd26df8bfda970ea460607c7331ab6ec58a4d42e4f5bf0f9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    (k1, s1), (k2, s2) = x\n    if len(s1) != len(s2):\n        return 'length-mismatch'\n    table = {('X', 'Y'): (1, 'Z'), ('Y', 'Z'): (1, 'X'), ('Z', 'X'): (1, 'Y'),\n             ('Y', 'X'): (3, 'Z'), ('Z', 'Y'): (3, 'X'), ('X', 'Z'): (3, 'Y')}\n    k = k1 * k2\n    out = []\n    for a, b in zip(s1, s2):\n        if a == 'I':\n            out.append(b)\n        elif b == 'I':\n            out.append(a)\n        elif a == b:\n            out.append('I')\n        else:\n            dk, c = table[(a, b)]\n            k += dk\n            out.append(c)\n    return [k % 4, ''.join(out)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: identity factors', [[1, 'II'], [2, 'IZ']], [3, 'IZ']], ['regression: negative phase input', [[-1, 'Z'], [0, 'X']], [0, 'Y']], ['regression: phases wrap', [[3, 'XX'], [3, 'ZZ']], [0, 'YY']], ['control: X times Y', [[0, 'X'], [0, 'Y']], [1, 'Z']], ['control: Y times X', [[0, 'Y'], [0, 'X']], [3, 'Z']], ['control: X times Z', [[0, 'X'], [0, 'Z']], [3, 'Y']], ['control: Z times X', [[0, 'Z'], [0, 'X']], [1, 'Y']]], [['regression: random product 0', [[0, 'YY'], [2, 'ZY']], [3, 'XI']], ['regression: random product 2', [[0, 'Y'], [1, 'X']], [0, 'Z']], ['regression: phases wrap', [[3, 'XX'], [3, 'ZZ']], [0, 'YY']], ['control: square of Y', [[0, 'Y'], [0, 'Y']], [0, 'I']], ['control: anticommuting pair twice', [[0, 'XY'], [0, 'YX']], [0, 'ZZ']], ['control: length mismatch', [[0, 'X'], [0, 'XY']], 'length-mismatch'], ['control: random product 1', [[-2, 'ZZI'], [2, 'ZXI']], [1, 'IYI']]], [['regression: random product 4', [[0, 'YXY'], [1, 'IZZ']], [1, 'YYX']], ['regression: random product 5', [[0, 'YIXX'], [2, 'ZIYY']], [1, 'XIZZ']], ['regression: random product 8', [[-1, 'XZIY'], [3, 'IXYY']], [3, 'XYYI']], ['control: random product 6', [[0, 'Z'], [0, 'Z']], [0, 'I']], ['control: random product 15', [[0, 'YYZI'], [0, 'XYXZ']], [0, 'ZIYZ']], ['control: random product 19', [[2, 'I'], [2, 'Y']], [0, 'Y']], ['control: random product 21', [[2, 'YY'], [2, 'II']], [0, 'YY']]], [['regression: random product 8', [[-1, 'XZIY'], [3, 'IXYY']], [3, 'XYYI']], ['regression: random product 9', [[0, 'I'], [3, 'I']], [3, 'I']], ['regression: random product 12', [[-2, 'ZXIX'], [1, 'ZYXX']], [0, 'IZXI']], ['control: random product 23', [[0, 'YYI'], [0, 'YYX']], [0, 'IIX']], ['control: random product 34', [[-2, 'XXZ'], [2, 'IYZ']], [1, 'XZI']], ['control: random product 35', [[-2, 'IY'], [2, 'IX']], [3, 'IZ']], ['control: random product 37', [[-2, 'IIZ'], [2, 'XZX']], [1, 'XZY']]], [['regression: random product 11', [[-2, 'ZXI'], [3, 'IZX']], [0, 'ZYX']], ['regression: random product 12', [[-2, 'ZXIX'], [1, 'ZYXX']], [0, 'IZXI']], ['regression: random product 13', [[-1, 'Z'], [3, 'X']], [3, 'Y']], ['control: X times Y', [[0, 'X'], [0, 'Y']], [1, 'Z']], ['control: Y times X', [[0, 'Y'], [0, 'X']], [3, 'Z']], ['control: X times Z', [[0, 'X'], [0, 'Z']], [3, 'Y']], ['control: Z times X', [[0, 'Z'], [0, 'X']], [1, 'Y']]]]\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":"ac14a3990dacb7f9fb605ca9037cf4bc4b763ddf88df1a157076e32f329e2444","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    (k1, s1), (k2, s2) = x\n    if len(s1) != len(s2):\n        return 'length-mismatch'\n    table = {('X', 'Y'): (1, 'Z'), ('Y', 'Z'): (1, 'X'), ('Z', 'X'): (1, 'Y'),\n             ('Y', 'X'): (3, 'Z'), ('Z', 'Y'): (3, 'X'), ('X', 'Z'): (3, 'Y')}\n    k = k1 + k2\n    out = []\n    for a, b in zip(s1, s2):\n        if a == 'I':\n            out.append(b)\n        elif b == 'I':\n            out.append(a)\n        elif a == b:\n            out.append('I')\n        else:\n            dk, c = table[(a, b)]\n            k += dk\n            out.append(c)\n    return [k % 4, ''.join(out)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: identity factors', [[1, 'II'], [2, 'IZ']], [3, 'IZ']], ['regression: negative phase input', [[-1, 'Z'], [0, 'X']], [0, 'Y']], ['regression: phases wrap', [[3, 'XX'], [3, 'ZZ']], [0, 'YY']], ['control: X times Y', [[0, 'X'], [0, 'Y']], [1, 'Z']], ['control: Y times X', [[0, 'Y'], [0, 'X']], [3, 'Z']], ['control: X times Z', [[0, 'X'], [0, 'Z']], [3, 'Y']], ['control: Z times X', [[0, 'Z'], [0, 'X']], [1, 'Y']]], [['regression: random product 0', [[0, 'YY'], [2, 'ZY']], [3, 'XI']], ['regression: random product 2', [[0, 'Y'], [1, 'X']], [0, 'Z']], ['regression: phases wrap', [[3, 'XX'], [3, 'ZZ']], [0, 'YY']], ['control: square of Y', [[0, 'Y'], [0, 'Y']], [0, 'I']], ['control: anticommuting pair twice', [[0, 'XY'], [0, 'YX']], [0, 'ZZ']], ['control: length mismatch', [[0, 'X'], [0, 'XY']], 'length-mismatch'], ['control: random product 1', [[-2, 'ZZI'], [2, 'ZXI']], [1, 'IYI']]], [['regression: random product 4', [[0, 'YXY'], [1, 'IZZ']], [1, 'YYX']], ['regression: random product 5', [[0, 'YIXX'], [2, 'ZIYY']], [1, 'XIZZ']], ['regression: random product 8', [[-1, 'XZIY'], [3, 'IXYY']], [3, 'XYYI']], ['control: random product 6', [[0, 'Z'], [0, 'Z']], [0, 'I']], ['control: random product 15', [[0, 'YYZI'], [0, 'XYXZ']], [0, 'ZIYZ']], ['control: random product 19', [[2, 'I'], [2, 'Y']], [0, 'Y']], ['control: random product 21', [[2, 'YY'], [2, 'II']], [0, 'YY']]], [['regression: random product 8', [[-1, 'XZIY'], [3, 'IXYY']], [3, 'XYYI']], ['regression: random product 9', [[0, 'I'], [3, 'I']], [3, 'I']], ['regression: random product 12', [[-2, 'ZXIX'], [1, 'ZYXX']], [0, 'IZXI']], ['control: random product 23', [[0, 'YYI'], [0, 'YYX']], [0, 'IIX']], ['control: random product 34', [[-2, 'XXZ'], [2, 'IYZ']], [1, 'XZI']], ['control: random product 35', [[-2, 'IY'], [2, 'IX']], [3, 'IZ']], ['control: random product 37', [[-2, 'IIZ'], [2, 'XZX']], [1, 'XZY']]], [['regression: random product 11', [[-2, 'ZXI'], [3, 'IZX']], [0, 'ZYX']], ['regression: random product 12', [[-2, 'ZXIX'], [1, 'ZYXX']], [0, 'IZXI']], ['regression: random product 13', [[-1, 'Z'], [3, 'X']], [3, 'Y']], ['control: X times Y', [[0, 'X'], [0, 'Y']], [1, 'Z']], ['control: Y times X', [[0, 'Y'], [0, 'X']], [3, 'Z']], ['control: X times Z', [[0, 'X'], [0, 'Z']], [3, 'Y']], ['control: Z times X', [[0, 'Z'], [0, 'X']], [1, 'Y']]]]\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-pauli-product-phase-global-phase-combination","generated_at":"2026-09-29T14:51:31.589260+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Pauli-frame and stabilizer bookkeeping multiply Pauli strings constantly; one phase slip flips measurement signs.","repair":"Start from k = k1 + k2.","root_cause":"Input phase powers are combined with k1 * k2, but powers of i add under multiplication.","sha256":"24a69093f72e6792a1e8e10f1afde14fe77ec014ac597b8906c981bdc10e9265","title":"Pauli product multiplies phase exponents · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.493,"exit_code":1,"observations":[{"actual":[1,"IZ"],"check":"regression: identity factors","expected":[3,"IZ"],"passed":false},{"actual":[2,"Y"],"check":"regression: negative phase input","expected":[0,"Y"],"passed":false},{"actual":[2,"YY"],"check":"regression: phases wrap","expected":[0,"YY"],"passed":false},{"actual":[1,"Z"],"check":"control: X times Y","expected":[1,"Z"],"passed":true},{"actual":[3,"Z"],"check":"control: Y times X","expected":[3,"Z"],"passed":true},{"actual":[3,"Y"],"check":"control: X times Z","expected":[3,"Y"],"passed":true},{"actual":[1,"Y"],"check":"control: Z times X","expected":[1,"Y"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: identity factors\", \"actual\": [1, \"IZ\"], \"expected\": [3, \"IZ\"], \"passed\": false}, {\"check\": \"regression: negative phase input\", \"actual\": [2, \"Y\"], \"expected\": [0, \"Y\"], \"passed\": false}, {\"check\": \"regression: phases wrap\", \"actual\": [2, \"YY\"], \"expected\": [0, \"YY\"], \"passed\": false}, {\"check\": \"control: X times Y\", \"actual\": [1, \"Z\"], \"expected\": [1, \"Z\"], \"passed\": true}, {\"check\": \"control: Y times X\", \"actual\": [3, \"Z\"], \"expected\": [3, \"Z\"], \"passed\": true}, {\"check\": \"control: X times Z\", \"actual\": [3, \"Y\"], \"expected\": [3, \"Y\"], \"passed\": true}, {\"check\": \"control: Z times X\", \"actual\": [1, \"Y\"], \"expected\": [1, \"Y\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.876,"exit_code":1,"observations":[{"actual":[2,"IZ"],"check":"regression: identity factors","expected":[3,"IZ"],"passed":false},{"actual":[1,"Y"],"check":"regression: negative phase input","expected":[0,"Y"],"passed":false},{"actual":[3,"YY"],"check":"regression: phases wrap","expected":[0,"YY"],"passed":false},{"actual":[1,"Z"],"check":"control: X times Y","expected":[1,"Z"],"passed":true},{"actual":[3,"Z"],"check":"control: Y times X","expected":[3,"Z"],"passed":true},{"actual":[3,"Y"],"check":"control: X times Z","expected":[3,"Y"],"passed":true},{"actual":[1,"Y"],"check":"control: Z times X","expected":[1,"Y"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: identity factors\", \"actual\": [2, \"IZ\"], \"expected\": [3, \"IZ\"], \"passed\": false}, {\"check\": \"regression: negative phase input\", \"actual\": [1, \"Y\"], \"expected\": [0, \"Y\"], \"passed\": false}, {\"check\": \"regression: phases wrap\", \"actual\": [3, \"YY\"], \"expected\": [0, \"YY\"], \"passed\": false}, {\"check\": \"control: X times Y\", \"actual\": [1, \"Z\"], \"expected\": [1, \"Z\"], \"passed\": true}, {\"check\": \"control: Y times X\", \"actual\": [3, \"Z\"], \"expected\": [3, \"Z\"], \"passed\": true}, {\"check\": \"control: X times Z\", \"actual\": [3, \"Y\"], \"expected\": [3, \"Y\"], \"passed\": true}, {\"check\": \"control: Z times X\", \"actual\": [1, \"Y\"], \"expected\": [1, \"Y\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.984,"exit_code":0,"observations":[{"actual":[3,"IZ"],"check":"regression: identity factors","expected":[3,"IZ"],"passed":true},{"actual":[0,"Y"],"check":"regression: negative phase input","expected":[0,"Y"],"passed":true},{"actual":[0,"YY"],"check":"regression: phases wrap","expected":[0,"YY"],"passed":true},{"actual":[1,"Z"],"check":"control: X times Y","expected":[1,"Z"],"passed":true},{"actual":[3,"Z"],"check":"control: Y times X","expected":[3,"Z"],"passed":true},{"actual":[3,"Y"],"check":"control: X times Z","expected":[3,"Y"],"passed":true},{"actual":[1,"Y"],"check":"control: Z times X","expected":[1,"Y"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: identity factors\", \"actual\": [3, \"IZ\"], \"expected\": [3, \"IZ\"], \"passed\": true}, {\"check\": \"regression: negative phase input\", \"actual\": [0, \"Y\"], \"expected\": [0, \"Y\"], \"passed\": true}, {\"check\": \"regression: phases wrap\", \"actual\": [0, \"YY\"], \"expected\": [0, \"YY\"], \"passed\": true}, {\"check\": \"control: X times Y\", \"actual\": [1, \"Z\"], \"expected\": [1, \"Z\"], \"passed\": true}, {\"check\": \"control: Y times X\", \"actual\": [3, \"Z\"], \"expected\": [3, \"Z\"], \"passed\": true}, {\"check\": \"control: X times Z\", \"actual\": [3, \"Y\"], \"expected\": [3, \"Y\"], \"passed\": true}, {\"check\": \"control: Z times X\", \"actual\": [1, \"Y\"], \"expected\": [1, \"Y\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}