{"abstract":"A bare barrier after deep work on qubit 0 does not delay a following gate on qubit 2.","category":"Quantum circuit simulation","checks":7,"contract":"Input [nq, nc, ops]; ops are [name, qubits], [\"measure\", [q], [c]], [\"g\", [q], \"if\", c] (classically conditioned), [\"barrier\", qubits] (empty list = all qubits) and [\"id\", [q]]. ASAP layering: each op lands one layer after the latest of its qubits and any clbit it reads or writes, and sets those levels; barriers align the listed qubits to their maximum without adding a layer; id costs nothing. Return [depth, qubit levels].","evaluation_group":"w2-quantum_circuit_simulation-circuit-depth-layers","failed_approach":"The attempted repair expands only to qubits that already have work, leaving idle qubits unaligned.","family":"w2-quantum_circuit_simulation-circuit-depth-layers-empty-barrier-scope","id":"FA-91016","implementations":{"attempt":{"sha256":"d7a82f6e5a58fffb95d95e2a8192874493c905e9e4b0713bd9b2d9d7af5e9b68","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    nq, nc, ops = x\n    ql = [0] * nq\n    cl = [0] * nc\n    for op in ops:\n        name, qs = op[0], op[1]\n        if name == 'barrier':\n            qs = qs or [q for q in range(nq) if ql[q]]\n            top = max(ql[q] for q in qs)\n            for q in qs:\n                ql[q] = top\n            continue\n        if name == 'id':\n            continue\n        cbits = []\n        if name == 'measure':\n            cbits = op[2]\n        elif len(op) > 2 and op[2] == 'if':\n            cbits = [op[3]]\n        level = 1 + max([ql[q] for q in qs] + [cl[c] for c in cbits])\n        for q in qs:\n            ql[q] = level\n        for c in cbits:\n            cl[c] = level\n    return [max(ql + cl + [0]), ql]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: barrier aligns everything', [3, 1, [['h', [0]], ['h', [0]], ['barrier', []], ['x', [2]]]], [3, [2, 2, 3]]], ['regression: random schedule 37', [3, 2, [['rz', [2]], ['rz', [0]], ['h', [0]], ['h', [2]], ['rz', [2]], ['barrier', []], ['x', [0], 'if', 0]]], [4, [4, 3, 3]]], ['regression: random schedule 47', [4, 1, [['ccx', [1, 0, 3]], ['barrier', []], ['measure', [0], [0]], ['x', [3]], ['ccx', [1, 3, 0]], ['cx', [0, 1]], ['x', [2]], ['id', [0]]]], [4, [4, 4, 2, 3]]], ['control: partial barrier', [3, 1, [['h', [0]], ['barrier', [0, 1]], ['x', [1]], ['x', [2]]]], [2, [1, 2, 1]]], ['control: toffoli waits on all', [3, 0, [['h', [2]], ['h', [2]], ['ccx', [0, 1, 2]], ['x', [0]]]], [4, [4, 3, 3]]], ['control: cx waits on target', [2, 0, [['h', [1]], ['h', [1]], ['cx', [0, 1]]]], [3, [3, 3]]], ['control: identity is free', [1, 0, [['id', [0]], ['id', [0]], ['x', [0]]]], [1, [1]]]], [['regression: barrier aligns everything', [3, 1, [['h', [0]], ['h', [0]], ['barrier', []], ['x', [2]]]], [3, [2, 2, 3]]], ['regression: random schedule 37', [3, 2, [['rz', [2]], ['rz', [0]], ['h', [0]], ['h', [2]], ['rz', [2]], ['barrier', []], ['x', [0], 'if', 0]]], [4, [4, 3, 3]]], ['regression: random schedule 47', [4, 1, [['ccx', [1, 0, 3]], ['barrier', []], ['measure', [0], [0]], ['x', [3]], ['ccx', [1, 3, 0]], ['cx', [0, 1]], ['x', [2]], ['id', [0]]]], [4, [4, 4, 2, 3]]], ['control: conditioned gate after measure', [2, 1, [['h', [0]], ['measure', [0], [0]], ['x', [1], 'if', 0]]], [3, [2, 3]]], ['control: measure after conditioned read', [2, 1, [['h', [0]], ['h', [0]], ['h', [0]], ['x', [1], 'if', 0], ['measure', [1], [0]]]], [3, [3, 2]]], ['control: empty circuit', [2, 1, []], [0, [0, 0]]], ['control: late read then early-qubit measure', [2, 1, [['h', [1]], ['h', [1]], ['h', [1]], ['x', [1], 'if', 0], ['measure', [0], [0]]]], [5, [5, 4]]]], [['regression: barrier aligns everything', [3, 1, [['h', [0]], ['h', [0]], ['barrier', []], ['x', [2]]]], [3, [2, 2, 3]]], ['regression: random schedule 37', [3, 2, [['rz', [2]], ['rz', [0]], ['h', [0]], ['h', [2]], ['rz', [2]], ['barrier', []], ['x', [0], 'if', 0]]], [4, [4, 3, 3]]], ['regression: random schedule 47', [4, 1, [['ccx', [1, 0, 3]], ['barrier', []], ['measure', [0], [0]], ['x', [3]], ['ccx', [1, 3, 0]], ['cx', [0, 1]], ['x', [2]], ['id', [0]]]], [4, [4, 4, 2, 3]]], ['control: read then measure other clbit writer', [3, 2, [['h', [2]], ['h', [2]], ['z', [2], 'if', 1], ['measure', [0], [1]], ['x', [1], 'if', 1]]], [5, [4, 5, 3]]], ['control: random schedule 0', [1, 2, [['x', [0]], ['rz', [0]], ['measure', [0], [0]], ['x', [0]], ['barrier', [0]], ['x', [0], 'if', 1], ['x', [0], 'if', 1], ['x', [0]], ['measure', [0], [0]]]], [8, [8]]], ['control: random schedule 1', [4, 2, [['ccx', [1, 0, 3]], ['ccx', [2, 1, 3]], ['barrier', [0, 1, 2, 3]], ['cx', [1, 0]], ['id', [1]], ['cx', [1, 2]], ['cx', [0, 2]]]], [5, [5, 4, 5, 2]]], ['control: random schedule 2', [1, 1, [['h', [0]], ['rz', [0]], ['x', [0]], ['x', [0], 'if', 0], ['x', [0]], ['x', [0]], ['x', [0], 'if', 0], ['id', [0]]]], [7, [7]]]], [['regression: barrier aligns everything', [3, 1, [['h', [0]], ['h', [0]], ['barrier', []], ['x', [2]]]], [3, [2, 2, 3]]], ['regression: random schedule 37', [3, 2, [['rz', [2]], ['rz', [0]], ['h', [0]], ['h', [2]], ['rz', [2]], ['barrier', []], ['x', [0], 'if', 0]]], [4, [4, 3, 3]]], ['regression: random schedule 47', [4, 1, [['ccx', [1, 0, 3]], ['barrier', []], ['measure', [0], [0]], ['x', [3]], ['ccx', [1, 3, 0]], ['cx', [0, 1]], ['x', [2]], ['id', [0]]]], [4, [4, 4, 2, 3]]], ['control: random schedule 3', [1, 2, [['h', [0]], ['h', [0]]]], [2, [2]]], ['control: random schedule 4', [4, 1, [['measure', [3], [0]], ['ccx', [2, 1, 0]], ['ccx', [0, 2, 3]]]], [2, [2, 1, 2, 2]]], ['control: random schedule 5', [3, 2, [['ccx', [0, 1, 2]], ['ccx', [2, 1, 0]], ['barrier', [0, 1, 2]], ['x', [1]]]], [3, [2, 3, 2]]], ['control: random schedule 6', [4, 2, [['barrier', [2]], ['cx', [1, 2]], ['ccx', [2, 3, 0]]]], [2, [2, 1, 2, 2]]]], [['regression: barrier aligns everything', [3, 1, [['h', [0]], ['h', [0]], ['barrier', []], ['x', [2]]]], [3, [2, 2, 3]]], ['regression: random schedule 37', [3, 2, [['rz', [2]], ['rz', [0]], ['h', [0]], ['h', [2]], ['rz', [2]], ['barrier', []], ['x', [0], 'if', 0]]], [4, [4, 3, 3]]], ['regression: random schedule 47', [4, 1, [['ccx', [1, 0, 3]], ['barrier', []], ['measure', [0], [0]], ['x', [3]], ['ccx', [1, 3, 0]], ['cx', [0, 1]], ['x', [2]], ['id', [0]]]], [4, [4, 4, 2, 3]]], ['control: random schedule 7', [4, 2, [['x', [2], 'if', 1], ['x', [1]], ['barrier', [2]], ['cx', [0, 1]], ['h', [2]]]], [2, [2, 2, 2, 0]]], ['control: random schedule 8', [1, 1, [['x', [0], 'if', 0], ['rz', [0]], ['rz', [0]], ['h', [0]], ['rz', [0]], ['h', [0]], ['measure', [0], [0]], ['rz', [0]]]], [8, [8]]], ['control: random schedule 9', [3, 1, [['cx', [2, 1]], ['h', [1]], ['barrier', [1, 2]]]], [2, [0, 2, 2]]], ['control: random schedule 10', [4, 1, [['id', [2]]]], [0, [0, 0, 0, 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":"c189cd86011f73385b6dd998afb67a55195fd88614e104f02b35f1cd179b0299","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    nq, nc, ops = x\n    ql = [0] * nq\n    cl = [0] * nc\n    for op in ops:\n        name, qs = op[0], op[1]\n        if name == 'barrier':\n            if not qs:\n                continue\n            top = max(ql[q] for q in qs)\n            for q in qs:\n                ql[q] = top\n            continue\n        if name == 'id':\n            continue\n        cbits = []\n        if name == 'measure':\n            cbits = op[2]\n        elif len(op) > 2 and op[2] == 'if':\n            cbits = [op[3]]\n        level = 1 + max([ql[q] for q in qs] + [cl[c] for c in cbits])\n        for q in qs:\n            ql[q] = level\n        for c in cbits:\n            cl[c] = level\n    return [max(ql + cl + [0]), ql]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: barrier aligns everything', [3, 1, [['h', [0]], ['h', [0]], ['barrier', []], ['x', [2]]]], [3, [2, 2, 3]]], ['regression: random schedule 37', [3, 2, [['rz', [2]], ['rz', [0]], ['h', [0]], ['h', [2]], ['rz', [2]], ['barrier', []], ['x', [0], 'if', 0]]], [4, [4, 3, 3]]], ['regression: random schedule 47', [4, 1, [['ccx', [1, 0, 3]], ['barrier', []], ['measure', [0], [0]], ['x', [3]], ['ccx', [1, 3, 0]], ['cx', [0, 1]], ['x', [2]], ['id', [0]]]], [4, [4, 4, 2, 3]]], ['control: partial barrier', [3, 1, [['h', [0]], ['barrier', [0, 1]], ['x', [1]], ['x', [2]]]], [2, [1, 2, 1]]], ['control: toffoli waits on all', [3, 0, [['h', [2]], ['h', [2]], ['ccx', [0, 1, 2]], ['x', [0]]]], [4, [4, 3, 3]]], ['control: cx waits on target', [2, 0, [['h', [1]], ['h', [1]], ['cx', [0, 1]]]], [3, [3, 3]]], ['control: identity is free', [1, 0, [['id', [0]], ['id', [0]], ['x', [0]]]], [1, [1]]]], [['regression: barrier aligns everything', [3, 1, [['h', [0]], ['h', [0]], ['barrier', []], ['x', [2]]]], [3, [2, 2, 3]]], ['regression: random schedule 37', [3, 2, [['rz', [2]], ['rz', [0]], ['h', [0]], ['h', [2]], ['rz', [2]], ['barrier', []], ['x', [0], 'if', 0]]], [4, [4, 3, 3]]], ['regression: random schedule 47', [4, 1, [['ccx', [1, 0, 3]], ['barrier', []], ['measure', [0], [0]], ['x', [3]], ['ccx', [1, 3, 0]], ['cx', [0, 1]], ['x', [2]], ['id', [0]]]], [4, [4, 4, 2, 3]]], ['control: conditioned gate after measure', [2, 1, [['h', [0]], ['measure', [0], [0]], ['x', [1], 'if', 0]]], [3, [2, 3]]], ['control: measure after conditioned read', [2, 1, [['h', [0]], ['h', [0]], ['h', [0]], ['x', [1], 'if', 0], ['measure', [1], [0]]]], [3, [3, 2]]], ['control: empty circuit', [2, 1, []], [0, [0, 0]]], ['control: late read then early-qubit measure', [2, 1, [['h', [1]], ['h', [1]], ['h', [1]], ['x', [1], 'if', 0], ['measure', [0], [0]]]], [5, [5, 4]]]], [['regression: barrier aligns everything', [3, 1, [['h', [0]], ['h', [0]], ['barrier', []], ['x', [2]]]], [3, [2, 2, 3]]], ['regression: random schedule 37', [3, 2, [['rz', [2]], ['rz', [0]], ['h', [0]], ['h', [2]], ['rz', [2]], ['barrier', []], ['x', [0], 'if', 0]]], [4, [4, 3, 3]]], ['regression: random schedule 47', [4, 1, [['ccx', [1, 0, 3]], ['barrier', []], ['measure', [0], [0]], ['x', [3]], ['ccx', [1, 3, 0]], ['cx', [0, 1]], ['x', [2]], ['id', [0]]]], [4, [4, 4, 2, 3]]], ['control: read then measure other clbit writer', [3, 2, [['h', [2]], ['h', [2]], ['z', [2], 'if', 1], ['measure', [0], [1]], ['x', [1], 'if', 1]]], [5, [4, 5, 3]]], ['control: random schedule 0', [1, 2, [['x', [0]], ['rz', [0]], ['measure', [0], [0]], ['x', [0]], ['barrier', [0]], ['x', [0], 'if', 1], ['x', [0], 'if', 1], ['x', [0]], ['measure', [0], [0]]]], [8, [8]]], ['control: random schedule 1', [4, 2, [['ccx', [1, 0, 3]], ['ccx', [2, 1, 3]], ['barrier', [0, 1, 2, 3]], ['cx', [1, 0]], ['id', [1]], ['cx', [1, 2]], ['cx', [0, 2]]]], [5, [5, 4, 5, 2]]], ['control: random schedule 2', [1, 1, [['h', [0]], ['rz', [0]], ['x', [0]], ['x', [0], 'if', 0], ['x', [0]], ['x', [0]], ['x', [0], 'if', 0], ['id', [0]]]], [7, [7]]]], [['regression: barrier aligns everything', [3, 1, [['h', [0]], ['h', [0]], ['barrier', []], ['x', [2]]]], [3, [2, 2, 3]]], ['regression: random schedule 37', [3, 2, [['rz', [2]], ['rz', [0]], ['h', [0]], ['h', [2]], ['rz', [2]], ['barrier', []], ['x', [0], 'if', 0]]], [4, [4, 3, 3]]], ['regression: random schedule 47', [4, 1, [['ccx', [1, 0, 3]], ['barrier', []], ['measure', [0], [0]], ['x', [3]], ['ccx', [1, 3, 0]], ['cx', [0, 1]], ['x', [2]], ['id', [0]]]], [4, [4, 4, 2, 3]]], ['control: random schedule 3', [1, 2, [['h', [0]], ['h', [0]]]], [2, [2]]], ['control: random schedule 4', [4, 1, [['measure', [3], [0]], ['ccx', [2, 1, 0]], ['ccx', [0, 2, 3]]]], [2, [2, 1, 2, 2]]], ['control: random schedule 5', [3, 2, [['ccx', [0, 1, 2]], ['ccx', [2, 1, 0]], ['barrier', [0, 1, 2]], ['x', [1]]]], [3, [2, 3, 2]]], ['control: random schedule 6', [4, 2, [['barrier', [2]], ['cx', [1, 2]], ['ccx', [2, 3, 0]]]], [2, [2, 1, 2, 2]]]], [['regression: barrier aligns everything', [3, 1, [['h', [0]], ['h', [0]], ['barrier', []], ['x', [2]]]], [3, [2, 2, 3]]], ['regression: random schedule 37', [3, 2, [['rz', [2]], ['rz', [0]], ['h', [0]], ['h', [2]], ['rz', [2]], ['barrier', []], ['x', [0], 'if', 0]]], [4, [4, 3, 3]]], ['regression: random schedule 47', [4, 1, [['ccx', [1, 0, 3]], ['barrier', []], ['measure', [0], [0]], ['x', [3]], ['ccx', [1, 3, 0]], ['cx', [0, 1]], ['x', [2]], ['id', [0]]]], [4, [4, 4, 2, 3]]], ['control: random schedule 7', [4, 2, [['x', [2], 'if', 1], ['x', [1]], ['barrier', [2]], ['cx', [0, 1]], ['h', [2]]]], [2, [2, 2, 2, 0]]], ['control: random schedule 8', [1, 1, [['x', [0], 'if', 0], ['rz', [0]], ['rz', [0]], ['h', [0]], ['rz', [0]], ['h', [0]], ['measure', [0], [0]], ['rz', [0]]]], [8, [8]]], ['control: random schedule 9', [3, 1, [['cx', [2, 1]], ['h', [1]], ['barrier', [1, 2]]]], [2, [0, 2, 2]]], ['control: random schedule 10', [4, 1, [['id', [2]]]], [0, [0, 0, 0, 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"},"fixed":{"sha256":"b5abadab18d3a46d1ea240a86a5b0dbb26c878a4bf8120850971cc1f4bf59795","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    nq, nc, ops = x\n    ql = [0] * nq\n    cl = [0] * nc\n    for op in ops:\n        name, qs = op[0], op[1]\n        if name == 'barrier':\n            qs = qs or list(range(nq))\n            top = max(ql[q] for q in qs)\n            for q in qs:\n                ql[q] = top\n            continue\n        if name == 'id':\n            continue\n        cbits = []\n        if name == 'measure':\n            cbits = op[2]\n        elif len(op) > 2 and op[2] == 'if':\n            cbits = [op[3]]\n        level = 1 + max([ql[q] for q in qs] + [cl[c] for c in cbits])\n        for q in qs:\n            ql[q] = level\n        for c in cbits:\n            cl[c] = level\n    return [max(ql + cl + [0]), ql]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: barrier aligns everything', [3, 1, [['h', [0]], ['h', [0]], ['barrier', []], ['x', [2]]]], [3, [2, 2, 3]]], ['regression: random schedule 37', [3, 2, [['rz', [2]], ['rz', [0]], ['h', [0]], ['h', [2]], ['rz', [2]], ['barrier', []], ['x', [0], 'if', 0]]], [4, [4, 3, 3]]], ['regression: random schedule 47', [4, 1, [['ccx', [1, 0, 3]], ['barrier', []], ['measure', [0], [0]], ['x', [3]], ['ccx', [1, 3, 0]], ['cx', [0, 1]], ['x', [2]], ['id', [0]]]], [4, [4, 4, 2, 3]]], ['control: partial barrier', [3, 1, [['h', [0]], ['barrier', [0, 1]], ['x', [1]], ['x', [2]]]], [2, [1, 2, 1]]], ['control: toffoli waits on all', [3, 0, [['h', [2]], ['h', [2]], ['ccx', [0, 1, 2]], ['x', [0]]]], [4, [4, 3, 3]]], ['control: cx waits on target', [2, 0, [['h', [1]], ['h', [1]], ['cx', [0, 1]]]], [3, [3, 3]]], ['control: identity is free', [1, 0, [['id', [0]], ['id', [0]], ['x', [0]]]], [1, [1]]]], [['regression: barrier aligns everything', [3, 1, [['h', [0]], ['h', [0]], ['barrier', []], ['x', [2]]]], [3, [2, 2, 3]]], ['regression: random schedule 37', [3, 2, [['rz', [2]], ['rz', [0]], ['h', [0]], ['h', [2]], ['rz', [2]], ['barrier', []], ['x', [0], 'if', 0]]], [4, [4, 3, 3]]], ['regression: random schedule 47', [4, 1, [['ccx', [1, 0, 3]], ['barrier', []], ['measure', [0], [0]], ['x', [3]], ['ccx', [1, 3, 0]], ['cx', [0, 1]], ['x', [2]], ['id', [0]]]], [4, [4, 4, 2, 3]]], ['control: conditioned gate after measure', [2, 1, [['h', [0]], ['measure', [0], [0]], ['x', [1], 'if', 0]]], [3, [2, 3]]], ['control: measure after conditioned read', [2, 1, [['h', [0]], ['h', [0]], ['h', [0]], ['x', [1], 'if', 0], ['measure', [1], [0]]]], [3, [3, 2]]], ['control: empty circuit', [2, 1, []], [0, [0, 0]]], ['control: late read then early-qubit measure', [2, 1, [['h', [1]], ['h', [1]], ['h', [1]], ['x', [1], 'if', 0], ['measure', [0], [0]]]], [5, [5, 4]]]], [['regression: barrier aligns everything', [3, 1, [['h', [0]], ['h', [0]], ['barrier', []], ['x', [2]]]], [3, [2, 2, 3]]], ['regression: random schedule 37', [3, 2, [['rz', [2]], ['rz', [0]], ['h', [0]], ['h', [2]], ['rz', [2]], ['barrier', []], ['x', [0], 'if', 0]]], [4, [4, 3, 3]]], ['regression: random schedule 47', [4, 1, [['ccx', [1, 0, 3]], ['barrier', []], ['measure', [0], [0]], ['x', [3]], ['ccx', [1, 3, 0]], ['cx', [0, 1]], ['x', [2]], ['id', [0]]]], [4, [4, 4, 2, 3]]], ['control: read then measure other clbit writer', [3, 2, [['h', [2]], ['h', [2]], ['z', [2], 'if', 1], ['measure', [0], [1]], ['x', [1], 'if', 1]]], [5, [4, 5, 3]]], ['control: random schedule 0', [1, 2, [['x', [0]], ['rz', [0]], ['measure', [0], [0]], ['x', [0]], ['barrier', [0]], ['x', [0], 'if', 1], ['x', [0], 'if', 1], ['x', [0]], ['measure', [0], [0]]]], [8, [8]]], ['control: random schedule 1', [4, 2, [['ccx', [1, 0, 3]], ['ccx', [2, 1, 3]], ['barrier', [0, 1, 2, 3]], ['cx', [1, 0]], ['id', [1]], ['cx', [1, 2]], ['cx', [0, 2]]]], [5, [5, 4, 5, 2]]], ['control: random schedule 2', [1, 1, [['h', [0]], ['rz', [0]], ['x', [0]], ['x', [0], 'if', 0], ['x', [0]], ['x', [0]], ['x', [0], 'if', 0], ['id', [0]]]], [7, [7]]]], [['regression: barrier aligns everything', [3, 1, [['h', [0]], ['h', [0]], ['barrier', []], ['x', [2]]]], [3, [2, 2, 3]]], ['regression: random schedule 37', [3, 2, [['rz', [2]], ['rz', [0]], ['h', [0]], ['h', [2]], ['rz', [2]], ['barrier', []], ['x', [0], 'if', 0]]], [4, [4, 3, 3]]], ['regression: random schedule 47', [4, 1, [['ccx', [1, 0, 3]], ['barrier', []], ['measure', [0], [0]], ['x', [3]], ['ccx', [1, 3, 0]], ['cx', [0, 1]], ['x', [2]], ['id', [0]]]], [4, [4, 4, 2, 3]]], ['control: random schedule 3', [1, 2, [['h', [0]], ['h', [0]]]], [2, [2]]], ['control: random schedule 4', [4, 1, [['measure', [3], [0]], ['ccx', [2, 1, 0]], ['ccx', [0, 2, 3]]]], [2, [2, 1, 2, 2]]], ['control: random schedule 5', [3, 2, [['ccx', [0, 1, 2]], ['ccx', [2, 1, 0]], ['barrier', [0, 1, 2]], ['x', [1]]]], [3, [2, 3, 2]]], ['control: random schedule 6', [4, 2, [['barrier', [2]], ['cx', [1, 2]], ['ccx', [2, 3, 0]]]], [2, [2, 1, 2, 2]]]], [['regression: barrier aligns everything', [3, 1, [['h', [0]], ['h', [0]], ['barrier', []], ['x', [2]]]], [3, [2, 2, 3]]], ['regression: random schedule 37', [3, 2, [['rz', [2]], ['rz', [0]], ['h', [0]], ['h', [2]], ['rz', [2]], ['barrier', []], ['x', [0], 'if', 0]]], [4, [4, 3, 3]]], ['regression: random schedule 47', [4, 1, [['ccx', [1, 0, 3]], ['barrier', []], ['measure', [0], [0]], ['x', [3]], ['ccx', [1, 3, 0]], ['cx', [0, 1]], ['x', [2]], ['id', [0]]]], [4, [4, 4, 2, 3]]], ['control: random schedule 7', [4, 2, [['x', [2], 'if', 1], ['x', [1]], ['barrier', [2]], ['cx', [0, 1]], ['h', [2]]]], [2, [2, 2, 2, 0]]], ['control: random schedule 8', [1, 1, [['x', [0], 'if', 0], ['rz', [0]], ['rz', [0]], ['h', [0]], ['rz', [0]], ['h', [0]], ['measure', [0], [0]], ['rz', [0]]]], [8, [8]]], ['control: random schedule 9', [3, 1, [['cx', [2, 1]], ['h', [1]], ['barrier', [1, 2]]]], [2, [0, 2, 2]]], ['control: random schedule 10', [4, 1, [['id', [2]]]], [0, [0, 0, 0, 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-circuit-depth-layers-empty-barrier-scope","generated_at":"2026-09-29T14:51:32.156937+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Depth drives decoherence budgets and transpiler choices; scheduling slips misreport circuit cost.","repair":"Expand an empty barrier to all qubits before aligning levels.","root_cause":"An empty qubit list is skipped instead of expanding to every qubit in the circuit.","sha256":"310911591c6df9e2f6e943b5aad9e71344d474e5a62d053c2b7be5d8eed19714","title":"Depth scheduler treats an empty barrier as a no-op · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.494,"exit_code":1,"observations":[{"actual":[2,[2,0,1]],"check":"regression: barrier aligns everything","expected":[3,[2,2,3]],"passed":false},{"actual":[4,[4,0,3]],"check":"regression: random schedule 37","expected":[4,[4,3,3]],"passed":false},{"actual":[4,[4,4,1,3]],"check":"regression: random schedule 47","expected":[4,[4,4,2,3]],"passed":false},{"actual":[2,[1,2,1]],"check":"control: partial barrier","expected":[2,[1,2,1]],"passed":true},{"actual":[4,[4,3,3]],"check":"control: toffoli waits on all","expected":[4,[4,3,3]],"passed":true},{"actual":[3,[3,3]],"check":"control: cx waits on target","expected":[3,[3,3]],"passed":true},{"actual":[1,[1]],"check":"control: identity is free","expected":[1,[1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: barrier aligns everything\", \"actual\": [2, [2, 0, 1]], \"expected\": [3, [2, 2, 3]], \"passed\": false}, {\"check\": \"regression: random schedule 37\", \"actual\": [4, [4, 0, 3]], \"expected\": [4, [4, 3, 3]], \"passed\": false}, {\"check\": \"regression: random schedule 47\", \"actual\": [4, [4, 4, 1, 3]], \"expected\": [4, [4, 4, 2, 3]], \"passed\": false}, {\"check\": \"control: partial barrier\", \"actual\": [2, [1, 2, 1]], \"expected\": [2, [1, 2, 1]], \"passed\": true}, {\"check\": \"control: toffoli waits on all\", \"actual\": [4, [4, 3, 3]], \"expected\": [4, [4, 3, 3]], \"passed\": true}, {\"check\": \"control: cx waits on target\", \"actual\": [3, [3, 3]], \"expected\": [3, [3, 3]], \"passed\": true}, {\"check\": \"control: identity is free\", \"actual\": [1, [1]], \"expected\": [1, [1]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.932,"exit_code":1,"observations":[{"actual":[2,[2,0,1]],"check":"regression: barrier aligns everything","expected":[3,[2,2,3]],"passed":false},{"actual":[3,[3,0,3]],"check":"regression: random schedule 37","expected":[4,[4,3,3]],"passed":false},{"actual":[4,[4,4,1,3]],"check":"regression: random schedule 47","expected":[4,[4,4,2,3]],"passed":false},{"actual":[2,[1,2,1]],"check":"control: partial barrier","expected":[2,[1,2,1]],"passed":true},{"actual":[4,[4,3,3]],"check":"control: toffoli waits on all","expected":[4,[4,3,3]],"passed":true},{"actual":[3,[3,3]],"check":"control: cx waits on target","expected":[3,[3,3]],"passed":true},{"actual":[1,[1]],"check":"control: identity is free","expected":[1,[1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: barrier aligns everything\", \"actual\": [2, [2, 0, 1]], \"expected\": [3, [2, 2, 3]], \"passed\": false}, {\"check\": \"regression: random schedule 37\", \"actual\": [3, [3, 0, 3]], \"expected\": [4, [4, 3, 3]], \"passed\": false}, {\"check\": \"regression: random schedule 47\", \"actual\": [4, [4, 4, 1, 3]], \"expected\": [4, [4, 4, 2, 3]], \"passed\": false}, {\"check\": \"control: partial barrier\", \"actual\": [2, [1, 2, 1]], \"expected\": [2, [1, 2, 1]], \"passed\": true}, {\"check\": \"control: toffoli waits on all\", \"actual\": [4, [4, 3, 3]], \"expected\": [4, [4, 3, 3]], \"passed\": true}, {\"check\": \"control: cx waits on target\", \"actual\": [3, [3, 3]], \"expected\": [3, [3, 3]], \"passed\": true}, {\"check\": \"control: identity is free\", \"actual\": [1, [1]], \"expected\": [1, [1]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.466,"exit_code":0,"observations":[{"actual":[3,[2,2,3]],"check":"regression: barrier aligns everything","expected":[3,[2,2,3]],"passed":true},{"actual":[4,[4,3,3]],"check":"regression: random schedule 37","expected":[4,[4,3,3]],"passed":true},{"actual":[4,[4,4,2,3]],"check":"regression: random schedule 47","expected":[4,[4,4,2,3]],"passed":true},{"actual":[2,[1,2,1]],"check":"control: partial barrier","expected":[2,[1,2,1]],"passed":true},{"actual":[4,[4,3,3]],"check":"control: toffoli waits on all","expected":[4,[4,3,3]],"passed":true},{"actual":[3,[3,3]],"check":"control: cx waits on target","expected":[3,[3,3]],"passed":true},{"actual":[1,[1]],"check":"control: identity is free","expected":[1,[1]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: barrier aligns everything\", \"actual\": [3, [2, 2, 3]], \"expected\": [3, [2, 2, 3]], \"passed\": true}, {\"check\": \"regression: random schedule 37\", \"actual\": [4, [4, 3, 3]], \"expected\": [4, [4, 3, 3]], \"passed\": true}, {\"check\": \"regression: random schedule 47\", \"actual\": [4, [4, 4, 2, 3]], \"expected\": [4, [4, 4, 2, 3]], \"passed\": true}, {\"check\": \"control: partial barrier\", \"actual\": [2, [1, 2, 1]], \"expected\": [2, [1, 2, 1]], \"passed\": true}, {\"check\": \"control: toffoli waits on all\", \"actual\": [4, [4, 3, 3]], \"expected\": [4, [4, 3, 3]], \"passed\": true}, {\"check\": \"control: cx waits on target\", \"actual\": [3, [3, 3]], \"expected\": [3, [3, 3]], \"passed\": true}, {\"check\": \"control: identity is free\", \"actual\": [1, [1]], \"expected\": [1, [1]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}