class_docstr: Tests for the batch_transform decorator differentiability
class_docstr_tok: ["Tests","for","the","batch_transform","decorator","differentiability"]
docstr: Analytic expectation value of the above circuit qfunc
docstr_tok: ["Analytic","expectation","value","of","the","above","circuit","qfunc"]
code: def expval(x, weights):
      """Analytic expectation value of the above circuit qfunc"""
      return np.cos(weights[1] * np.cos(x)) + np.cos(
          weights[0] * np.sin(x)
      )
  
imports: import functools
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 3 for calling the TestBatchTransformGradients obj's underlying member method code with example usage: obj.expval(x, weights) and returns: unknown