qml.interfaces.torch.to_torch

to_torch(qnode)[source]

Function that accepts a QNode, and returns a PyTorch-compatible QNode.

Parameters

qnode (QNode) – a PennyLane QNode

Returns

the QNode as a PyTorch autograd function

Return type

torch.autograd.Function