class_docstr: Test inputs and pre-processing.
class_docstr_tok: ["Test","inputs","and","pre-processing","."]
docstr: Test that GateFabric template throws an exception if the parameters have illegal
  shapes, types or values.
docstr_tok: ["Test","that","GateFabric","template","throws","an","exception","if","the","parameters","have","illegal","shapes",",","types","or","values","."]
code: def test_exceptions(self, weights, wires, msg_match):
      """Test that GateFabric template throws an exception if the parameters have illegal
      shapes, types or values."""
      N = len(wires)
      init_state = qml.math.array([1, 1, 0, 0])
  
      dev = qml.device("default.qubit", wires=N)
  
      @qml.qnode(dev)
      def circuit():
          qml.GateFabric(
              weights=weights,
              wires=wires,
              init_state=init_state,
          )
          return qml.expval(qml.PauliZ(0))
  
      with pytest.raises(ValueError, match=msg_match):
          circuit()
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 1 for calling the TestInputs obj's underlying member method code with example usage: obj.test_exceptions(weights, wires, msg_match) and returns: qml