State preparation


#1

hi
when we encode the input data using a D-gate, does that mean it’s in a vacuum state i.e |0> state? and the Displacement gate acts on it? @Maria_Schuld @josh @Christian_Gogolin


#2

Hi @kareem_essafty, yes, that’s correct. In PennyLane, quantum nodes are always initialized in the ground state. For qubit-based QNodes, this is the state |0\rangle, and for CV-based QNodes, this is the vacuum state.

So, in this example, the input data is encoded in a displaced vacuum state, or a coherent state.