qml.interfaces.torch.kwargs_to_numpy

kwargs_to_numpy(kwargs)[source]

Converts all Torch tensors in a dictionary to NumPy arrays

Parameters

args (dict) – dictionary containing QNode keyword arguments, including Torch tensors

Returns

returns the same dictionary, with all Torch tensors converted to NumPy arrays

Return type

dict