def tuple2str(t, n):
    """
    Returns string representation of product state.

    Parameters
    ----------
    t : tuple
        Product state.
    n : int
        Total number of spin-orbitals in the system.

    """
    s = ""
    for i in range(n):
        if i in t:
            s += "1"
        else:
            s+= "0"
    return s