class_docstr: Tests for the Interferometer from the pennylane.template.layers module.
class_docstr_tok: ["Tests","for","the","Interferometer","from","the","pennylane.template.layers","module","."]
docstr: test the beamsplitter convention
docstr_tok: ["test","the","beamsplitter","convention"]
code: def test_clements_beamsplitter_convention(self):
      """test the beamsplitter convention"""
      N = 2
      wires = range(N)
  
      theta = [0.321]
      phi = [0.234]
      varphi = [0.42342, 0.1121]
  
      op_rect = qml.Interferometer(
          theta,
          phi,
          varphi,
          mesh="rectangular",
          beamsplitter="clements",
          wires=wires,
      )
  
      op_tria = qml.Interferometer(
          theta,
          phi,
          varphi,
          mesh="triangular",
          beamsplitter="clements",
          wires=wires,
      )
  
      for rec in [op_rect.expand(), op_tria.expand()]:
          assert len(rec) == 4
  
          assert isinstance(rec[0], qml.Rotation)
          assert rec[0].parameters == phi
  
          assert isinstance(rec[1], qml.Beamsplitter)
          assert rec[1].parameters == [theta[0], 0]
  
          assert isinstance(rec[2], qml.Rotation)
          assert rec[2].parameters == [varphi[0]]
  
          assert isinstance(rec[3], qml.Rotation)
          assert rec[3].parameters == [varphi[1]]
  
file_path: pennylane/tests/templates/test_subroutines/test_interferometer.py
imports: import pytest
  import numpy
  import pennylane
  from pennylane.wires import Wires
label_desc: Use image node_id 3 for calling the TestInterferometer obj's underlying member method code with example usage: obj.test_clements_beamsplitter_convention() without return types