I tried code below
import pennylane as qml
import numpy as np
dev = qml.device("default.qubit", wires=4)
@qml.qnode(dev)
def qc(thetas):
qml.PauliX(wires=0)
qml.PauliX(wires=1)
qml.SingleExcitation(thetas[0],wires=[0,1])
qml.SingleExcitation(thetas[1],wires=[2,3])
return qml.state()
Thetas=np.random.rand(2,100)
print(qc(Thetas))
Then i got error like below
NotImplementedError: Applying a broadcasted unitary to an already broadcasted state via _apply_unitary is not supported. Broadcasting sizes are (100, 100)
If i replace SingleExcitation as another gate such as IsingXX, it works well.
Is SingleExcitation gate does not support parameter broadcasting?