예제 #1
0
def irrep_index(s, S, J, Nmax, Nmin=0, indx=0):
    """
	constructs the simplectic irrep starting with lowest grade U(3) states s

	inputs: 
		s: Lowest grade U(3) irrep, U3 class
		S: Spin, integer or half integer
		J: angular momentum: integer or half integer
		Nmax: max number of excitations, integer
		Nmin: Starting excitation level, integer, optional with defaut Nmin=0
		index: Starting indexing number, option, default is indx=0
	output:
		irrep: Dictionary {N: (n,r,w,k,L)}
		index: Dictionary {(n,r,w,k,L):i}
			where n: Raising polynomial U3 content, class U3
				  w: U3 content of states in Sp irrep, class U3
				  r: Multiplicity index of w in sxn->w, integer>0
				  k: branching multiplicity SU(3)->SO(3), integer>0
				  L: Oribtal angular momentum, integer
	"""
    ###initializing dictionarys
    irrep = {}
    index = {}
    SO3branch = {}
    i = indx  # iterator for indexing the basis states
    ###intial calculations
    #generating raising polynomials
    polyset = u3boson.poly(Nmax)
    #generating Symplectic basis states and indexing states
    for N in range(Nmin, Nmax + 1, 2):
        nset = polyset[N]  #generating raising polynomails
        for n in nset:
            wset = u3.couple(s, n)
            for lm in wset:
                if lm not in SO3branch:
                    LKset = so3.branching_so3(
                        lm, S, J, Restrict=True)  #SO3branching_J(lm,mu,lset)
                    SO3branch[lm] = LKset
                #generatoring omega and rhomax
                else:
                    LKset = SO3branch[lm]
                ##########
                if LKset != {}:
                    w = U3State(s.N + N, lm)
                    rmax = wset[lm]
                    ##generating index for matrix states  starting with i=0
                    for r in range(1, rmax + 1):
                        for L in LKset:
                            for k in range(1, LKset[L] + 1):
                                psi = SpState(s, n, r, w, k, L)
                                ##generating nested dictionary irrep with the form {N:(n,rmax,w,k,L,M)}
                                if N in irrep:
                                    irrep[N].append(psi)
                                else:
                                    irrep[N] = [psi]
                                index[psi] = i
                                i = i + 1
    #print "dim", len(index)
    return irrep, index
예제 #2
0
def Sp3RxU2ReducedIrrep(s, S, Nmax):
    """"
	Constructs a canonically sorted list of Sp(3,R)xSU(3) states up to Nmax
	  for given irrep s, sorts by w, n, r

	Args: 
		s: symplectic bandhead (U3State)
		S: spin (int)

	Returns:
		[state1,state2 etc]
	"""
    ## initializing list
    states = []
    ## generating dictionary of all possible raising polynomial labels
    ## dictionary of form {N:[n1,n2,..]}
    PolyDict = u3boson.poly(Nmax)
    ## iterating over N from 0 to Nmax
    for N in range(0, Nmax + 1, 2):
        ## initialize list
        wnset = {}
        ## selecting polynomial labels for each N
        polylist = PolyDict[N]
        ## order polynomial labels cannonically
        polylist_canonical = u3.canonical_sort(polylist)
        ## iterating over n in polylist
        for n in polylist_canonical:
            ## coupling raising polynomials to bandhead
            CoupledDict = u3.couple(s, n)
            ## iterating over generated list of (lbda,mu)
            #wlist_canonical=u3.canonical_sort(CoupledDict.keys())
            for lambdamu in CoupledDict:
                ## converting from SU(2) to U(3)
                w = U3State(s.N + N, lambdamu)
                ## number of times w occurs in kronecker product sxn
                rmax = CoupledDict[lambdamu]
                ## iterating over occurances of w
                if w not in wnset:
                    wnset[w] = []
                wnset[w].append((n, rmax))

        w_canonical = u3.canonical_sort(wnset.keys())
        for w in w_canonical:
            nrset = wnset[w]
            for n, rmax in nrset:
                for r in range(1, rmax + 1):
                    ## appending SpxU2 state to state list
                    state = SpU2StateRed(SpStateReduced(s, n, r, w), S)
                    states.append(state)
    return states
