Displaced squeezed state


#1

while going through the documentation i stared at this section for a while:

i searched for it and i think and please correct it me it’s safe to say that the displacement operator can be made first according to this paper they say in the intro that someone had derived it this way

am i missing something or not?
@Maria_Schuld @josh @Christian_Gogolin


#2

The easiest thing is to try it out in PennyLane:

import pennylane as qml
from pennylane import numpy as np

num_subsystems = 1
dev = qml.device('default.gaussian', wires=num_subsystems)
a = 0.2
r = 0.4
phi = 0

@qml.qnode(dev)
def circuit1():
    qml.DisplacedSqueezedState(a, r, phi, wires=[0])
    return qml.expval.MeanPhoton(wires=[0])

@qml.qnode(dev)
def circuit2():
    qml.Squeezing(r, phi, wires=[0])
    qml.Displacement(a, 0, wires=[0])
    return qml.expval.MeanPhoton(wires=[0])

@qml.qnode(dev)
def circuit3():
    qml.Displacement(a, 0, wires=[0])
    qml.Squeezing(r, phi, wires=[0])
    return qml.expval.MeanPhoton(wires=[0])

print(circuit1())
print(circuit2())
print(circuit3())

You will see that this prints

0.2087174731524224
0.2087174731524224
0.1866906317171112

which means that the order of squeezing and displacement does matter.


#3

the replacement itself affects the training a lot too
thanks for explanation :wink: