in this paper the authors describe in equation 33 a generic way to compute the inner product between DSN states and then in the appendix in equation A5 a compact form between two displaced squeezed states as shown in the fig below:
when i try to implement this equation using straightforward numpy, the squeezing part is working perfectly as it should be and also as mentioned in your paper. The displacement part is also correct and it matches what strawberryfields produces. “calculating the inner product between two displaced states or two squeezed states”.
However, the inner product between two DS states doesn’t match the output from equation A5 and the output from strawberryfields is much more realistic in terms of separability. for example r_1 = 1, \ \ r_2=0.-2, \\ d_1=0.4,\ \ d_2=-0.4
the term |<\psi_1|\psi_2>|^2 is very low using both of the fock backend and gaussian backend. but it doesn’t match the output from equation A5.
Hi @kareem_essafty — Could you share the code you used to calculate the overlaps? Also, just to make sure, the equation you write is for \langle \psi_1|\psi_2 \rangle but SF will likely give you the modulus squared of this, namely | \langle \psi_1|\psi_2 \rangle |^2
Hi @kareem_essafty — I verified the numbers coming from strawberry fields and they are correct. I think the reason you are getting different answers is that the paper you cite uses a different convention for the squeezing operator. They define it as while we define it as
Thus our z is their minus\zeta. I’d encourage you to always verify the conventions page of Strawberry Fields against any external source to make sure you are always using the same definitions…
Thank you so much!
I have been searching for a solution for a quite long time . I think there should be like a fixed standard as we have in the qubit system.
one final thing when i add the sign in front of mag or the \zeta it works perfectly except for the imaginary part they are identical except for the sign. but when I take the abs they are of course identical. should I change something else in the function above?
Unfortunately the field of CV quantum computing is rife with different sign conventions. Even hbar can change from chapter to chapter of the same thesis! Our solution here was to be very clear about our conventions on the SF conventions page, as @Nicolas_Quesada mentioned.
Regarding your final sign issue, if you get that the imaginary part has the opposite sign, that means you are getting the complex conjugate of what you expect. Can you confirm that you are comparing the desired inner products correctly? i.e., \langle x \vert y \rangle=\langle y \vert x \rangle^*