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 that a one mode interferometer correctly gives a rotation gate
docstr_tok: ["Test","that","a","one","mode","interferometer","correctly","gives","a","rotation","gate"]
code: def test_one_mode(self, tol):
      """Test that a one mode interferometer correctly gives a rotation gate"""
      varphi = [0.42342]
  
      op = qml.Interferometer(theta=[], phi=[], varphi=varphi, wires=0)
      rec = op.expand()
  
      assert len(rec) == 1
      assert isinstance(rec[0], qml.Rotation)
      assert np.allclose(rec[0].parameters, varphi, atol=tol)
  
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 4 for calling the TestInterferometer obj's underlying member method code with example usage: obj.test_one_mode(tol) without return types