示例#1
0
def Admiss(State, vertices, K):
    # Check the coupling rules
    if (qdfs.prod([
            qdfs.Delt(State[vertices[nn][0]], State[vertices[nn][1]],
                      State[vertices[nn][2]], K)
            for nn in xrange(len(vertices))
    ])):
        return True
    else:
        return False
示例#2
0
def Bfacesparalel(subs, Face, outedges, InFace, OutFace, K):
    # method checks for out-edges before calculating ME
    Edges = 6  # ATTENTION: just works with 6-faced hexagon
    return [(qdfs.DT(K)**(-2) * sum([
        qdfs.vi(mm, K)**2 * qdfs.prod([
            qdfs.FS(StateN[InFace[Face][(nn + 1) % Edges]],
                    StateN[OutFace[Face][nn]], StateN[InFace[Face][nn]],
                    StateJ[InFace[Face][nn]], mm, StateJ[InFace[Face][
                        (nn + 1) % Edges]], K) for nn in xrange(Edges)
        ]) for mm in xrange(K + 1)
    ])) for StateN in subs for StateJ in subs]
示例#3
0
        def Admissmemo(statenum):

            State = TJ[statenum]
            if (qdfs.prod([
                    qdfs.Delt(State[vertices[nn][0]], State[vertices[nn][1]],
                              State[vertices[nn][2]], Ktilde)
                    for nn in xrange(len(vertices))
            ])):
                return True
            else:
                return False
示例#4
0
def Bface_half_paralel(subs, Face, outedges, InFace, OutFace, K):
    if onlyintegers:
        m = 2  # Notation of twice the spin to work only with integers
    else:
        m = 1  # Notation of twice the spin to work only with integers

    # method checks for out-edges before calculating ME
    Edges = 6  # ATTENTION: just works with 6-faced hexagon
    return [(1 / (qdfs.vi(m, K)**2) * qdfs.prod([
        qdfs.FS(
            StateN[InFace[Face][(nn + 1) % Edges]], StateN[OutFace[Face][nn]],
            StateN[InFace[Face][nn]], StateJ[InFace[Face][nn]], m,
            StateJ[InFace[Face][(nn + 1) % Edges]], K) for nn in xrange(Edges)
    ])) for StateN in subs for StateJ in subs]
示例#5
0
 def Bface(StateN, StateJ, Face, K):
     if [StateN[nn] for nn in outedges[Face]
         ] == [StateJ[nn] for nn in outedges[Face]]:
         return (qdfs.DT(K)**(-2) * sum([
             qdfs.vi(mm, K)**2 * qdfs.prod([
                 qdfs.FS(StateN[InFace[Face][(nn + 1) % Edges]], StateN[
                     OutFace[Face][nn]], StateN[InFace[Face][nn]],
                         StateJ[InFace[Face][nn]], mm,
                         StateJ[InFace[Face][(nn + 1) % Edges]], K)
                 for nn in xrange(Edges)
             ]) for mm in xrange(K + 1)
         ]))
     else:
         return 0
示例#6
0
def Bfacetildes(statenumN, statenumJ, Face, K):
    # method checks for out-edges before calculating ME
    if Admissmemo(statenumN) and Admissmemo(statenumJ):
        StateN, StateJ = TJ[statenumN], TJ[statenumJ]
        return (qdfs.DT(K)**(-2) * sum([
            qdfs.vi(mm, K)**2 * qdfs.prod([
                qdfs.FS(StateN[InFace[Face][(nn + 1) % Edges]],
                        StateN[OutFace[Face][nn]], StateN[InFace[Face][nn]],
                        StateJ[InFace[Face][nn]], mm, StateJ[InFace[Face][
                            (nn + 1) % Edges]], K) for nn in xrange(Edges)
            ]) for mm in xrange(K + 1)
        ]))

    else:
        return 0
示例#7
0
        def Bface_half(StateN, StateJ, Face, K):
            if onlyintegers:
                m = 2  # Notation of twice the spin to work only with integers
            else:
                m = 1  # Notation of twice the spin to work only with integers

            if [StateN[nn] for nn in outedges[Face]
                ] == [StateJ[nn] for nn in outedges[Face]]:
                return (1 / (qdfs.vi(m, K)**2) * qdfs.prod([
                    qdfs.FS(StateN[InFace[Face][(nn + 1) % Edges]],
                            StateN[OutFace[Face][nn]],
                            StateN[InFace[Face][nn]], StateJ[InFace[Face][nn]],
                            m, StateJ[InFace[Face][(nn + 1) % Edges]], K)
                    for nn in xrange(Edges)
                ]))
            else:
                return 0
示例#8
0
 def Bfacetilde(statenumN, statenumJ, Face, K):
     if Admissmemo(statenumN) and Admissmemo(statenumJ):
         StateN, StateJ = TJ[statenumN], TJ[statenumJ]
         if [StateN[nn] for nn in outedges[Face]
             ] == [StateJ[nn] for nn in outedges[Face]]:
             return (qdfs.DT(K)**(-2) * sum([
                 qdfs.vi(mm, K)**2 * qdfs.prod([
                     qdfs.FS(StateN[InFace[Face][
                         (nn + 1) % Edges]], StateN[OutFace[Face][nn]],
                             StateN[InFace[Face][nn]],
                             StateJ[InFace[Face][nn]], mm,
                             StateJ[InFace[Face][(nn + 1) % Edges]], K)
                     for nn in xrange(Edges)
                 ]) for mm in xrange(K + 1)
             ]))
         else:
             return 0
     else:
         return 0