If you want help with diagnosing an error, please put the full error message below:
I'm not sure but this symplectic covariance matrix doesn't match with the cml.TwoModeSqueezing Heisenberg representation matrix. Please let me know, if I'm thinking wrong. I want to learn the reason why you are using this symplectic matrix
And, finally, make sure to include the versions of your packages. Specifically, show us the output of qml.about().
Just to clarify your question, you want to know why the symplectic transformation matrix here and the Heisenberg representation here are different for two-mode squeezing right?
Those matrices do turn out to be the same, except for two things:
The one in the Heisenberg representation accounts for the possibility of a displacement, which is why there is an extra row. But squeezing doesn’t displace, so the first row and column are (1, 0, 0, 0, 0). This stackexchange post has a nice explanation.
The other difference, if we forget about the extra row and column, is the order of the rows. This is probably because a difference convention is being used, which does seem to be a problem.
When using the Squeeze operators, please just focus on what the default_gaussian documentation says, since this is how the actual gates are being implemented. Also note that PennyLane does not specialize in continuous variables calculations and default_gaussian hasn’t had updates in a while. I would suggest taking a look at Strawberry Fields or Mr. Mustard for this kind of calculations, which are much more versatile.
The reason is that the second one is in the Heisenberg representation, which tells you how to transform the creation and annihilation operators a,a^{\dagger},b,b^{\dagger}. It is the action of the gate in Fock space. The first matrix tell you how the position and momentum operators are transformed. It’s how the matrix acts in phase space, so it acts on the position and momentum operators of the modes.