prog = sf.Program(1)
amp = 0.8
np.random.seed(0)
x = np.random.rand(2)
with prog.context as q:
sf.ops.Squeezed(r=amp,p=0) | q[0]
eng = sf.LocalEngine('fock', backend_options={'cutoff_dim': 24})
result = eng.run(prog)
prog2 = sf.Program(1)
with prog2.context as n:
sf.ops.Squeezed(r=amp,p=10) | n[0]
eng = sf.LocalEngine('fock', backend_options={'cutoff_dim': 24})
result1 = eng.run(prog)
The output of the following:
np.vdot(result1.state.data,result.state.data)
(0.9999886803073812+0j)
while it should be approximately:
β0.6340021261700056β according to
the version of Strawberryfields is β0.11.2β