The new pennylane v0.33 cannot support Ionizer


I met a bug when the pennylane v0.33 released. I try to use the Ionizer to compile circuit into trapped ion native gates. And I follow the pennylane blog But it doesn’t work when the pennylane v0.33 released.

Here is the code I used.

dev = qml.device("default.qubit", wires=2)
my_adder_circuit = qml.from_qasm(adder_circuit.qasm())

def circuit():
    qml.RX(0.1, wires=1)
    qml.CNOT(wires=[0, 1])
    return qml.expval(qml.PauliZ(0))


Then I will get the error.

AttributeError: 'TransformDispatcher' object has no attribute 'tape_fn'

Can anybody help me with it? Any help will be appreciated.

Hi @Cheng_Chu,

Developer of the Ionizer here - thanks for catching this! I believe there are some differences in how transforms are working in v0.33. I have made an issue on the Ionizer GitHub page and will work on a fix ASAP!

1 Like

@Cheng_Chu I have updated the package to version 0.2 to support PL 0.33. Please give it a shot and let me know if you run into any other issues. (While I’ve added more tests, I recommend to verify matrix equivalence before/after the transforms when possible, as a sanity check)


Hi @glassnotes_alt ,

Really appreciate for your timely fixes and updates. I will try it.

Thanks for the super quick fix @glassnotes_alt ! And thank you for reporting the issue @Cheng_Chu !