コード例 #1
0
def action_hopping_second(x, y, **args):

    ll = args.get("ll")
    BASE_bin = args.get("BASE_bin")
    t = args.get("t")

    state_x = BASE_bin[x]
    bosecon_x = ff.TO_bose_conf(state_x, ll)

    state_y = BASE_bin[y]
    bosecon_y = ff.TO_bose_conf(state_y, ll)

    jump_cd = np.argmin(bosecon_x - bosecon_y)
    jump_c = np.argmax(bosecon_x - bosecon_y)

    rem = (jump_c + 1) % ll

    if rem == jump_cd:
        direction = 'right'
        hop = np.conjugate(t)
    elif jump_c == jump_cd:
        direction = 'stand'
    else:
        direction = 'left'
        hop = t


#	print(bosecon_x,bosecon_y,direction)

    result = np.sqrt((bosecon_x[jump_cd] + 1) * (bosecon_x[jump_c]))

    return hop * result
コード例 #2
0
def action_interactions(state, **args):

    ll = args.get("ll")
    U = args.get("U")

    bosecon = ff.TO_bose_conf(state, ll)
    int_val = 0.5 * U * np.dot(bosecon, bosecon - 1.)

    return int_val
コード例 #3
0
def action_potential(state, **args):

    ll = args.get("ll")
    bar = args.get("bar")

    pot = np.zeros(ll, dtype=np.float)
    pot[0] = bar

    bosecon = ff.TO_bose_conf(state, ll)
    bar_val = np.dot(pot, bosecon)
    #	print(pot)
    #	print(bosecon)
    #	print(bar_val)

    return bar_val