Hi! I am trying to print out the statevector of certain system and I was trying to use “pennylane.qnodes import PassthruQNode”
(Using the state vector directly), and I’m have two troubles:
The error message says “Cannot convert value <bound method DefaultTensor._state of <DefaultTensorTF device (wires=2, shots=1000) at 0x217a9d8d760>> to a TensorFlow DType” for the line of “grad = tape.gradient(state, params)” in your example code on that discussion link.
How can I actually print out the state? It kept showing “<bound method DefaultTensor._state of <DefaultTensorTF device (wires=2, shots=1000) at 0x217a9d46a90>>” even if I put print statement.