class_docstr: Unit tests for the pwc_from_function decorator
class_docstr_tok: ["Unit","tests","for","the","pwc_from_function","decorator"]
docstr: Tests that the pwc function returns a callable with arguments (fn), which if
  passed in turn returns a callable with arguments (params, t)
docstr_tok: ["Tests","that","the","pwc","function","returns","a","callable","with","arguments","(","fn",")",",","which","if","passed","in","turn","returns","a","callable","with","arguments","(","params",",","t",")"]
code: def test_pwc_from_function_returns_callable(self):
      """Tests that the pwc function returns a callable with arguments (fn), which if
      passed in turn returns a callable with arguments (params, t)"""
  
      def f(x):
          return x**2
  
      c1 = qml.pulse.pwc_from_function(10, 10)
      c2 = c1(f)
  
      argspec1 = inspect.getfullargspec(c1)
      argspec2 = inspect.getfullargspec(c2)
  
      assert callable(c1)
      assert callable(c2)
      assert argspec1.args == ["fn"]
      assert argspec2.args == ["params", "t"]
  
imports: import inspect
  from functools import partial
  import numpy
  import pytest
  import pennylane
  from pennylane.pulse.parametrized_hamiltonian import ParametrizedHamiltonian
label_desc: Use image node_id 1 for calling the TestPWC_from_function obj's underlying member method code with example usage: obj.test_pwc_from_function_returns_callable() and returns: unknown