Hi @Sebastian_Duque_Mesa! Eve is peeping
.
I am new and not familiar with this forum, and I hope I asked my question in the right chat.
Like @alicewithoutbob, I am experimenting with Strawberry Fields and have also noticed the same instability in the Wigner function calculation, even with a ‘reasonable’ amount of squeezing (around 6 dB).
I am using this definition for the squeezed state:
def Squeeze(r, cutoff):
"""This function aims to build a vacuum squeezed state in the Fock basis
r : Squeezing parameter
"""
prog = sf.Program(1)
eng = sf.Engine("fock", backend_options={"cutoff_dim": cutoff})
with prog.context as q:
S = Sgate(r)
S | q[0]
state = eng.run(prog).state
print("State trace : {} ".format(state.trace()))
return [state, format(state.trace())]
Compute a vacuum squeezed state with different cutoff, and calculate the Wigner function
ds = [150, 200, 250]
Ws = []
states = []
X = np.linspace(-15, 15, 401)
P = np.linspace(-15, 15, 401)
for i in ds:
state = Squeeze(-0.7, i)
states.append(state[0])
Ws.append(state[0].wigner(mode=0, xvec=X, pvec=P))
The following plot is the wigner function I obtained :
The issue is that at around a cutoff of 200, the calculation of the Wigner function for squeezed vacuum states computed with the Fock backend seems unstable, even with a reasonable amount of squeezing.
I reviewed the code used to calculate the Wigner function and did not find what causes these instabilities.
I need to increase the cutoff with the Fock backend for further studies, and I wonder if there is a way to correct this.
I also thought that the more the cutoff is increased, the more accurate on the calculation you are but it is not the case here and I was wondering why.
Thank you for your attention and your time and have a good day.
