class_docstr: Test inputs and pre-processing.
class_docstr_tok: ["Test","inputs","and","pre-processing","."]
docstr: Test that FermionicSingleExcitation throws an exception if ``weight`` or
  ``single_wires`` parameter has illegal shapes, types or values.
docstr_tok: ["Test","that","FermionicSingleExcitation","throws","an","exception","if","``","weight","``","or","``","single_wires","``","parameter","has","illegal","shapes",",","types","or","values","."]
code: def test_single_excitation_unitary_exceptions(
      self, weight, single_wires, msg_match
  ):
      """Test that FermionicSingleExcitation throws an exception if ``weight`` or
      ``single_wires`` parameter has illegal shapes, types or values."""
      dev = qml.device("default.qubit", wires=5)
  
      def circuit(weight=weight):
          qml.FermionicSingleExcitation(
              weight=weight, wires=single_wires
          )
          return qml.expval(qml.PauliZ(0))
  
      qnode = qml.QNode(circuit, dev)
  
      with pytest.raises(ValueError, match=msg_match):
          qnode(weight=weight)
  
file_path: pennylane/tests/templates/test_subroutines/test_single_excitation.py
imports: import pytest
  import numpy
  from pennylane import numpy
  import pennylane
label_desc: Use image node_id 1 for calling the TestInputs obj's underlying member method code with example usage: obj.test_single_excitation_unitary_exceptions(weight, single_wires, msg_match) and returns: qml