Any hints as to why this does not work? I am getting only a uniform superposition as output.
Hi @qreg, your circuit is structurally correct, but there is an unfortunate degeneracy of notation happening here There are two operations in PennyLane that are generally denoted by “X”, qml.PauliX
and qml.X
. The first is the standard single-qubit operation, whereas the second is actually a continuous-variable observable.
Having done a quick test locally, there is actually no indication when running this that anything is amiss (no warnings, etc.), so this is something we’ll have to look into improving in PennyLane
Oh, I did some programming in other programming environments too and so did not even notice this difference before you pointed it out.
No worries In fact the inverse happens to me quite often whenever I need to switch over and write something in QASM or a different framework