class_docstr: Gate tests.
class_docstr_tok: ["Gate","tests","."]
docstr: Test the squeezing symplectic transform.
docstr_tok: ["Test","the","squeezing","symplectic","transform","."]
code: def test_squeezing(self, tol):
      """Test the squeezing symplectic transform."""
  
      r = 0.543
      phi = 0.123
      S = squeezing(r, phi)
  
      # apply to an identity covariance matrix
      out = S @ S.T
      expected = (
          rotation(phi / 2)
          @ np.diag(np.exp([-2 * r, 2 * r]))
          @ rotation(phi / 2).T
      )
      assert out == pytest.approx(expected, abs=tol)
  
imports: import numpy
  import numpy.random
  import pytest
  from scipy.linalg import block_diag
  from scipy.special import factorial
  import pennylane
  from pennylane import DeviceError
  from pennylane.devices.default_gaussian import fock_prob, rotation, squeezing, quadratic_phase, beamsplitter, two_mode_squeezing, controlled_addition, controlled_phase, vacuum_state, coherent_state, squeezed_state, displaced_squeezed_state, thermal_state
  from pennylane.wires import Wires
label_desc: Use image node_id 3 for calling the TestGates obj's underlying member method code with example usage: obj.test_squeezing(tol) without return types