{"abstract":"The unnormalized input 3|0> + 4|1> yields a vector of length 5 instead of 1.","category":"Quantum circuit simulation","checks":7,"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 squares the sum of magnitudes, (|a| + |b|)^2, which over-normalizes mixed superpositions.","family":"w2-quantum_circuit_simulation-bloch-coordinates-normalization-measure","id":"FA-91086","implementations":{"attempt":{"sha256":"30142ba4c3c76dda9936b591c2a50f36f9e2b69bdec3c237503bb8cf98dcb89f","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) + abs(b)) ** 2\n    if nrm < 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: unnormalized', [[3, 0], [0, 4]], [0.0, 0.96, -0.28]], ['regression: random qubit 0', [[-1.176, -0.41], [1.26, -1.053]], [-0.494424, 0.826337, -0.26965]], ['repair check: plus', [[0.707107, 0], [0.707107, 0]], [1.0, 0.0, 0.0]], ['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: zero vector', [[0, 0], [0, 0]], 'zero-state'], ['control: global phase i', [[0, 1], [0, 0]], [0.0, 0.0, 1.0]]], [['regression: random qubit 2', [[0.057, -1.052], [0.48, 1.205]], [-0.888347, 0.410865, -0.205012]], ['regression: random qubit 3', [[1.769, -1.743], [0.441, -0.443]], [0.47339, -0.004576, 0.880841]], ['repair check: minus i', [[0.707107, 0], [0, -0.707107]], [0.0, -1.0, 0.0]], ['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: zero vector', [[0, 0], [0, 0]], 'zero-state'], ['control: global phase i', [[0, 1], [0, 0]], [0.0, 0.0, 1.0]]], [['regression: random qubit 5', [[1.781, 0.313], [-0.534, -1.473]], [-0.493327, -0.858114, 0.142371]], ['regression: random qubit 6', [[1.624, -0.932], [-1.233, 0.708]], [-0.963265, 0.00023, 0.268554]], ['regression: random qubit 0', [[-1.176, -0.41], [1.26, -1.053]], [-0.494424, 0.826337, -0.26965]], ['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: zero vector', [[0, 0], [0, 0]], 'zero-state'], ['control: global phase i', [[0, 1], [0, 0]], [0.0, 0.0, 1.0]]], [['regression: random qubit 8', [[-1.932, 0.067], [0.651, -1.416]], [-0.438732, 0.873211, 0.212174]], ['regression: random qubit 9', [[0.467, -1.484], [-1.959, -0.631]], [0.006475, -0.962062, -0.272753]], ['regression: random qubit 2', [[0.057, -1.052], [0.48, 1.205]], [-0.888347, 0.410865, -0.205012]], ['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: zero vector', [[0, 0], [0, 0]], 'zero-state'], ['control: global phase i', [[0, 1], [0, 0]], [0.0, 0.0, 1.0]]], [['regression: random qubit 11', [[0.295, -0.421], [-0.884, -0.915]], [0.13217, -0.682004, -0.719306]], ['regression: random qubit 12', [[0.596, 0.022], [-1.906, -0.045]], [-0.569828, 0.007574, -0.821729]], ['regression: random qubit 4', [[-1.063, 1.137], [0.11, -1.819]], [-0.760893, 0.629754, -0.156369]], ['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: zero vector', [[0, 0], [0, 0]], 'zero-state'], ['control: global phase i', [[0, 1], [0, 0]], [0.0, 0.0, 1.0]]]]\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":"abe55b69b451cc560528cae7ae3139d6f8d5a277cf5c3b44411f60e092dca8bf","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 = math.hypot(abs(a), abs(b))\n    if nrm < 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: unnormalized', [[3, 0], [0, 4]], [0.0, 0.96, -0.28]], ['regression: random qubit 0', [[-1.176, -0.41], [1.26, -1.053]], [-0.494424, 0.826337, -0.26965]], ['repair check: plus', [[0.707107, 0], [0.707107, 0]], [1.0, 0.0, 0.0]], ['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: zero vector', [[0, 0], [0, 0]], 'zero-state'], ['control: global phase i', [[0, 1], [0, 0]], [0.0, 0.0, 1.0]]], [['regression: random qubit 2', [[0.057, -1.052], [0.48, 1.205]], [-0.888347, 0.410865, -0.205012]], ['regression: random qubit 3', [[1.769, -1.743], [0.441, -0.443]], [0.47339, -0.004576, 0.880841]], ['repair check: minus i', [[0.707107, 0], [0, -0.707107]], [0.0, -1.0, 0.0]], ['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: zero vector', [[0, 0], [0, 0]], 'zero-state'], ['control: global phase i', [[0, 1], [0, 0]], [0.0, 0.0, 1.0]]], [['regression: random qubit 5', [[1.781, 0.313], [-0.534, -1.473]], [-0.493327, -0.858114, 0.142371]], ['regression: random qubit 6', [[1.624, -0.932], [-1.233, 0.708]], [-0.963265, 0.00023, 0.268554]], ['regression: random qubit 0', [[-1.176, -0.41], [1.26, -1.053]], [-0.494424, 0.826337, -0.26965]], ['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: zero vector', [[0, 0], [0, 0]], 'zero-state'], ['control: global phase i', [[0, 1], [0, 0]], [0.0, 0.0, 1.0]]], [['regression: random qubit 8', [[-1.932, 0.067], [0.651, -1.416]], [-0.438732, 0.873211, 0.212174]], ['regression: random qubit 9', [[0.467, -1.484], [-1.959, -0.631]], [0.006475, -0.962062, -0.272753]], ['regression: random qubit 2', [[0.057, -1.052], [0.48, 1.205]], [-0.888347, 0.410865, -0.205012]], ['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: zero vector', [[0, 0], [0, 0]], 'zero-state'], ['control: global phase i', [[0, 1], [0, 0]], [0.0, 0.0, 1.0]]], [['regression: random qubit 11', [[0.295, -0.421], [-0.884, -0.915]], [0.13217, -0.682004, -0.719306]], ['regression: random qubit 12', [[0.596, 0.022], [-1.906, -0.045]], [-0.569828, 0.007574, -0.821729]], ['regression: random qubit 4', [[-1.063, 1.137], [0.11, -1.819]], [-0.760893, 0.629754, -0.156369]], ['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: zero vector', [[0, 0], [0, 0]], 'zero-state'], ['control: global phase i', [[0, 1], [0, 0]], [0.0, 0.0, 1.0]]]]\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-normalization-measure","generated_at":"2026-09-29T14:51:32.804456+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":"nrm is computed as the Euclidean norm of the amplitudes rather than its square.","sha256":"1016f6b67871d7939b38669840e00f6a75749f70609f5a45496d5b41b4394458","title":"Bloch vector normalizes by the norm instead of the squared norm · 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.355,"exit_code":1,"observations":[{"actual":[0.0,0.489796,-0.142857],"check":"regression: unnormalized","expected":[0.0,0.96,-0.28],"passed":false},{"actual":[-0.251877,0.420965,-0.137369],"check":"regression: random qubit 0","expected":[-0.494424,0.826337,-0.26965],"passed":false},{"actual":[0.5,0.0,0.0],"check":"repair check: plus","expected":[1.0,0.0,0.0],"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":"zero-state","check":"control: zero vector","expected":"zero-state","passed":true},{"actual":[0.0,0.0,1.0],"check":"control: global phase i","expected":[0.0,0.0,1.0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: unnormalized\", \"actual\": [0.0, 0.489796, -0.142857], \"expected\": [0.0, 0.96, -0.28], \"passed\": false}, {\"check\": \"regression: random qubit 0\", \"actual\": [-0.251877, 0.420965, -0.137369], \"expected\": [-0.494424, 0.826337, -0.26965], \"passed\": false}, {\"check\": \"repair check: plus\", \"actual\": [0.5, 0.0, 0.0], \"expected\": [1.0, 0.0, 0.0], \"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: zero vector\", \"actual\": \"zero-state\", \"expected\": \"zero-state\", \"passed\": true}, {\"check\": \"control: global phase i\", \"actual\": [0.0, 0.0, 1.0], \"expected\": [0.0, 0.0, 1.0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.15,"exit_code":1,"observations":[{"actual":[0.0,4.8,-1.4],"check":"regression: unnormalized","expected":[0.0,0.96,-0.28],"passed":false},{"actual":[-1.01898,1.703034,-0.555733],"check":"regression: random qubit 0","expected":[-0.494424,0.826337,-0.26965],"passed":false},{"actual":[1.0,0.0,0.0],"check":"repair check: plus","expected":[1.0,0.0,0.0],"passed":true},{"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":"zero-state","check":"control: zero vector","expected":"zero-state","passed":true},{"actual":[0.0,0.0,1.0],"check":"control: global phase i","expected":[0.0,0.0,1.0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: unnormalized\", \"actual\": [0.0, 4.8, -1.4], \"expected\": [0.0, 0.96, -0.28], \"passed\": false}, {\"check\": \"regression: random qubit 0\", \"actual\": [-1.01898, 1.703034, -0.555733], \"expected\": [-0.494424, 0.826337, -0.26965], \"passed\": false}, {\"check\": \"repair check: plus\", \"actual\": [1.0, 0.0, 0.0], \"expected\": [1.0, 0.0, 0.0], \"passed\": true}, {\"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: zero vector\", \"actual\": \"zero-state\", \"expected\": \"zero-state\", \"passed\": true}, {\"check\": \"control: global phase i\", \"actual\": [0.0, 0.0, 1.0], \"expected\": [0.0, 0.0, 1.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."}}