def METHOD_NAME(self):
    """Test that if any tensor passed to operators is on the GPU then CUDA
    is set internally as a device option for 'default.qubit.torch'."""
    n_qubits = 3
    n_layers = 1
    dev = qml.device("default.qubit", wires=n_qubits)
    @qml.qnode(dev)
    def circuit(inputs, weights):
        qml.templates.AngleEmbedding(inputs, wires=range(n_qubits))
        qml.templates.BasicEntanglerLayers(weights, wires=range(n_qubits))
        return [qml.expval(qml.PauliZ(wires=i)) for i in range(n_qubits)]
    weight_shapes = {"weights": (n_layers, n_qubits)}
    qlayer = qml.qnn.TorchLayer(circuit, weight_shapes)
    x = torch.rand((5, n_qubits), dtype=torch.float64).to(torch.device("cuda"))
    res = qlayer(x)
    assert circuit.device.short_name == "default.qubit.torch"
    assert "cuda" in circuit.device._torch_device
    assert res.is_cuda
    loss = torch.sum(res).squeeze()
    loss.backward()
    assert loss.is_cuda