예제 #3
0
파일: sp3r.py 프로젝트: yuguxingzhe/spncci
def CoupledOperators_Sp3R_SO3(operator1,
                              k1,
                              L1,
                              operator2,
                              k2,
                              L2,
                              k0,
                              L0,
                              psip,
                              psi,
                              c1=0,
                              c2=0):
    matrix = 0.0
    w = psi.w
    wp = psip.w
    w1 = operator1.u3
    w2 = operator2.u3
    lm0set = u3.couple(w1, w2)
    for lm0 in lm0set:
        k0max = so3.multk(lm0, L0)
        if k0max == 0:
            continue
        r0pmax = u3.mult(w, lm0, wp)
        r0max = lm0set[lm0]
        for r0 in range(1, r0max + 1):
            for r0p in range(1, r0pmax + 1):
                for k0 in range(1, k0max + 1):
                    matrix = matrix + (
                        u3.W(operator2.u3,
                             k2,
                             L2,
                             operator1.u3,
                             k1,
                             L1,
                             lm0,
                             k0,
                             L0,
                             r0,
                             c1=c2,
                             c2=c1) * u3.W(w, psi.k, psi.L, lm0, k0, L0, wp,
                                           psip.k, psip.L, r0p) *
                        CoupledOperators_Sp3R(operator1, operator2, lm0, r0,
                                              psip.red(), psi.red(), r0p))

    #matrix=numpy.sqrt(2*Lp+1)*matrix
    if abs(matrix) < (10**(-10)):
        matrix = 0.0
    return matrix
예제 #4
0
파일: sp3r.py 프로젝트: yuguxingzhe/spncci
def CoupledOperators_Sp3R(operator1, operator2, w0, r0, psi2, psi1, r0p):
    s = psi1.s
    w1 = psi1.w
    n1 = psi1.n
    r1 = psi1.r
    w2 = psi2.w
    n2 = psi2.n
    r2 = psi2.r
    matrix = 0.0
    m1 = 0
    m2 = 0
    m3 = 0
    if (w1.N + operator1.u3.N + operator2.u3.N) != w2.N:
        return matrix
#coupling w to first tensor
#Checking if operators are C operators and restricting w12 accordingly
    w12set = u3.couple(w1, operator2.u3)
    r1max = u3.mult(s, n1, w1)
    r2max = u3.mult(s, n2, w2)
    for lambdamu12 in w12set:
        mult1 = u3.mult(lambdamu12, operator1.u3, w2)
        #mult1=min(mult1max,r2max)
        if mult1 == 0:
            continue
        mult2 = w12set[lambdamu12]
        #mult2=min(mult2max, r1max)
        w12 = U3State(w1.N + operator2.u3.N, lambdamu12)
        n12set = u3boson.nlist(s, w12)
        if n12set == {}:
            continue
        for n12 in n12set:
            r12max = n12set[n12]
            #mult2=min(mult2max,r12max)
            for r12 in range(1, r12max + 1):
                psi12 = SpStateReduced(s, n12, r12, w12)
                for r1p in range(1, mult1 + 1):
                    for r2p in range(1, mult2 + 1):
                        matrix = matrix + (u3.U(
                            w1, operator2.u3, w2, operator1.u3, w12, r2p, r1p,
                            w0, r0, r0p) * operator1.SU3RME(psi2, psi12, r1p) *
                                           operator2.SU3RME(psi12, psi1, r2p))

    return matrix
예제 #5
0
파일: sp3r.py 프로젝트: yuguxingzhe/spncci
def Sp_irrep_red(s, Nmax):
    """
	constructs a dictioanry of symplectic reduced states sorted according to excitation Nn
	currently just for s.three()>3 but will generalize soon 
	returns dictionary of the form {N:[state1, state2...]}
	"""
    StateDict = {}
    #checking that s is valid unitary U(3) label to serve as bandhead
    if Sp_bandhead_check(s):
        PolyDict = u3boson.poly(Nmax)
        for N in range(0, Nmax + 1, 2):
            polylist = PolyDict[N]
            states = []
            for n in polylist:
                CoupledDict = u3.couple(s, n)
                for lambdamu in CoupledDict:
                    w = U3State(s.N + N, lambdamu)
                    rmax = CoupledDict[lambdamu]
                    for r in range(1, rmax + 1):
                        states.append(SpStateReduced(s, n, r, w))
            StateDict[N] = states
    else:
        print "invalid bandhead"
    return StateDict
