I’m pretty new to pennylane and I’m trying to getting in hand with it. Today, I tried to generate some random cat state, but I could not be able to follow through it.
I found in the documentation the method CatState, and I inserted it inside a basic random state circuit, with device.gaussian.
It produced always the same error: no gate CatState allowed in the device.
May you hand me some help, please?
for w in dev.wires:
This is a great catch and it seems to be an issue on our side, since
CatState does not seem to be allowed in the list of operations for
default.gaussian. We are aware that the documentation seems to be contradicting itself and we need to fix it. An option is for you at the moment is to use
qml.InterferometerUnitary to generate the state that you need.
Please also keep in mind that
default.gaussian does not accept
qml.state() as a return type (since you need an infinite basis to represent CV states in general!) so make sure that you return expectation values using
You can check out this PennyLane tutorial to see the
default.gaussian device in action.
Hope this helps!