class_docstr: Tests for integration with higher level components of PennyLane.
class_docstr_tok: ["Tests","for","integration","with","higher","level","components","of","PennyLane","."]
docstr: Test that a PassthruQNode default.mixed.autograd works with templates.
docstr_tok: ["Test","that","a","PassthruQNode","default.mixed.autograd","works","with","templates","."]
code: def test_template_integration(self):
      """Test that a PassthruQNode default.mixed.autograd works with templates."""
      dev = qml.device("default.mixed", wires=2)
  
      @qml.qnode(dev, diff_method="backprop")
      def circuit(weights):
          qml.templates.StronglyEntanglingLayers(weights, wires=[0, 1])
          return qml.expval(qml.PauliZ(0))
  
      shape = qml.templates.StronglyEntanglingLayers.shape(
          n_layers=2, n_wires=2
      )
      weights = np.random.random(shape, requires_grad=True)
  
      grad = qml.grad(circuit)(weights)
      assert grad.shape == weights.shape
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.devices.default_mixed import DefaultMixed
  from pennylane import DeviceError
label_desc: Use image node_id 1 for calling the TestHighLevelIntegration obj's underlying member method code with example usage: obj.test_template_integration() and returns: qml