Hi there!
I’m working on a circuit in PennyLane with qml.MultiControlledX
and I’m unable to get it to work without error. Maybe there’s a bug here, but I’m confused, so not 100% confident.
Example code:
dev = qml.device("default.qubit", wires=3)
@qml.qnode(dev)
def circuit(x):
qml.Hadamard(0)
qml.Hadamard(1)
qml.RX(x, 0)
qml.MultiControlledX([0,1], [0,1,2], [1,1])
return qml.expval(qml.PauliZ(1) @ qml.PauliZ(2))
circuit(0.5)
When I run it, it says “ValueError: MultiControlledX accepts a single target wire.”
I also tried calling with the argument names (qml.MultiControlledX(control_wires=[0,1], wires=[0,1,2], control_values=[1,1])
) and it also didn’t work.
Any help would be very nice