Exemple #1
0
def bosonicConfigurations(L, N):
    '''Input: 1D Lattice Size and Number of Bosons
    Output: All possible configurations of bosons'''

    #List that will store all configurations
    configurations = []

    #Store ordered partitions of N as a list
    partitions = list(ordered_partitions(N))

    for p in partitions:
        #BH Lattice containing a partition of N followed by zeros
        auxConfig = [0] * L
        auxConfig[0:len(p)] = p

        #Generate permutations based on current partition of N
        partitionConfigs = list(multiset_permutations(auxConfig))

        #Append permutations of current partition to list containing all configurations
        configurations += partitionConfigs

    #Promote configurations list to numpy array
    configurations = np.array(configurations)

    return configurations
Exemple #2
0
    def __init__(self, k):
        self.k = k
        Partitions = [p[::-1] for p in ordered_partitions(self.k)]
        self.Dic = {}
        M = [Memo(i).Data for i in range(self.k)]
        for p in Partitions:
            Deco = PartsStocker(p).Dic

            for q in Partitions:
                self.Dic[str(p)+str(q)] =sum(\
                [x[1] * M[sum(x[0])][str(x[0])+str(q[1:])] for x in Deco[q[0]]])
Exemple #3
0
    def __init__(self, k):
        self.k = k

        # Generating partitions of k in the non-increasing order.
        self.YoungDiagram = [p[::-1] for p in ordered_partitions(self.k)]
        # Making n into a symbol.
        n = Symbol('n')
        # Maling a list of reciprocals of Schur polynomials for all Young Diagrams.
        # [[permutation, Schur poly],[,],...]
        self.ReciprocalList =\
        { str(p): self.SchurPolyReciprocal(p,n)  for p in self.YoungDiagram}
Exemple #4
0
    def __init__(self, k):

        self.k = k
        # Generating all the partitions of k in the non-increasing order.
        self.Partitions = [p[::-1] for p in ordered_partitions(self.k)]

        # reading or making lists of characters and Schur's.
        self.SGC = SGCTOganizer(self.k).Dic
        self.SP = SchurPolyOganizer(self.k).List

        # Making a list of Weingarten functions.
        # [[partition type, the function],[],...]
        self.List = [[p, self.Weingarten(p)] for p in self.Partitions]
Exemple #5
0
def Partitions(n, outer, inner):
    '''
    bounded partitions
    '''
    for p in ordered_partitions(n):
        p.reverse()
        if len(p) >= len(inner) and len(p) <= len(outer):
            bounded = True
            for i in range(len(p)):
                if p[i] > outer[i]:
                    bounded = False
                if i < len(inner):
                    if p[i] < inner[i]:
                        bounded = False
            if bounded:
                yield p