Transform not showing correct circuit

I am trying to apply a transform to my circuit. When i look at the operations of the transform i see correct gates, but when i draw my circuit, i see the gates applied twice. Here is the code i have:

import pennylane as qml
import pennylane as qml
from typing import Callable, Sequence
from pennylane.tape import QuantumTape

def convert_cnots(tape: qml.tape.QuantumTape)-> (Sequence[QuantumTape], Callable):
    new_ops = []
    for op in tape.operations:
        if == "CNOT":
            new_ops.append( qml.Hadamard(1))
    tp = QuantumTape(new_ops, tape.measurements, tape.trainable_params)
    return [tp], lambda res: res[0]

@qml.qnode(qml.device('default.qubit', wires=2))
def circuit():
    qml.CNOT(wires=[0, 1])

    return qml.expval(qml.PauliZ(0) @ qml.PauliZ(1))


here is the circuit that i get when i draw it. I shouldn’t be getting the H CZ and H twice. What could be causing this?:

Hey @Mushahid_Khan , do you mind sharing the output of qml.about()?
This would help us figure out what the problem is. I’m struggling to reproduce this behavior on my end. :sweat_smile: