class_docstr: Test the Hermitian observable
class_docstr_tok: ["Test","the","Hermitian","observable"]
docstr: Tests that an error is raised if the input to Hermitian is ragged.
docstr_tok: ["Tests","that","an","error","is","raised","if","the","input","to","Hermitian","is","ragged","."]
code: def test_ragged_input_raises(self):
      """Tests that an error is raised if the input to Hermitian is ragged."""
      ham = [[1, 0], [0, 1, 2]]
  
      with pytest.raises(
          ValueError,
          match="The requested array has an inhomogeneous shape",
      ):
          qml.Hermitian(ham, wires=0)
  
imports: import functools
  import pickle
  import pytest
  import numpy
  from gate_data import I, X, Y, Z, H
  import pennylane
  from pennylane.ops.qubit.observables import BasisStateProjector, StateVectorProjector
label_desc: Use image node_id 3 for calling the TestHermitian obj's underlying member method code with example usage: obj.test_ragged_input_raises() without return types