예제 #6
0
def smatrix(s, wp, n1p, r1p, n2p, r2p):
    """
    Calculates the matrix element of S=K^2 and stores the calculated value in the global dictionary Sdictioanry
    
    Args: 
      s-Symplectic irrep label (U3state class)
      w-symplectic weight (U3State class)
      (n1,r1p) and (n2,r2p) are symplectic multiplicities of w in s (U3state class, int). 
    Examples 
      s=U3State([20,13,10])
      w=U3State([22,15,10])
      n1=U3State([2,2,0])
      r1=1
      n2=U3State([4,0,0])
      r2=1
      smatrix(s,w,n1,r1,n1,r1) returns 
        1014.0
      Smatrix(s,w,n1,r1,n2,r2) returns 
        -28.9827534924
    """#results are given in Rowe 1984 jmp 25
    np1 = {}
    np2 = {}
    wnp1 = {}
    wnp2 = {}
    Sm = 0
    #############################################################################################
    #Check if the matrix element of S is already calculated and stored in the global dictioanry Sdictionary
    # if stored return matrix element otherwise calcuate the matrix element and store it.
    #############################################################################################
    if (s, wp, n1p, r1p, n2p, r2p) in Sdictionary:
        Sm = Sdictionary[s, wp, n1p, r1p, n2p, r2p]
        return Sm
    #############################################################################################
    #Smatrix Calculation
    #############################################################################################
    # If wp is a bandhead the the matrix element is trivial 1
    if wp == s:
        Sm = 1
    #Otherwise, use recursion relationship to calculate S
    else:
        psi1pred = SpStateReduced(s, n1p, r1p, wp)
        psi2pred = SpStateReduced(s, n2p, r2p, wp)
        ############################################################################################
        #Generating sets of n1 and n2 which will have nonzero u3boson.A_n matrix elements
        ############################################################################################
        #set of allowed n1
        n1set = []
        [m1, m2, m3] = n1p.cartesian()
        if m1 - 2 >= m2:
            n1set.append(U3State([m1 - 2, m2, m3]))
        if m2 - 2 >= m3:
            n1set.append(U3State([m1, m2 - 2, m3]))
        if m3 - 2 >= 0:
            n1set.append(U3State([m1, m2, m3 - 2]))
        #generating list of allowed n2's
        n2set = []
        [m1, m2, m3] = n2p.cartesian()
        if m1 - 2 >= m2:
            n2set.append(U3State([m1 - 2, m2, m3]))
        if m2 - 2 >= m3:
            n2set.append(U3State([m1, m2 - 2, m3]))
        if m3 - 2 >= 0:
            n2set.append(U3State([m1, m2, m3 - 2]))
        ############################################################################################
        #summing over w,n1,r1,n2,r2 to obtain the matrix element of S
        ############################################################################################
        Nw = wp.N - 2
        #compute list of w labels for states that may have nonzero matrix elements of u3boson.A_n
        lmset = u3.couple(wp, SU3State(0, 2))
        #summing over w
        for lm in lmset:
            #converging SU3State lm to U3State w
            w = U3State(Nw, lm)
            #summing over possible n1
            for n1 in n1set:
                #checking for each s, n1, and w if (s, n1,r, w) are a state in the symplectic irrep s
                r1max = u3.mult(s, n1, w)
                if r1max == 0:
                    continue
                #summing over possible
                for n2 in n2set:
                    #checking for each s, n2, and w if (s, n1,r, w) are a state in the symplectic irrep s
                    r2max = u3.mult(s, n2, w)
                    if r2max == 0:
                        continue
                    #suming over r1
                    for r1 in range(1, r1max + 1):
                        psi1red = SpStateReduced(s, n1, r1, w)
                        #summing over r2
                        for r2 in range(1, r2max + 1):
                            psi2red = SpStateReduced(s, n2, r2, w)
                            #calcualting the matrix element of S via a recursion relation
                            Sm = Sm + (
                                omega(n1p, wp) - omega(n1, w)) * u3boson.A(
                                    psi1pred, psi1red) * u3boson.A(
                                        psi2pred, psi2red) * smatrix(
                                            s, w, n1, r1, n2,
                                            r2)  #this will be the calculation
    ##
        Sm = 2 * Sm / (wp.N - s.N)
        #Storing the calculated matrix element of S in a global dictionary
        Sdictionary[(s, wp, n1p, r1p, n2p, r2p)] = Sm
    return Sm
