class_docstr: Test that the template is differentiable.
class_docstr_tok: ["Test","that","the","template","is","differentiable","."]
docstr: Test that the template is differentiable for different inputs.
docstr_tok: ["Test","that","the","template","is","differentiable","for","different","inputs","."]
code: def test_template_differentiable(
      self,
      block,
      n_params_block,
      wires,
      n_block_wires,
      template_weights,
  ):
      """Test that the template is differentiable for different inputs."""
      dev = qml.device("default.qubit", wires=wires)
  
      @qml.qnode(dev)
      def circuit(template_weights):
          qml.MERA(
              wires,
              n_block_wires,
              block,
              n_params_block,
              template_weights,
          )
          return qml.expval(qml.PauliZ(wires=wires[-1]))
  
      qml.grad(circuit)(
          qml.numpy.array(template_weights, requires_grad=True)
      )
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.templates.tensornetworks.mera import MERA, compute_indices
label_desc: Use image node_id 1 for calling the TestDifferentiability obj's underlying member method code with example usage: obj.test_template_differentiable(block, n_params_block, wires, n_block_wires, template_weights) and returns: qml