def get_terms(subix, prefix, binstate, br, ix0):
    """
    Spins are put in explicitly
    """
    j = 0
    s = ''
    if len(subix) == 0:
        return s
    for i in range(len(subix[0])):
        s += '+' + prefix + br[0] + str(j + ix0) + br[1]
        for k in range(len(subix)):
            s += '*s' + br[0] + str(subix[k][i]) + br[1]
        j += 1
    if s == '':
        s = '+0'
    return s
