class_docstr: Tests the continuous variable based operations.
docstr: ops: Tests the Heisenberg representation of the Beamsplitter gate.
docstr_tok: ["ops",":","Tests","the","Heisenberg","representation","of","the","Beamsplitter","gate","."]
code: def test_two_mode_squeezing_heisenberg(self, phi, mag):
      """ops: Tests the Heisenberg representation of the Beamsplitter gate."""
      r = mag
      matrix = cv.TwoModeSqueezing._heisenberg_rep([r, phi])
      true_matrix = np.array(
          [
              [1, 0, 0, 0, 0],
              [
                  0,
                  np.cosh(r),
                  0,
                  np.cos(phi) * np.sinh(r),
                  np.sin(phi) * np.sinh(r),
              ],
              [
                  0,
                  0,
                  np.cosh(r),
                  np.sin(phi) * np.sinh(r),
                  -np.cos(phi) * np.sinh(r),
              ],
              [
                  0,
                  np.cos(phi) * np.sinh(r),
                  np.sin(phi) * np.sinh(r),
                  np.cosh(r),
                  0,
              ],
              [
                  0,
                  np.sin(phi) * np.sinh(r),
                  -np.cos(phi) * np.sinh(r),
                  0,
                  np.cosh(r),
              ],
          ]
      )
      assert np.allclose(matrix, true_matrix)
  
imports: import pytest
  import numpy.testing
  from pennylane import numpy
  from pennylane.operation import AnyWires
  from pennylane.ops import cv
  from pennylane.wires import Wires
label_desc: Use image node_id 7 for calling the TestCV obj's underlying member method code with example usage: obj.test_two_mode_squeezing_heisenberg(phi, mag) without return types