{
  "meta": {
    "n_examples": 10,
    "n_detectors": 6,
    "generated": "2026-08-16 20:52 UTC",
    "eval_ids": [
      "ex01_op_after_meas_basic",
      "ex02_op_after_meas_reset_safe",
      "basic_reset_initialised",
      "ex06_double_meas_basic",
      "ex07_double_meas_reset_between",
      "ex10_double_meas_2qubitgate",
      "ex11_missing_reset_basic",
      "ex14_missing_reset_2qubit_gate",
      "ex15_ghost_compose_basic",
      "ex16_ghost_compose_assigned"
    ],
    "souffle": "2.5"
  },
  "records": [
    {
      "id": "ex01_op_after_meas_basic",
      "file": "ex01_op_after_meas_basic.py",
      "title": "Basic OpAfterMeas (single qubit)",
      "category": "correctness",
      "bug_class": "OpAfterMeas",
      "description": "A gate (h) is applied to q0 after q0 was measured, with no reset between. Both engines should flag it.",
      "notes": "Resets at the top only initialise the qubit; the post-measurement gate is the bug.",
      "source": "from qiskit import QuantumCircuit\n\n# OpAfterMeas: a gate acts on a qubit after that qubit was measured,\n# with no reset between along the CFG path.\nqc = QuantumCircuit(2, 2)\nqc.reset(0)\nqc.reset(1)\nqc.h(0)\nqc.cx(0, 1)\nqc.measure(0, 0)\nqc.h(0)          # BUG: gate on q0 after measure(0) -> OpAfterMeas\n",
      "a_raw": {
        "WarnOpAfterMeas": "8\tqc\th\t0\t7",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": ""
      },
      "b_raw": {
        "WarnOpAfterMeas": "7\t0\t6",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": ""
      },
      "detectors": [
        {
          "detector": "A_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "A",
          "expected": "FIRE",
          "fired": true,
          "capable": true,
          "verdict": "FIRE",
          "raw_csv": "8\tqc\th\t0\t7"
        },
        {
          "detector": "A_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "A_GhostCompose",
          "bug": "GhostCompose",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "B",
          "expected": "FIRE",
          "fired": true,
          "capable": true,
          "verdict": "FIRE",
          "raw_csv": "7\t0\t6"
        },
        {
          "detector": "B_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "B",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_MissingReset",
          "bug": "MissingReset",
          "engine": "B",
          "expected": "SILENT",
          "fired": false,
          "capable": true,
          "verdict": "SILENT",
          "raw_csv": ""
        }
      ]
    },
    {
      "id": "ex02_op_after_meas_reset_safe",
      "file": "ex02_op_after_meas_reset_safe.py",
      "title": "OpAfterMeas negative: reset between measure and gate",
      "category": "correctness",
      "bug_class": "OpAfterMeas",
      "description": "A reset lies between the measure and the later gate, so the gate operates on a re-initialised qubit. A reset-AWARE detector (Engine B) must stay silent; the reset-BLIND Engine A falsely fires -- a documented limitation.",
      "notes": "Key cross-engine example: discriminates reset-aware vs reset-blind OpAfterMeas.",
      "source": "from qiskit import QuantumCircuit\n\n# NEGATIVE for OpAfterMeas: a reset lies between the measure and the later\n# gate, so the gate does NOT operate on a post-measurement qubit state.\n# A correct (reset-aware) detector must stay silent; a reset-blind detector\n# (Engine A) will falsely fire here -- a documented limitation.\nqc = QuantumCircuit(2, 2)\nqc.reset(0)\nqc.reset(1)\nqc.h(0)\nqc.measure(0, 0)\nqc.reset(0)\nqc.h(0)          # SAFE: reset(0) between measure(0) and this gate\n",
      "a_raw": {
        "WarnOpAfterMeas": "8\tqc\th\t0\t6",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": ""
      },
      "b_raw": {
        "WarnOpAfterMeas": "",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": ""
      },
      "detectors": [
        {
          "detector": "A_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "A",
          "expected": "FALSE_POS",
          "fired": true,
          "capable": true,
          "verdict": "FALSE_POS(limitation)",
          "raw_csv": "8\tqc\th\t0\t6"
        },
        {
          "detector": "A_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "A_GhostCompose",
          "bug": "GhostCompose",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "B",
          "expected": "SILENT",
          "fired": false,
          "capable": true,
          "verdict": "SILENT",
          "raw_csv": ""
        },
        {
          "detector": "B_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "B",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_MissingReset",
          "bug": "MissingReset",
          "engine": "B",
          "expected": "SILENT",
          "fired": false,
          "capable": true,
          "verdict": "SILENT",
          "raw_csv": ""
        }
      ]
    },
    {
      "id": "basic_reset_initialised",
      "file": "ex03_op_reach_2qubit.py",
      "title": "OpAfterMeas via 2-qubit gate (cx touches measured qubit)",
      "category": "correctness",
      "bug_class": "OpAfterMeas",
      "description": "cx(0,1) acts on both q0 and q1, but only q1 was measured earlier. Detector must flag the gate on q1 (the measured qubit) and NOT on q0.",
      "notes": "Tests that ActsOn propagation over 2-qubit gates does not over-report to the unmeasured control qubit.",
      "source": "from qiskit import QuantumCircuit\n\n# OpAfterMeas via a 2-qubit gate: cx(0,1) touches BOTH q0 and q1, but only\n# q1 was measured earlier. The detector must flag the gate on q1 (the\n# measured qubit) and NOT on q0 (which was never measured).\nqc = QuantumCircuit(2, 2)\nqc.reset(0)\nqc.reset(1)\nqc.h(0)\nqc.measure(1, 1)\nqc.cx(0, 1)      # BUG on q1: 2-qubit gate acts on measured qubit q1\n",
      "a_raw": {
        "WarnOpAfterMeas": "7\tqc\tcx\t1\t6",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": ""
      },
      "b_raw": {
        "WarnOpAfterMeas": "6\t1\t4",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": ""
      },
      "detectors": [
        {
          "detector": "A_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "A",
          "expected": "FIRE",
          "fired": true,
          "capable": true,
          "verdict": "FIRE",
          "raw_csv": "7\tqc\tcx\t1\t6"
        },
        {
          "detector": "A_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "A_GhostCompose",
          "bug": "GhostCompose",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "B",
          "expected": "FIRE",
          "fired": true,
          "capable": true,
          "verdict": "FIRE",
          "raw_csv": "6\t1\t4"
        },
        {
          "detector": "B_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "B",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_MissingReset",
          "bug": "MissingReset",
          "engine": "B",
          "expected": "SILENT",
          "fired": false,
          "capable": true,
          "verdict": "SILENT",
          "raw_csv": ""
        }
      ]
    },
    {
      "id": "ex06_double_meas_basic",
      "file": "ex06_double_meas_basic.py",
      "title": "Basic DoubleMeas (consecutive measure of same qubit)",
      "category": "correctness",
      "bug_class": "DoubleMeas",
      "description": "q0 is measured twice with no operation on q0 between. Both engines should flag the redundant consecutive measure.",
      "notes": "The canonical redundant-measurement pattern.",
      "source": "from qiskit import QuantumCircuit\n\n# DoubleMeas: qubit q0 is measured twice with no operation on q0 between.\nqc = QuantumCircuit(2, 2)\nqc.reset(0)\nqc.reset(1)\nqc.h(0)\nqc.measure(0, 0)\nqc.measure(0, 0)    # BUG: redundant consecutive measure of q0\n",
      "a_raw": {
        "WarnOpAfterMeas": "",
        "WarnDoubleMeas": "7\tqc\t0\t6",
        "WarnGhostCompose": "",
        "WarnMissingReset": ""
      },
      "b_raw": {
        "WarnOpAfterMeas": "",
        "WarnDoubleMeas": "4\t5\t0",
        "WarnGhostCompose": "",
        "WarnMissingReset": ""
      },
      "detectors": [
        {
          "detector": "A_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "A_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "A",
          "expected": "FIRE",
          "fired": true,
          "capable": true,
          "verdict": "FIRE",
          "raw_csv": "7\tqc\t0\t6"
        },
        {
          "detector": "A_GhostCompose",
          "bug": "GhostCompose",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "B",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "B",
          "expected": "FIRE",
          "fired": true,
          "capable": true,
          "verdict": "FIRE",
          "raw_csv": "4\t5\t0"
        },
        {
          "detector": "B_MissingReset",
          "bug": "MissingReset",
          "engine": "B",
          "expected": "SILENT",
          "fired": false,
          "capable": true,
          "verdict": "SILENT",
          "raw_csv": ""
        }
      ]
    },
    {
      "id": "ex07_double_meas_reset_between",
      "file": "ex07_double_meas_reset_between.py",
      "title": "DoubleMeas negative: reset between the two measures",
      "category": "correctness",
      "bug_class": "DoubleMeas",
      "description": "A reset on q0 sits between the two measures, so the second measure is NOT redundant. Both engines must stay silent (an op on the qubit between suppresses DoubleMeas).",
      "notes": "Confirms the OpBetween / ModifiedQubit guard works as the dual of the reset case in OpAfterMeas.",
      "source": "from qiskit import QuantumCircuit\n\n# NEGATIVE for DoubleMeas: a reset on q0 sits between the two measures,\n# so the second measure is NOT redundant. Both engines must stay silent.\nqc = QuantumCircuit(2, 2)\nqc.reset(0)\nqc.reset(1)\nqc.measure(0, 0)\nqc.reset(0)         # op on q0 between the two measures -> breaks DoubleMeas\nqc.measure(0, 0)    # SAFE: reset(0) between the two measures of q0\n",
      "a_raw": {
        "WarnOpAfterMeas": "",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": ""
      },
      "b_raw": {
        "WarnOpAfterMeas": "",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": ""
      },
      "detectors": [
        {
          "detector": "A_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "A_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "A",
          "expected": "SILENT",
          "fired": false,
          "capable": true,
          "verdict": "SILENT",
          "raw_csv": ""
        },
        {
          "detector": "A_GhostCompose",
          "bug": "GhostCompose",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "B",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "B",
          "expected": "SILENT",
          "fired": false,
          "capable": true,
          "verdict": "SILENT",
          "raw_csv": ""
        },
        {
          "detector": "B_MissingReset",
          "bug": "MissingReset",
          "engine": "B",
          "expected": "SILENT",
          "fired": false,
          "capable": true,
          "verdict": "SILENT",
          "raw_csv": ""
        }
      ]
    },
    {
      "id": "ex10_double_meas_2qubitgate",
      "file": "ex10_double_meas_2qubitgate.py",
      "title": "DoubleMeas suppressed but OpAfterMeas fires on the same cx",
      "category": "correctness",
      "bug_class": "OpAfterMeas+DoubleMeas",
      "description": "A 2-qubit gate cx(0,1) on q0 lies between two measures of q0: that op correctly SUPPRESSES DoubleMeas, yet cx is itself a gate on q0 applied after the first measure, so it TRIGGERS OpAfterMeas. One detector must fire (OpAfterMeas) while the other stays silent (DoubleMeas).",
      "notes": "Cross-detector interaction: the same statement is relevant to two analyses with opposite expectations.",
      "source": "from qiskit import QuantumCircuit\n\n# COMBINED / cross-detector: a 2-qubit gate cx(0,1) on q0 between two\n# measures of q0 correctly SUPPRESSES DoubleMeas (an op touches q0 between),\n# yet the same cx is a gate on q0 applied after the first measure, so it\n# TRIGGERS OpAfterMeas. Demonstrates that one detector fires while the other\n# must not.\nqc = QuantumCircuit(2, 2)\nqc.reset(0)\nqc.reset(1)\nqc.measure(0, 0)\nqc.cx(0, 1)        # gate on q0 between measures -> suppresses DoubleMeas,\n                   # but is itself a gate after measure -> OpAfterMeas on q0\nqc.measure(0, 0)\n",
      "a_raw": {
        "WarnOpAfterMeas": "6\tqc\tcx\t0\t5\n6\tqc\tcx\t0\t7",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": ""
      },
      "b_raw": {
        "WarnOpAfterMeas": "4\t0\t3",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": ""
      },
      "detectors": [
        {
          "detector": "A_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "A",
          "expected": "FIRE",
          "fired": true,
          "capable": true,
          "verdict": "FIRE",
          "raw_csv": "6\tqc\tcx\t0\t5\n6\tqc\tcx\t0\t7"
        },
        {
          "detector": "A_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "A",
          "expected": "SILENT",
          "fired": false,
          "capable": true,
          "verdict": "SILENT",
          "raw_csv": ""
        },
        {
          "detector": "A_GhostCompose",
          "bug": "GhostCompose",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "B",
          "expected": "FIRE",
          "fired": true,
          "capable": true,
          "verdict": "FIRE",
          "raw_csv": "4\t0\t3"
        },
        {
          "detector": "B_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "B",
          "expected": "SILENT",
          "fired": false,
          "capable": true,
          "verdict": "SILENT",
          "raw_csv": ""
        },
        {
          "detector": "B_MissingReset",
          "bug": "MissingReset",
          "engine": "B",
          "expected": "SILENT",
          "fired": false,
          "capable": true,
          "verdict": "SILENT",
          "raw_csv": ""
        }
      ]
    },
    {
      "id": "ex11_missing_reset_basic",
      "file": "ex11_missing_reset_basic.py",
      "title": "Basic MissingReset (first op is a gate, not a reset)",
      "category": "correctness",
      "bug_class": "MissingReset",
      "description": "The first operation that touches q0 is h (a gate), not a reset, so q0 is used while uninitialised. Engine B only.",
      "notes": "Engine A has no MissingReset rule; marked N/A there.",
      "source": "from qiskit import QuantumCircuit\n\n# MissingReset: the first operation that touches q0 is a gate (h), not a\n# reset, so q0 is used while uninitialised. Engine B only.\nqc = QuantumCircuit(2, 2)\nqc.h(0)            # BUG: first op on q0 is h, not reset (MissingReset q0)\nqc.measure(0, 0)\n",
      "a_raw": {
        "WarnOpAfterMeas": "",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": ""
      },
      "b_raw": {
        "WarnOpAfterMeas": "",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": "1\t0"
      },
      "detectors": [
        {
          "detector": "A_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "A_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "A_GhostCompose",
          "bug": "GhostCompose",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "B",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "B",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_MissingReset",
          "bug": "MissingReset",
          "engine": "B",
          "expected": "FIRE",
          "fired": true,
          "capable": true,
          "verdict": "FIRE",
          "raw_csv": "1\t0"
        }
      ]
    },
    {
      "id": "ex14_missing_reset_2qubit_gate",
      "file": "ex14_missing_reset_2qubit_gate.py",
      "title": "MissingReset via a 2-qubit gate (cx uses uninitialised qubits)",
      "category": "correctness",
      "bug_class": "MissingReset",
      "description": "cx(0,1) is the first operation touching both q0 and q1, so both are used while uninitialised. Engine B must flag q0 and q1 (the cx is a gate, not a reset).",
      "notes": "MissingReset over a multi-target gate.",
      "source": "from qiskit import QuantumCircuit\n\n# MissingReset via a 2-qubit gate: cx(0,1) is the first operation touching\n# both q0 and q1, so both are used while uninitialised. Engine B must flag\n# q0 and q1 (the cx is a gate, not a reset).\nqc = QuantumCircuit(2, 2)\nqc.cx(0, 1)        # BUG: cx uses q0 and q1 before any reset (MissingReset q0, q1)\n",
      "a_raw": {
        "WarnOpAfterMeas": "",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": ""
      },
      "b_raw": {
        "WarnOpAfterMeas": "",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": "1\t0\n2\t1"
      },
      "detectors": [
        {
          "detector": "A_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "A_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "A_GhostCompose",
          "bug": "GhostCompose",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "B",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "B",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_MissingReset",
          "bug": "MissingReset",
          "engine": "B",
          "expected": "FIRE",
          "fired": true,
          "capable": true,
          "verdict": "FIRE",
          "raw_csv": "1\t0\n2\t1"
        }
      ]
    },
    {
      "id": "ex15_ghost_compose_basic",
      "file": "ex15_ghost_compose_basic.py",
      "title": "Basic GhostCompose (discarded compose return value)",
      "category": "silent-noop",
      "bug_class": "GhostCompose",
      "description": "qc.compose(sub) is non-mutating in Qiskit, but its return value is discarded, so the composed circuit is silently dropped. Engine A only.",
      "notes": "Engine B has no GhostCompose rule; marked N/A there.",
      "source": "from qiskit import QuantumCircuit\n\n# GhostCompose: qc.compose(sub) is non-mutating in Qiskit, but its return\n# value is discarded, so the composed circuit is silently dropped. Engine A\n# only.\nqc = QuantumCircuit(1, 1)\nsub = QuantumCircuit(1, 1)\nsub.h(0)\nqc.compose(sub)    # BUG: compose() return value discarded (GhostCompose)\n",
      "a_raw": {
        "WarnOpAfterMeas": "",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "5\tqc\tsub",
        "WarnMissingReset": ""
      },
      "b_raw": {
        "WarnOpAfterMeas": "",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": "1\t0"
      },
      "detectors": [
        {
          "detector": "A_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "A_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "A_GhostCompose",
          "bug": "GhostCompose",
          "engine": "A",
          "expected": "FIRE",
          "fired": true,
          "capable": true,
          "verdict": "FIRE",
          "raw_csv": "5\tqc\tsub"
        },
        {
          "detector": "B_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "B",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "B",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_MissingReset",
          "bug": "MissingReset",
          "engine": "B",
          "expected": "N/A",
          "fired": true,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": "1\t0"
        }
      ]
    },
    {
      "id": "ex16_ghost_compose_assigned",
      "file": "ex16_ghost_compose_assigned.py",
      "title": "GhostCompose negative: return value captured",
      "category": "silent-noop",
      "bug_class": "GhostCompose",
      "description": "qc2 = qc.compose(sub) keeps the return value, so the circuit is intentionally retained. Engine A must NOT fire (negative example).",
      "notes": "Confirms the AssignedStmt guard: only non-assigned compose() calls are flagged.",
      "source": "from qiskit import QuantumCircuit\n\n# NEGATIVE for GhostCompose: the result of compose() is captured in qc2, so\n# the circuit is intentionally kept. The detector must NOT fire.\nqc = QuantumCircuit(1, 1)\nsub = QuantumCircuit(1, 1)\nsub.h(0)\nqc2 = qc.compose(sub)    # SAFE: return value captured -> no GhostCompose\n",
      "a_raw": {
        "WarnOpAfterMeas": "",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": ""
      },
      "b_raw": {
        "WarnOpAfterMeas": "",
        "WarnDoubleMeas": "",
        "WarnGhostCompose": "",
        "WarnMissingReset": "1\t0"
      },
      "detectors": [
        {
          "detector": "A_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "A_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "A",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "A_GhostCompose",
          "bug": "GhostCompose",
          "engine": "A",
          "expected": "SILENT",
          "fired": false,
          "capable": true,
          "verdict": "SILENT",
          "raw_csv": ""
        },
        {
          "detector": "B_OpAfterMeas",
          "bug": "OpAfterMeas",
          "engine": "B",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_DoubleMeas",
          "bug": "DoubleMeas",
          "engine": "B",
          "expected": "N/A",
          "fired": false,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": ""
        },
        {
          "detector": "B_MissingReset",
          "bug": "MissingReset",
          "engine": "B",
          "expected": "N/A",
          "fired": true,
          "capable": true,
          "verdict": "N/A",
          "raw_csv": "1\t0"
        }
      ]
    }
  ],
  "metrics": {
    "A_OpAfterMeas": {
      "detector": "A_OpAfterMeas",
      "bug": "OpAfterMeas",
      "engine": "A",
      "tp": 4,
      "fp": 0,
      "fn": 0,
      "tn": 0,
      "na": 6,
      "limit": 1,
      "rows": 10,
      "precision": 1.0,
      "recall": 1.0,
      "f1": 1.0,
      "accuracy": 1.0
    },
    "A_DoubleMeas": {
      "detector": "A_DoubleMeas",
      "bug": "DoubleMeas",
      "engine": "A",
      "tp": 1,
      "fp": 0,
      "fn": 0,
      "tn": 2,
      "na": 7,
      "limit": 0,
      "rows": 10,
      "precision": 1.0,
      "recall": 1.0,
      "f1": 1.0,
      "accuracy": 1.0
    },
    "A_GhostCompose": {
      "detector": "A_GhostCompose",
      "bug": "GhostCompose",
      "engine": "A",
      "tp": 1,
      "fp": 0,
      "fn": 0,
      "tn": 1,
      "na": 8,
      "limit": 0,
      "rows": 10,
      "precision": 1.0,
      "recall": 1.0,
      "f1": 1.0,
      "accuracy": 1.0
    },
    "B_OpAfterMeas": {
      "detector": "B_OpAfterMeas",
      "bug": "OpAfterMeas",
      "engine": "B",
      "tp": 3,
      "fp": 0,
      "fn": 0,
      "tn": 1,
      "na": 6,
      "limit": 0,
      "rows": 10,
      "precision": 1.0,
      "recall": 1.0,
      "f1": 1.0,
      "accuracy": 1.0
    },
    "B_DoubleMeas": {
      "detector": "B_DoubleMeas",
      "bug": "DoubleMeas",
      "engine": "B",
      "tp": 1,
      "fp": 0,
      "fn": 0,
      "tn": 2,
      "na": 7,
      "limit": 0,
      "rows": 10,
      "precision": 1.0,
      "recall": 1.0,
      "f1": 1.0,
      "accuracy": 1.0
    },
    "B_MissingReset": {
      "detector": "B_MissingReset",
      "bug": "MissingReset",
      "engine": "B",
      "tp": 2,
      "fp": 0,
      "fn": 0,
      "tn": 6,
      "na": 2,
      "limit": 0,
      "rows": 10,
      "precision": 1.0,
      "recall": 1.0,
      "f1": 1.0,
      "accuracy": 1.0
    }
  }
}