class_docstr: Test GPU with cuda for Torch device.
class_docstr_tok: ["Test","GPU","with","cuda","for","Torch","device","."]
docstr: Test cuda supported when device created in qnode creation.
docstr_tok: ["Test","cuda","supported","when","device","created","in","qnode","creation","."]
code: def test_integration(self):
      """Test cuda supported when device created in qnode creation."""
  
      dev = qml.device("default.qubit", wires=1)
  
      x = torch.tensor(
          0.1, requires_grad=True, device=torch.device("cuda")
      )
      y = torch.tensor(0.2, requires_grad=True)
  
      @qml.qnode(dev, interface="torch", diff_method="backprop")
      def circ(x, y):
          qml.RX(x, wires=0)
          qml.RY(y, wires=0)
          return qml.expval(qml.PauliZ(0))
  
      res = circ(x, y)
      assert res.is_cuda
  
      assert "cuda" in circ.device._torch_device
      res.backward()
      assert x.grad.is_cuda
  
file_path: pennylane/tests/gpu/test_gpu_torch.py
imports: import pytest
  import pennylane
label_desc: Use image node_id 5 for calling the TestTorchDevice obj's underlying member method code with example usage: obj.test_integration() and returns: qml