from qiskit import QuantumCircuit

# OpAfterMeas via a 2-qubit gate: cx(0,1) touches BOTH q0 and q1, but only
# q1 was measured earlier. The detector must flag the gate on q1 (the
# measured qubit) and NOT on q0 (which was never measured).
qc = QuantumCircuit(2, 2)
qc.reset(0)
qc.reset(1)
qc.h(0)
qc.measure(1, 1)
qc.cx(0, 1)      # BUG on q1: 2-qubit gate acts on measured qubit q1
