FA-90961 / Quantum circuit simulation / Open access
Pauli product table gives XZ a +i phase · case 01
X*Z is reported as +iY instead of -iY, so commutation-derived signs are wrong.
ROOT CAUSE
The lookup entry for (X, Z) stores phase power 1 instead of 3.
VERIFIED REPAIR
Store XZ = -iY (phase power 3); only the cyclic orders XY, YZ, ZX carry +i.
Unsuccessful approach: The attempted repair sets both ZX and XZ to power 3, breaking the cyclic ZX = iY entry.
Case 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".
Why this case matters
Pauli-frame and stabilizer bookkeeping multiply Pauli strings constantly; one phase slip flips measurement signs.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
(k1, s1), (k2, s2) = x
if len(s1) != len(s2):
return 'length-mismatch'
table = {('X', 'Y'): (1, 'Z'), ('Y', 'Z'): (1, 'X'), ('Z', 'X'): (1, 'Y'),
('Y', 'X'): (3, 'Z'), ('Z', 'Y'): (3, 'X'), ('X', 'Z'): (1, 'Y')}
k = k1 + k2
out = []
for a, b in zip(s1, s2):
if a == 'I':
out.append(b)
elif b == 'I':
out.append(a)
elif a == b:
out.append('I')
else:
dk, c = table[(a, b)]
k += dk
out.append(c)
return [k % 4, ''.join(out)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression: X times Z', [[0, 'X'], [0, 'Z']], [3, 'Y']], ['regression: random product 4', [[0, 'YXY'], [1, 'IZZ']], [1, 'YYX']], ['repair check: Z times X', [[0, 'Z'], [0, 'X']], [1, 'Y']], ['control: X times Y', [[0, 'X'], [0, 'Y']], [1, 'Z']], ['control: Y times X', [[0, 'Y'], [0, 'X']], [3, 'Z']], ['control: square of Y', [[0, 'Y'], [0, 'Y']], [0, 'I']], ['control: identity factors', [[1, 'II'], [2, 'IZ']], [3, 'IZ']]], [['regression: random product 11', [[-2, 'ZXI'], [3, 'IZX']], [0, 'ZYX']], ['regression: random product 22', [[0, 'XYYI'], [1, 'ZZZX']], [2, 'YXXX']], ['repair check: random product 1', [[-2, 'ZZI'], [2, 'ZXI']], [1, 'IYI']], ['control: anticommuting pair twice', [[0, 'XY'], [0, 'YX']], [0, 'ZZ']], ['control: length mismatch', [[0, 'X'], [0, 'XY']], 'length-mismatch'], ['control: phases wrap', [[3, 'XX'], [3, 'ZZ']], [0, 'YY']], ['control: random product 0', [[0, 'YY'], [2, 'ZY']], [3, 'XI']]], [['regression: random product 48', [[-2, 'ZIXI'], [1, 'ZIZX']], [2, 'IIYX']], ['regression: X times Z', [[0, 'X'], [0, 'Z']], [3, 'Y']], ['repair check: random product 13', [[-1, 'Z'], [3, 'X']], [3, 'Y']], ['control: random product 2', [[0, 'Y'], [1, 'X']], [0, 'Z']], ['control: random product 3', [[1, 'Y'], [0, 'Z']], [2, 'X']], ['control: random product 5', [[0, 'YIXX'], [2, 'ZIYY']], [1, 'XIZZ']], ['control: random product 6', [[0, 'Z'], [0, 'Z']], [0, 'I']]], [['regression: random product 10', [[1, 'XIZX'], [0, 'IYIZ']], [0, 'XYZY']], ['regression: random product 11', [[-2, 'ZXI'], [3, 'IZX']], [0, 'ZYX']], ['repair check: random product 15', [[0, 'YYZI'], [0, 'XYXZ']], [0, 'ZIYZ']], ['control: random product 7', [[3, 'Z'], [2, 'Y']], [0, 'X']], ['control: random product 9', [[0, 'I'], [3, 'I']], [3, 'I']], ['control: random product 12', [[-2, 'ZXIX'], [1, 'ZYXX']], [0, 'IZXI']], ['control: random product 16', [[-1, 'YZI'], [2, 'ZIX']], [2, 'XZX']]], [['regression: random product 38', [[0, 'IIIX'], [1, 'YXYZ']], [0, 'YXYY']], ['regression: random product 48', [[-2, 'ZIXI'], [1, 'ZIZX']], [2, 'IIYX']], ['repair check: random product 37', [[-2, 'IIZ'], [2, 'XZX']], [1, 'XZY']], ['control: random product 17', [[3, 'X'], [0, 'X']], [3, 'I']], ['control: random product 18', [[1, 'XX'], [1, 'YY']], [0, 'ZZ']], ['control: random product 19', [[2, 'I'], [2, 'Y']], [0, 'Y']], ['control: random product 20', [[2, 'III'], [1, 'ZZZ']], [3, 'ZZZ']]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: X times Z | [1, 'Y'] | [3, 'Y'] | Failed |
| regression: random product 4 | [3, 'YYX'] | [1, 'YYX'] | Failed |
| repair check: Z times X | [1, 'Y'] | [1, 'Y'] | Passed |
| control: X times Y | [1, 'Z'] | [1, 'Z'] | Passed |
| control: Y times X | [3, 'Z'] | [3, 'Z'] | Passed |
| control: square of Y | [0, 'I'] | [0, 'I'] | Passed |
| control: identity factors | [3, 'IZ'] | [3, 'IZ'] | Passed |
SHA-256 / e13a5d1e9f86a289da9a72ce42a77a7e592e30c9e57f9e6ab66ea4a6b9957757
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
(k1, s1), (k2, s2) = x
if len(s1) != len(s2):
return 'length-mismatch'
table = {('X', 'Y'): (1, 'Z'), ('Y', 'Z'): (1, 'X'), ('Z', 'X'): (3, 'Y'),
('Y', 'X'): (3, 'Z'), ('Z', 'Y'): (3, 'X'), ('X', 'Z'): (3, 'Y')}
k = k1 + k2
out = []
for a, b in zip(s1, s2):
if a == 'I':
out.append(b)
elif b == 'I':
out.append(a)
elif a == b:
out.append('I')
else:
dk, c = table[(a, b)]
k += dk
out.append(c)
return [k % 4, ''.join(out)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression: X times Z', [[0, 'X'], [0, 'Z']], [3, 'Y']], ['regression: random product 4', [[0, 'YXY'], [1, 'IZZ']], [1, 'YYX']], ['repair check: Z times X', [[0, 'Z'], [0, 'X']], [1, 'Y']], ['control: X times Y', [[0, 'X'], [0, 'Y']], [1, 'Z']], ['control: Y times X', [[0, 'Y'], [0, 'X']], [3, 'Z']], ['control: square of Y', [[0, 'Y'], [0, 'Y']], [0, 'I']], ['control: identity factors', [[1, 'II'], [2, 'IZ']], [3, 'IZ']]], [['regression: random product 11', [[-2, 'ZXI'], [3, 'IZX']], [0, 'ZYX']], ['regression: random product 22', [[0, 'XYYI'], [1, 'ZZZX']], [2, 'YXXX']], ['repair check: random product 1', [[-2, 'ZZI'], [2, 'ZXI']], [1, 'IYI']], ['control: anticommuting pair twice', [[0, 'XY'], [0, 'YX']], [0, 'ZZ']], ['control: length mismatch', [[0, 'X'], [0, 'XY']], 'length-mismatch'], ['control: phases wrap', [[3, 'XX'], [3, 'ZZ']], [0, 'YY']], ['control: random product 0', [[0, 'YY'], [2, 'ZY']], [3, 'XI']]], [['regression: random product 48', [[-2, 'ZIXI'], [1, 'ZIZX']], [2, 'IIYX']], ['regression: X times Z', [[0, 'X'], [0, 'Z']], [3, 'Y']], ['repair check: random product 13', [[-1, 'Z'], [3, 'X']], [3, 'Y']], ['control: random product 2', [[0, 'Y'], [1, 'X']], [0, 'Z']], ['control: random product 3', [[1, 'Y'], [0, 'Z']], [2, 'X']], ['control: random product 5', [[0, 'YIXX'], [2, 'ZIYY']], [1, 'XIZZ']], ['control: random product 6', [[0, 'Z'], [0, 'Z']], [0, 'I']]], [['regression: random product 10', [[1, 'XIZX'], [0, 'IYIZ']], [0, 'XYZY']], ['regression: random product 11', [[-2, 'ZXI'], [3, 'IZX']], [0, 'ZYX']], ['repair check: random product 15', [[0, 'YYZI'], [0, 'XYXZ']], [0, 'ZIYZ']], ['control: random product 7', [[3, 'Z'], [2, 'Y']], [0, 'X']], ['control: random product 9', [[0, 'I'], [3, 'I']], [3, 'I']], ['control: random product 12', [[-2, 'ZXIX'], [1, 'ZYXX']], [0, 'IZXI']], ['control: random product 16', [[-1, 'YZI'], [2, 'ZIX']], [2, 'XZX']]], [['regression: random product 38', [[0, 'IIIX'], [1, 'YXYZ']], [0, 'YXYY']], ['regression: random product 48', [[-2, 'ZIXI'], [1, 'ZIZX']], [2, 'IIYX']], ['repair check: random product 37', [[-2, 'IIZ'], [2, 'XZX']], [1, 'XZY']], ['control: random product 17', [[3, 'X'], [0, 'X']], [3, 'I']], ['control: random product 18', [[1, 'XX'], [1, 'YY']], [0, 'ZZ']], ['control: random product 19', [[2, 'I'], [2, 'Y']], [0, 'Y']], ['control: random product 20', [[2, 'III'], [1, 'ZZZ']], [3, 'ZZZ']]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: X times Z | [3, 'Y'] | [3, 'Y'] | Passed |
| regression: random product 4 | [1, 'YYX'] | [1, 'YYX'] | Passed |
| repair check: Z times X | [3, 'Y'] | [1, 'Y'] | Failed |
| control: X times Y | [1, 'Z'] | [1, 'Z'] | Passed |
| control: Y times X | [3, 'Z'] | [3, 'Z'] | Passed |
| control: square of Y | [0, 'I'] | [0, 'I'] | Passed |
| control: identity factors | [3, 'IZ'] | [3, 'IZ'] | Passed |
SHA-256 / 34e23a33535ab63c20a6ea71eabf5d86c31f30180d87e401e4f108103cdbc30c
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
(k1, s1), (k2, s2) = x
if len(s1) != len(s2):
return 'length-mismatch'
table = {('X', 'Y'): (1, 'Z'), ('Y', 'Z'): (1, 'X'), ('Z', 'X'): (1, 'Y'),
('Y', 'X'): (3, 'Z'), ('Z', 'Y'): (3, 'X'), ('X', 'Z'): (3, 'Y')}
k = k1 + k2
out = []
for a, b in zip(s1, s2):
if a == 'I':
out.append(b)
elif b == 'I':
out.append(a)
elif a == b:
out.append('I')
else:
dk, c = table[(a, b)]
k += dk
out.append(c)
return [k % 4, ''.join(out)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression: X times Z', [[0, 'X'], [0, 'Z']], [3, 'Y']], ['regression: random product 4', [[0, 'YXY'], [1, 'IZZ']], [1, 'YYX']], ['repair check: Z times X', [[0, 'Z'], [0, 'X']], [1, 'Y']], ['control: X times Y', [[0, 'X'], [0, 'Y']], [1, 'Z']], ['control: Y times X', [[0, 'Y'], [0, 'X']], [3, 'Z']], ['control: square of Y', [[0, 'Y'], [0, 'Y']], [0, 'I']], ['control: identity factors', [[1, 'II'], [2, 'IZ']], [3, 'IZ']]], [['regression: random product 11', [[-2, 'ZXI'], [3, 'IZX']], [0, 'ZYX']], ['regression: random product 22', [[0, 'XYYI'], [1, 'ZZZX']], [2, 'YXXX']], ['repair check: random product 1', [[-2, 'ZZI'], [2, 'ZXI']], [1, 'IYI']], ['control: anticommuting pair twice', [[0, 'XY'], [0, 'YX']], [0, 'ZZ']], ['control: length mismatch', [[0, 'X'], [0, 'XY']], 'length-mismatch'], ['control: phases wrap', [[3, 'XX'], [3, 'ZZ']], [0, 'YY']], ['control: random product 0', [[0, 'YY'], [2, 'ZY']], [3, 'XI']]], [['regression: random product 48', [[-2, 'ZIXI'], [1, 'ZIZX']], [2, 'IIYX']], ['regression: X times Z', [[0, 'X'], [0, 'Z']], [3, 'Y']], ['repair check: random product 13', [[-1, 'Z'], [3, 'X']], [3, 'Y']], ['control: random product 2', [[0, 'Y'], [1, 'X']], [0, 'Z']], ['control: random product 3', [[1, 'Y'], [0, 'Z']], [2, 'X']], ['control: random product 5', [[0, 'YIXX'], [2, 'ZIYY']], [1, 'XIZZ']], ['control: random product 6', [[0, 'Z'], [0, 'Z']], [0, 'I']]], [['regression: random product 10', [[1, 'XIZX'], [0, 'IYIZ']], [0, 'XYZY']], ['regression: random product 11', [[-2, 'ZXI'], [3, 'IZX']], [0, 'ZYX']], ['repair check: random product 15', [[0, 'YYZI'], [0, 'XYXZ']], [0, 'ZIYZ']], ['control: random product 7', [[3, 'Z'], [2, 'Y']], [0, 'X']], ['control: random product 9', [[0, 'I'], [3, 'I']], [3, 'I']], ['control: random product 12', [[-2, 'ZXIX'], [1, 'ZYXX']], [0, 'IZXI']], ['control: random product 16', [[-1, 'YZI'], [2, 'ZIX']], [2, 'XZX']]], [['regression: random product 38', [[0, 'IIIX'], [1, 'YXYZ']], [0, 'YXYY']], ['regression: random product 48', [[-2, 'ZIXI'], [1, 'ZIZX']], [2, 'IIYX']], ['repair check: random product 37', [[-2, 'IIZ'], [2, 'XZX']], [1, 'XZY']], ['control: random product 17', [[3, 'X'], [0, 'X']], [3, 'I']], ['control: random product 18', [[1, 'XX'], [1, 'YY']], [0, 'ZZ']], ['control: random product 19', [[2, 'I'], [2, 'Y']], [0, 'Y']], ['control: random product 20', [[2, 'III'], [1, 'ZZZ']], [3, 'ZZZ']]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: X times Z | [3, 'Y'] | [3, 'Y'] | Passed |
| regression: random product 4 | [1, 'YYX'] | [1, 'YYX'] | Passed |
| repair check: Z times X | [1, 'Y'] | [1, 'Y'] | Passed |
| control: X times Y | [1, 'Z'] | [1, 'Z'] | Passed |
| control: Y times X | [3, 'Z'] | [3, 'Z'] | Passed |
| control: square of Y | [0, 'I'] | [0, 'I'] | Passed |
| control: identity factors | [3, 'IZ'] | [3, 'IZ'] | Passed |
SHA-256 / 8c8e26d6ee99dd1458bc173699d1d686ce29353bc51c66e0e073e9bd7b8acb98
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:51:31.559158+00:00.
Case digest / ddd8b4e6609b1cec2a98909115c365ed4e967e1c0cd1be756ce1fc1439676c11