예제 #7
0
def smatrix_asymptotic(s, wp, n1p, r1p, n2p, r2p):
    """
    Calculates the matrix element of S=K^2 using the asymptotic approxiamtion .

    Args: 
      s is the symplectic irrep label (U3state class)
      w is the symplectic weight (U3state class)
      (n1,r1p) and (n2,r2p) are symplectic multiplicities of w in s. (U3State class,int)

    Examples 
      s=U3State([20,13,10])
      w=U3State([22,15,10])
      n1=U3State([2,2,0])
      r1=1
      n2=U3State([4,0,0])
      r2=1
      smatrix_asymptotic(s,w,n1,r1,n1,r1) returns
        1014.0
    """
    #############################################################################################
    # Check if the matrix element of S is already calculated and stored in the global dictioanry Sdictionary
    # if stored return matrix element otherwise calcuate the matrix element and store it.
    #############################################################################################
    if (s, wp, n1p, r1p, n2p, r2p) in SAdictionary:
        SmA = SAdictionary[s, wp, n1p, r1p, n2p, r2p]
    #############################################################################################
    #Smatrix Calculation
    #############################################################################################
    else:
        np1 = {}
        np2 = {}
        wnp1 = {}
        wnp2 = {}
        SmA = 0

        #In asymptotic limit, off diagonal matrix elements are set to zero.
        if (n1p != n2p) or (r1p != r2p):
            SmA = 0.0
        else:
            # If wp is a bandhead the the matrix element is trivial 1
            if wp == s:
                SmA = 1
            #Otherwise, use recursion relationship to calculate S
            else:
                ##############################################################################################
                #Smatrix Calculation
                ##############################################################################################
                psipred = SpStateReduced(s, n1p, r1p, wp)
                #Generating sets of n which will have nonzero u3boson.A_n matrix elements
                nset = []
                nn = U3State([n1p.one() - 2, n1p.two(), n1p.three()])
                if nn.check():
                    nset.append(nn)
                nn = U3State([n1p.one(), n1p.two() - 2, n1p.three()])
                if nn.check():
                    nset.append(nn)
                nn = U3State([n1p.one(), n1p.two(), n1p.three() - 2])
                if nn.check():
                    nset.append(nn)

                #summing over w,n,r
                ##############################################
                Nw = wp.N - 2
                lmset = u3.couple(wp, SU3State(0, 2))
                #generating list of w's and summing over them
                for lm in lmset:
                    w = U3State(Nw, lm)
                    #summing over n
                    for n in nset:
                        #checking state (s,n,r,w) is allowed for  some r
                        rmax = u3.mult(s, n, w)
                        if rmax == 0:
                            continue
                        for r in range(1, rmax + 1):
                            psired = SpStateReduced(s, n, r, w)
                            #Calculating the asymptotic S matrix
                            SmA = SmA + ((omega(n1p, wp) - omega(n, w)) *
                                         u3boson.A(psipred, psired) *
                                         u3boson.A(psipred, psired) *
                                         smatrix_asymptotic(s, w, n, r, n, r))
            ##
                SmA = 2 * SmA / (n1p.N)
        #caching S matrix element in SAdictionary
        SAdictionary[s, wp, n1p, r1p, n2p, r2p] = SmA
    return SmA
예제 #8
0
    return mosh


#####fishy


#######################################################################################################
def mosh_SO3((n1, L1), (n2, L2), (nr, Lr), (nc, Lc), L):
    mosh = 0
    ##defining the SU(3) content of states
    w1 = SU3State(2 * n1 + L1, 0)
    w2 = SU3State(2 * n2 + L2, 0)
    wr = SU3State(2 * nr + Lr, 0)
    wc = SU3State(2 * nc + Lc, 0)
    # generating list of w's
    wset = u3.couple(w1, w2)
    ## summing over w in wset
    for w in wset:
        ## check that w is also in {wrxwc}
        if u3.mult(wr, wc, w) == 0:
            continue
        ## calculate max branching multiplicity of L in w
        kmax = so3.multk(w, L)
        ## summing over branching multplicity from 1 to kmax
        for k in range(1, kmax + 1):
            ## calculating moshinksy coefficient
            mosh = mosh + (u3.W(wr, 1, Lr, wc, 1, Lc, w, k, L, 1) *
                           u3.W(w1, 1, L1, w2, 1, L2, w, k, L, 1) *
                           mosh_SU3(w1, w2, wr, wc, w) *
                           utils.parity(n1 + n2 + nr + nc))
    return mosh