# qml.math._multi_dispatch¶

_multi_dispatch(values)[source]

Determines the correct framework to dispatch to given a sequence of tensor-like objects.

Parameters

values (Sequence[tensor_like]) – a sequence of tensor like objects

Returns

the name of the interface

Return type

str

To determine the framework to dispatch to, the following rules are applied:

• Tensors that are incompatible (such as Torch and TensorFlow tensors) cannot both be present.

• Autograd tensors may be present alongside Torch and TensorFlow tensors, but Torch and TensorFlow take precendence; the autograd arrays will be treated as non-differentiable NumPy arrays. A warning will be raised suggesting that vanilla NumPy be used instead.

• Vanilla NumPy arrays can be used alongside other tensor objects; they will always be treated as non-differentiable constants.