quantnn/generic/__init__.py
def tensordot(module, x, y, axes):
    """
    Calculate tensor product of two tensors.

    Arguments:
        module: The backend array corresponding to the given array.
        x: The left-hand-side operand
        y: The right-hand-side operand
        axes: Integer or pair of integers describing over which axes
            to calculate the tensor product.

    Return:
        The tensor containing the tensor product of the input tensors.
    """
    _import_modules()
    if module in [np, ma]:
        return np.tensordot(x, y, axes)
    elif module == torch:
        return torch.tensordot(x, y, axes)
    elif module == jnp:
        return jnp.tensordot(x, y, axes)
    elif module == tf:
        return tf.tensordot(x, y, axes)
    raise UnknownModuleException(f"Module {module.__name__} not supported.")

    Calculate tensor product of two tensors.

    Arguments:
        module: The backend array corresponding to the given array.
        x: The left-hand-side operand
        y: The right-hand-side operand
        axes: Integer or pair of integers describing over which axes
            to calculate the tensor product.

    Return:
        The tensor containing the tensor product of the input tensors.
    
Calculate tensor product of two tensors.
Calculate tensor product of two tensors .
def tensordot(module, x, y, axes):
    _import_modules()
    if module in [np, ma]:
        return np.tensordot(x, y, axes)
    elif module == torch:
        return torch.tensordot(x, y, axes)
    elif module == jnp:
        return jnp.tensordot(x, y, axes)
    elif module == tf:
        return tf.tensordot(x, y, axes)
    raise UnknownModuleException(f"Module {module.__name__} not supported.")
def tensordot ( module , x , y , axes ) : _import_modules ( ) if module in [ np , ma ] : return np . tensordot ( x , y , axes ) elif module == torch : return torch . tensordot ( x , y , axes ) elif module == jnp : return jnp . tensordot ( x , y , axes ) elif module == tf : return tf . tensordot ( x , y , axes ) raise UnknownModuleException ( f"Module {module.__name__} not supported." )
Calculate tensor product of two tensors.
Calculate tensor product of two tensors .
"""
    Calculate tensor product of two tensors.

    Arguments:
        module: The backend array corresponding to the given array.
        x: The left-hand-side operand
        y: The right-hand-side operand
        axes: Integer or pair of integers describing over which axes
            to calculate the tensor product.

    Return:
        The tensor containing the tensor product of the input tensors.
    """
module
The backend array corresponding to the given array.
The backend array corresponding to the given array .
x
The left-hand-side operand
The left - hand - side operand
y
The right-hand-side operand
The right - hand - side operand
axes
Integer or pair of integers describing over which axes
to calculate the tensor product.
Integer or pair of integers describing over which axes to calculate the tensor product .