class_docstr: Test the utility function _generate_tapes_and_coeffs.
class_docstr_tok: ["Test","the","utility","function","_generate_tapes_and_coeffs","."]
docstr: Test that an error is raised for an operation that is not a pulse.
docstr_tok: ["Test","that","an","error","is","raised","for","an","operation","that","is","not","a","pulse","."]
code: def test_raises_non_pulse_op(self):
      """Test that an error is raised for an operation that is not a pulse."""
      tape = qml.tape.QuantumScript(
          [qml.RX(0.4, 0)], [qml.expval(qml.PauliZ(0))]
      )
      cache = {"total_num_tapes": 0}
      with pytest.raises(
          ValueError,
          match="pulse_odegen does not support differentiating",
      ):
          _generate_tapes_and_coeffs(tape, 0, 1e-6, cache)
  
imports: import copy
  import pytest
  import numpy
  import pennylane
  from pennylane import numpy
  from pennylane.ops.qubit.special_unitary import pauli_basis_matrices, pauli_basis_strings
  from pennylane.math import expand_matrix
  from pennylane.gradients.pulse_gradient_odegen import _generate_tapes_and_coeffs, pulse_odegen, _insert_op, _nonzero_coeffs_and_words, _one_parameter_generators, _one_parameter_paulirot_coeffs, _parshift_and_contract
label_desc: Use image node_id 4 for calling the TestGenerateTapesAndCoeffs obj's underlying member method code with example usage: obj.test_raises_non_pulse_op() without return types