Example #1
0
def W(w1, k1, L1, w2, k2, L2, w3, k3, L3, r, c1=0, c2=0, c3=0):
    """
    Calculates the SO(3) reduced SU(3) wigner coupling coefficients
    Note 
    
    """
    W = 0.0
    if (c1 + c2 + c3) == 0:
        wdic = Wreduced_su3_dic(w1, L1, w2, L2, w3, L3)
        ######add conjugate
        #print wdic
        if (r, k1, k2, k3) in wdic:
            W = wdic[r, k1, k2, k3]
    if (c1, c2, c3) == (1, 0, 0):
        rpmax = mult(w1, w2, w3)
        wdic = Wreduced_su3_dic(w3, L3, w1.conj(), L1, w2, L2)
        for rp in range(1, rpmax + 1):
            W = W + (utils.parity(w2.pt() - w3.pt()) * phi(w1, w2, w3, r, rp) *
                     numpy.sqrt(w3.dim() / w2.dim()) * wdic[rp, k3, k1, k2])
    if (c1, c2, c3) == (0, 1, 0):
        wdic = Wreduced_su3_dic(w3, L3, w2.conj(), L2, w1, L1)
        if (r, k3, k2, k1) in wdic:
            W = (utils.parity(w1.pt() - w3.pt() + L1 + L2 - L3) *
                 numpy.sqrt(w3.dim() / w1.dim()) * wdic[r, k3, k2, k1])
    if (c1, c2, c3) == (0, 0, 1):
        print "unfinished code"
    if (c1 + c2 + c3) >= 2:
        print "unfinished code"
    if abs(W) < 10**(-10):
        W = 0.0

    return W
Example #2
0
def B_asymptotic(psi2red, psi1red, r0=1):
    """
  Calculates the asymptotic approximation of the RME of B in the symplectic basis
  
  args:
    psi2red,psi1red are reduced symplectic basis states (SpStateReduced class)
    r0 is outer multiplicity of psi1redxB->psi2red

  Example:
    s=U3State([20,13,10])
    wp=U3State([22,15,10])
    np=U3State([4,0,0])
    rp=1
    w=U3State([21,14,10])
    n=U3State([2,0,0])
    r=1
    psipred=SpStateReduced(s,np,rp,wp)
    psired=SpStateReduced(s,n,r,w)
    B(psired, psipred) returns 
      -7.13059078469  
    """
    matrix = 0.0
    #check that outer multiplicity is 1, else RME=0
    if r0 == 1:
        w1 = psi1red.w
        w2 = psi2red.w
        #calculate the RME
        matrix = utils.parity(w1.pt() + w2.pt()) * numpy.sqrt(
            w1.dim() / w2.dim()) * A_asymptotic(psi1red, psi2red)
    return matrix
Example #3
0
def B2(psi2red, psi1red, r0=1):
    """
  Alternative method for calculating exact RME of B in the symplectic basis using exact RME of A in symplectic basis
  
  args:
    psi2red, psi1red are reduced symplectic basis states (SpStateReduced class)
    r0 is outer multiplicity of psi1redxB->psi2red (int=1)
 
  Example:
    s=U3([20,13,10])
    wp=U3([22,15,10])
    np=U3([4,0,0])
    rp=1
    w=U3([21,14,10])
    n=U3([2,0,0])
    r=1
    psipred=SpStateReduced(s,np,rp,wp)
    psired=SpStateReduced(s,n,r,w)
    
    B(psipred,psired) returns
      -5.51771905958
  """
    matrix = 0.0
    #check that outer mutliplicity is 1, else RME=0
    if r0 == 1:
        w1 = psi1red.w
        w2 = psi2red.w
        #calculate RME
        matrix = utils.parity(w1.pt() + w2.pt()) * numpy.sqrt(
            w1.dim() / w2.dim()) * A(psi1red, psi2red, r0)
    return matrix
