In Pennylane, I created a function to set the initial parameters of my qubit, and then called qml.state() to return the output. I now want to feed this initialization into another circuit, but I'm not sure how I would go about doing that.
here's what I have:
random_init() initializes a set of qubits to particular states, and then returns qml.state()
@qml.qnode(dev1) def random_init(): for i in range(0, y, 3): qml.RX(random_list[i], i//3) qml.RY(random_list[i+1], i//3) qml.RZ(random_list[i+2], i//3) return qml.state()
I now want to take qml.state() and pass it through another circuit that does computations based on the initial states set by random_init().
Is this possible to do? Furthermore, is there a more effective way to achieve this goal?
Thanks in advance for any help people provide.