{"abstract":"Amplitudes of order 1e-7 (numerical noise) are blown up into a unit Bloch vector instead of \"zero-state\".","category":"Quantum circuit simulation","checks":6,"contract":"Input [[ar, ai], [br, bi]] for a|0> + b|1> (possibly unnormalized). Return the Bloch vector [2Re(conj(a) b), 2Im(conj(a) b), |a|^2 - |b|^2] divided by |a|^2 + |b|^2, rounded to 6 decimals, or \"zero-state\" when the squared norm is below 1e-12.","contract_signature":"x","evaluation_group":"w2-quantum_circuit_simulation-bloch-coordinates","failed_approach":"The attempted repair tests each amplitude magnitude against 1e-12, which is the square root of the intended scale.","family":"w2-quantum_circuit_simulation-bloch-coordinates-zero-state-tolerance","id":"FA-91091","implementations":{"attempt":{"sha256":"0aa3bbef493b11f2ceb1a40470e11b595e66bd579dcf0141182452ada572825e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    (ar, ai), (br, bi) = x\n    a, b = complex(ar, ai), complex(br, bi)\n    nrm = abs(a) ** 2 + abs(b) ** 2\n    if abs(a) < 1e-12 and abs(b) < 1e-12:\n        return 'zero-state'\n    cross = a.conjugate() * b\n    bx = 2 * cross.real / nrm\n    by = 2 * cross.imag / nrm\n    bz = (abs(a) ** 2 - abs(b) ** 2) / nrm\n    return [round(v, 6) + 0.0 for v in (bx, by, bz)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: numerical noise state', [[1e-07, 0], [0, 1e-07]], 'zero-state'], ['regression: noise on one amplitude', [[3e-08, 0], [0, 0]], 'zero-state'], ['control: ket zero', [[1, 0], [0, 0]], [0.0, 0.0, 1.0]], ['control: ket one', [[0, 0], [1, 0]], [0.0, 0.0, -1.0]], ['control: plus', [[0.707107, 0], [0.707107, 0]], [1.0, 0.0, 0.0]], ['control: plus i', [[0.707107, 0], [0, 0.707107]], [0.0, 1.0, 0.0]]], [['regression: noise on one amplitude', [[3e-08, 0], [0, 0]], 'zero-state'], ['regression: numerical noise state', [[1e-07, 0], [0, 1e-07]], 'zero-state'], ['control: minus i', [[0.707107, 0], [0, -0.707107]], [0.0, -1.0, 0.0]], ['control: zero vector', [[0, 0], [0, 0]], 'zero-state'], ['control: unnormalized', [[3, 0], [0, 4]], [0.0, 0.96, -0.28]], ['control: global phase i', [[0, 1], [0, 0]], [0.0, 0.0, 1.0]]], [['regression: numerical noise state', [[1e-07, 0], [0, 1e-07]], 'zero-state'], ['regression: noise on one amplitude', [[3e-08, 0], [0, 0]], 'zero-state'], ['control: random qubit 0', [[-1.176, -0.41], [1.26, -1.053]], [-0.494424, 0.826337, -0.26965]], ['control: random qubit 1', [[1.052, -0.843], [-0.499, 1.97]], [-0.735014, 0.555478, -0.388843]], ['control: random qubit 2', [[0.057, -1.052], [0.48, 1.205]], [-0.888347, 0.410865, -0.205012]], ['control: random qubit 3', [[1.769, -1.743], [0.441, -0.443]], [0.47339, -0.004576, 0.880841]]], [['regression: noise on one amplitude', [[3e-08, 0], [0, 0]], 'zero-state'], ['regression: numerical noise state', [[1e-07, 0], [0, 1e-07]], 'zero-state'], ['control: random qubit 4', [[-1.063, 1.137], [0.11, -1.819]], [-0.760893, 0.629754, -0.156369]], ['control: random qubit 5', [[1.781, 0.313], [-0.534, -1.473]], [-0.493327, -0.858114, 0.142371]], ['control: random qubit 6', [[1.624, -0.932], [-1.233, 0.708]], [-0.963265, 0.00023, 0.268554]], ['control: random qubit 7', [[-1.454, -0.834], [1.157, -0.946]], [-0.354262, 0.928143, 0.114234]]], [['regression: numerical noise state', [[1e-07, 0], [0, 1e-07]], 'zero-state'], ['regression: noise on one amplitude', [[3e-08, 0], [0, 0]], 'zero-state'], ['control: random qubit 8', [[-1.932, 0.067], [0.651, -1.416]], [-0.438732, 0.873211, 0.212174]], ['control: random qubit 9', [[0.467, -1.484], [-1.959, -0.631]], [0.006475, -0.962062, -0.272753]], ['control: random qubit 10', [[-1.198, -0.992], [1.144, -1.926]], [0.145232, 0.925635, -0.349439]], ['control: random qubit 11', [[0.295, -0.421], [-0.884, -0.915]], [0.13217, -0.682004, -0.719306]]]]\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":"9ba9b5b5d7816fcf6191f174406900e910357cbdebd2f9c28c1fe2fd22b51788","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    (ar, ai), (br, bi) = x\n    a, b = complex(ar, ai), complex(br, bi)\n    nrm = abs(a) ** 2 + abs(b) ** 2\n    if nrm == 0:\n        return 'zero-state'\n    cross = a.conjugate() * b\n    bx = 2 * cross.real / nrm\n    by = 2 * cross.imag / nrm\n    bz = (abs(a) ** 2 - abs(b) ** 2) / nrm\n    return [round(v, 6) + 0.0 for v in (bx, by, bz)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: numerical noise state', [[1e-07, 0], [0, 1e-07]], 'zero-state'], ['regression: noise on one amplitude', [[3e-08, 0], [0, 0]], 'zero-state'], ['control: ket zero', [[1, 0], [0, 0]], [0.0, 0.0, 1.0]], ['control: ket one', [[0, 0], [1, 0]], [0.0, 0.0, -1.0]], ['control: plus', [[0.707107, 0], [0.707107, 0]], [1.0, 0.0, 0.0]], ['control: plus i', [[0.707107, 0], [0, 0.707107]], [0.0, 1.0, 0.0]]], [['regression: noise on one amplitude', [[3e-08, 0], [0, 0]], 'zero-state'], ['regression: numerical noise state', [[1e-07, 0], [0, 1e-07]], 'zero-state'], ['control: minus i', [[0.707107, 0], [0, -0.707107]], [0.0, -1.0, 0.0]], ['control: zero vector', [[0, 0], [0, 0]], 'zero-state'], ['control: unnormalized', [[3, 0], [0, 4]], [0.0, 0.96, -0.28]], ['control: global phase i', [[0, 1], [0, 0]], [0.0, 0.0, 1.0]]], [['regression: numerical noise state', [[1e-07, 0], [0, 1e-07]], 'zero-state'], ['regression: noise on one amplitude', [[3e-08, 0], [0, 0]], 'zero-state'], ['control: random qubit 0', [[-1.176, -0.41], [1.26, -1.053]], [-0.494424, 0.826337, -0.26965]], ['control: random qubit 1', [[1.052, -0.843], [-0.499, 1.97]], [-0.735014, 0.555478, -0.388843]], ['control: random qubit 2', [[0.057, -1.052], [0.48, 1.205]], [-0.888347, 0.410865, -0.205012]], ['control: random qubit 3', [[1.769, -1.743], [0.441, -0.443]], [0.47339, -0.004576, 0.880841]]], [['regression: noise on one amplitude', [[3e-08, 0], [0, 0]], 'zero-state'], ['regression: numerical noise state', [[1e-07, 0], [0, 1e-07]], 'zero-state'], ['control: random qubit 4', [[-1.063, 1.137], [0.11, -1.819]], [-0.760893, 0.629754, -0.156369]], ['control: random qubit 5', [[1.781, 0.313], [-0.534, -1.473]], [-0.493327, -0.858114, 0.142371]], ['control: random qubit 6', [[1.624, -0.932], [-1.233, 0.708]], [-0.963265, 0.00023, 0.268554]], ['control: random qubit 7', [[-1.454, -0.834], [1.157, -0.946]], [-0.354262, 0.928143, 0.114234]]], [['regression: numerical noise state', [[1e-07, 0], [0, 1e-07]], 'zero-state'], ['regression: noise on one amplitude', [[3e-08, 0], [0, 0]], 'zero-state'], ['control: random qubit 8', [[-1.932, 0.067], [0.651, -1.416]], [-0.438732, 0.873211, 0.212174]], ['control: random qubit 9', [[0.467, -1.484], [-1.959, -0.631]], [0.006475, -0.962062, -0.272753]], ['control: random qubit 10', [[-1.198, -0.992], [1.144, -1.926]], [0.145232, 0.925635, -0.349439]], ['control: random qubit 11', [[0.295, -0.421], [-0.884, -0.915]], [0.13217, -0.682004, -0.719306]]]]\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-bloch-coordinates-zero-state-tolerance","generated_at":"2026-09-29T14:51:32.848214+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Bloch coordinates feed visualizers and single-qubit tomography checks; sign or scale slips put states on the wrong axis.","root_cause":"The degenerate-state guard compares the squared norm with == 0 instead of the 1e-12 tolerance.","sha256":"cc1816f5f65ff5a073c82572780fd3964ebdbca87695d777b0318c7c1d106eb5","title":"Bloch vector only rejects an exactly zero state · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":42.947,"exit_code":1,"observations":[{"actual":[0.0,1.0,0.0],"check":"regression: numerical noise state","expected":"zero-state","passed":false},{"actual":[0.0,0.0,1.0],"check":"regression: noise on one amplitude","expected":"zero-state","passed":false},{"actual":[0.0,0.0,1.0],"check":"control: ket zero","expected":[0.0,0.0,1.0],"passed":true},{"actual":[0.0,0.0,-1.0],"check":"control: ket one","expected":[0.0,0.0,-1.0],"passed":true},{"actual":[1.0,0.0,0.0],"check":"control: plus","expected":[1.0,0.0,0.0],"passed":true},{"actual":[0.0,1.0,0.0],"check":"control: plus i","expected":[0.0,1.0,0.0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: numerical noise state\", \"actual\": [0.0, 1.0, 0.0], \"expected\": \"zero-state\", \"passed\": false}, {\"check\": \"regression: noise on one amplitude\", \"actual\": [0.0, 0.0, 1.0], \"expected\": \"zero-state\", \"passed\": false}, {\"check\": \"control: ket zero\", \"actual\": [0.0, 0.0, 1.0], \"expected\": [0.0, 0.0, 1.0], \"passed\": true}, {\"check\": \"control: ket one\", \"actual\": [0.0, 0.0, -1.0], \"expected\": [0.0, 0.0, -1.0], \"passed\": true}, {\"check\": \"control: plus\", \"actual\": [1.0, 0.0, 0.0], \"expected\": [1.0, 0.0, 0.0], \"passed\": true}, {\"check\": \"control: plus i\", \"actual\": [0.0, 1.0, 0.0], \"expected\": [0.0, 1.0, 0.0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.618,"exit_code":1,"observations":[{"actual":[0.0,1.0,0.0],"check":"regression: numerical noise state","expected":"zero-state","passed":false},{"actual":[0.0,0.0,1.0],"check":"regression: noise on one amplitude","expected":"zero-state","passed":false},{"actual":[0.0,0.0,1.0],"check":"control: ket zero","expected":[0.0,0.0,1.0],"passed":true},{"actual":[0.0,0.0,-1.0],"check":"control: ket one","expected":[0.0,0.0,-1.0],"passed":true},{"actual":[1.0,0.0,0.0],"check":"control: plus","expected":[1.0,0.0,0.0],"passed":true},{"actual":[0.0,1.0,0.0],"check":"control: plus i","expected":[0.0,1.0,0.0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: numerical noise state\", \"actual\": [0.0, 1.0, 0.0], \"expected\": \"zero-state\", \"passed\": false}, {\"check\": \"regression: noise on one amplitude\", \"actual\": [0.0, 0.0, 1.0], \"expected\": \"zero-state\", \"passed\": false}, {\"check\": \"control: ket zero\", \"actual\": [0.0, 0.0, 1.0], \"expected\": [0.0, 0.0, 1.0], \"passed\": true}, {\"check\": \"control: ket one\", \"actual\": [0.0, 0.0, -1.0], \"expected\": [0.0, 0.0, -1.0], \"passed\": true}, {\"check\": \"control: plus\", \"actual\": [1.0, 0.0, 0.0], \"expected\": [1.0, 0.0, 0.0], \"passed\": true}, {\"check\": \"control: plus i\", \"actual\": [0.0, 1.0, 0.0], \"expected\": [0.0, 1.0, 0.0], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}