def kronecker_delta(i, j):
    """
    kronecker_delta Delta function: \delta_{i, j}

    Parameters
    ----------
    i: tensor index
    j: tensor index

    Returns
    -------
    1 if i==j, 0 otherwise

    """
    if i == j:
        return 1
    else:
        return 0