Example #4
0
def B(psipred, psired, r0=1):
    """
  Calculates (s np rp wp||a||s n r w). 

  Args:

  Returns: 
    Matrix element (s np rp wp||a||s n r w).  For example
      w=U3State([22,15,10])
      n=U3State([4,0,0])
      r=1
      wp=U3State([21,14,10])
      np=U3State([2,0,0])
      rp=1
      s=U3State3([20,13,10])
      B_weylboson(s,np,rp,wp,n,r,w)
    returns
      -1.28102523044
  """
    matrix = 0.0
    if r0 == 1:
        w = psired.w
        wp = psipred.w
        matrix = utils.parity(wp.pt() - w.pt()) * numpy.sqrt(
            w.dim() / wp.dim()) * A(psired, psipred)
    return matrix
Example #5
0
def phi(w1, w2, w3, r, rp):
    """
    Phi phase factor that arrises in changing the coupling order of SU(3) irreps 
    """
    phi = 0
    mlt = mult(w1, w2, w3)
    if (mlt < r) or (mult < rp):
        print "invalid multiplicity"
        return phi
    if mlt == 1:
        phi = utils.parity(w1.pt() + w2.pt() - w3.pt())
    else:
        phi = Z_SU3(w1, SU3State(0, 0), w3, w2, w1, 1, r, w2, 1, rp)
    return phi
Example #6
0
def C_n_conj(psipred, psired, r0=1):
    """
  Conjugate matrix element of Cn_weylboson
  """
    matrix = 0.0
    n = psired.n
    np = psipred.n
    if np == n:
        s = psired.s
        r = psired.r
        w = psired.w
        rp = psipred.r
        wp = psipred.w
        matrix = utils.parity(w.pt() - wp.pt()) * numpy.sqrt(
            w.dim() / wp.dim()) * u3.U(s, n, w, SU3State(1, 1), wp, rp, 1, n,
                                       1, r) * u3.C_su3(n)
    return matrix
Example #7
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


#######################################################################################################


def moshinsky(state1, state2, stater, statec, state, type):
    """
	calculates the moshinsky coefficients used to transform between the two-particle and relative-center of mass frames.  
	w1 x w2->w
	wr x wc->w
	type can be either "SU3" or "SO3"
	if type=="SU3":
		state1,state2,stater,statec,state are simply SU3State class 
	if type=="SO3" then state1 etc are (n1,L1) where N1=2*n1+L1 and w1=SU3State(N1,0)
Example #8
0
    args: 
        J1, J2, J3, J4, J5, J6 are angular momenta (int or half int)
    """
    cj9=pygsl.sf.coupling_9j(
        int(2*J1),int(2*J2), int(2*J3),
        int(2*J4),int(2*J5), int(2*J6),
        int(2*J7),int(2*J8), int(2*J9)
        )[0]
    cj9=cj9*hat(J3)*hat(J6)*hat(J7)*hat(J8)
    if abs(cj9)<10**(-13):
        cj9=0.0
    return cj9
if __name__ == '__main__':
    print "coupling_9j",coupling_9j((1,1,1),(2,3,4),(3,4,5))
    print "coupling_9j",coupling_9j((0,.5,.5),(1,.5,.5),(1,1,0))#, coupling_6j((1,1,1),(3,2,3))
    print "coupling_9j",coupling_9j((1,1,1),(1,1,1),(2,2,0)), coupling_6j((1,1,1),(1,1,2))*utils.parity(1+1+1)
    print "coupling_9j",coupling_9j((1,1,0),(1,1,0),(2,2,0)), coupling_6j((1,1,0),(1,1,2))*utils.parity(1+1+0),1.*hat(2)/hat(1)/hat(1)
    print "basis testing"
    print "coupling_9j",coupling_9j((1,.5,.5),(1,.5,.5),(0,0,0))**2
    print "coupling_9j",coupling_9j((1,.5,.5),(1,.5,.5),(1,1,0))**2
    print "coupling_9j",coupling_9j((1,1,0),(0,0,0),(1,1,0))**2
    print "coupling_9j",coupling_9j((1,1,0),(1,1,0),(1,1,0))**2
    print "coupling_9j",coupling_9j((1,1,0),(2,2,0),(1,1,0))**2
    print "test coupling_9j",coupling_9j((2,0,2),(1,0,1),(1,0,1))





############################################################################################################################################################################################
def multJ(J,M):