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 Interferometer() raises correct exception when mesh not recognized.
docstr_tok: ["Test","that","Interferometer","(",")","raises","correct","exception","when","mesh","not","recognized","."]
code: def test_invalid_mesh_exception(self):
      """Test that Interferometer() raises correct exception when mesh not recognized."""
      dev = qml.device("default.gaussian", wires=2)
      varphi = [0.42342, 0.234]
  
      @qml.qnode(dev)
      def circuit(varphi, mesh=None):
          qml.Interferometer(
              theta=[0.21],
              phi=[0.53],
              varphi=varphi,
              mesh=mesh,
              wires=[0, 1],
          )
          return qml.expval(qml.NumberOperator(0))
  
      with pytest.raises(ValueError, match="did not recognize mesh"):
          circuit(varphi, mesh="a")
  
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 1 for calling the TestInterferometer obj's underlying member method code with example usage: obj.test_invalid_mesh_exception() and returns: qml