qml.math.sqrt

sqrt(tensor)[source]

Returns the element-wise square root.

Parameters

tensor (tensor_like) – input tensor

Returns

Return type

tensor_like

Example

>>> a = torch.tensor([4., 9.], requires_grad=True)
>>> sqrt(a)
tensor([2., 3.], grad_fn=<SqrtBackward>)