def R4g(): """ """ A = Ugde(b, t1 + t2 + t3) * Uedg(b, t1 + t2) * Ugde(a, t1) return evaluate_cumulant(A)
def R2fs(): """ """ A = (Ugde(b, t1) * Uedg(b, t1 + t2 + t3) * Ugde(f, t1 + t2 + t3) * Uedg(f, t1 + t2) * Ugde(a, t1 + t2)) return evaluate_cumulant(A)
def print_R2fst(): """ """ A = Uedg(b, t3) * Ugde(f, t3) print(evaluate_cumulant(A)) B = Ugde(a, t1) print(evaluate_cumulant(B))
def print_trans_R2g(): """ """ A = (Uedg(a, t1 + tau) * Ugde(b, t1 + tau) * Uedg(b, t1 + t2) * Ugde(b, t1 + t2 + t3) * Uedg(b, t1 + tau) * Ugde(a, t1 + tau) * Uedg(a, t1)) print(evaluate_cumulant(A))
def print_R1gt(): """ """ A = Ugde(b, t3) print(evaluate_cumulant(A)) B = Ugde(a, t1) print(evaluate_cumulant(B))
def R4g(): """ """ A = Ugde(b, t1 + t2 + t3) * Uedg(b, t1 + t2) * Ugde(a, t1) return evaluate_cumulant(A, positive_times=(t1, t2, t3), leading_index=a, arrays=["gg"])
def print_trans_R2g(): """ """ A = (Uedg(a, t1 + tau) * Ugde(b, t1 + tau) * Uedg(b, t1 + t2) * Ugde(b, t1 + t2 + t3) * Uedg(b, t1 + tau) * Ugde(a, t1 + tau) * Uedg(a, t1)) print( evaluate_cumulant(A, positive_times=(t1, t2, t3), leading_index=a, arrays=["gg"]))
def print_R2fst(): """ """ A = Uedg(b, t3) * Ugde(f, t3) print( evaluate_cumulant(A, positive_times=(t1, t2, t3), leading_index=a, arrays=["gg"])) B = Ugde(a, t1) print( evaluate_cumulant(B, positive_times=(t1, t2, t3), leading_index=a, arrays=["gg"]))
def oneex_twoex(): A = Uedg(f, t1) * Ugde(a, t1) print( evaluate_cumulant(A, positive_times=(t1, ), leading_index=a, arrays="gg"))
def test(): A = Uged(a, t1 + t2) * Ugde(d, t3) * Uegd(a, t2) print( evaluate_cumulant(A, positive_times=(t1, t2, t3), leading_index=a, arrays=["gg"]))
def generate_nth_order_R2g(states_tuple, times_tuple): order = len(states_tuple) if order != len(times_tuple): raise Exception("Wrong tuple/list length") # starting state a = states_tuple[0] # final state (can be the same as starting) b = states_tuple[len(states_tuple) - 1] # final time (must be t2) tt = times_tuple[len(times_tuple) - 1] AL = Uged(a, t1) Amid = Uedg(b, tt) * Ugde(b, t3 + tt) filL = 1 filR = 1 for k in range(len(times_tuple) - 1): tau = times_tuple[k] s1 = states_tuple[k] s2 = states_tuple[k + 1] filL = filL * Uedg(s1, tau) * Ugde(s2, tau) filR = Uedg(s2, tau) * Ugde(s1, tau) * filR A = AL * filL * Amid * filR print(A) print( evaluate_cumulant(A, positive_times=(t1, tt, t3), leading_index=a, arrays=["gg"]))
def print_trans_R2g_alt2(): """ """ #A = (Uedg(a,t1+tau)*Ugde(b,t1+tau)*Uedg(b,t1+t2)*Ugde(b,t1+t2+t3) # *Uedg(b,t1+tau)*Ugde(a,t1+tau)*Uedg(a,t1)) #A = (Uged(a,t1)*Uedg(a,tau1)*Ugde(b,tau1)*Uedg(b,t2)*Ugde(b,t2+t3)*Uedg(b,tau1)*Ugde(a,tau1)) A = (Uged(a, t1 + tau1) * Uedg(b, t2 - tau1) * Ugde(b, t2 + t3 - tau1) * Uegd(a, tau1)) print( evaluate_cumulant(A, positive_times=(t1, t2, t3), leading_index=a, arrays=["gg"]))
= Uged(e,T)*Uedg(a,t)*Ugde(b,t)*Uedg(c,t-tau)*Ugde(d,t-tau)*Uegd(d,T) """ m = Symbol('m') n = Symbol('n') t1 = Symbol('t1') k = Symbol('k') k1 = Symbol('k1') #A = Uged(n,T)*Uedg(n,tau)*ExpdV(a,tau,x)*Ugde(m,tau)*ExpdV(b,0,y)*Uegd(n,T) #A = Uged(b,T)*ExpdV(n,0,x)*Uegd(a,tau)*ExpdV(m,-tau,y)*Uged(b,tau)*Uegd(b,T) #A = Uedg(b,t)*ExpdV(m,0,x)*Ugde(a,t)*Uedg(a,tau)*ExpdV(n,0,y)*Ugde(b,tau) A = Uedg(b,t)*ExpdV(m,t,x)*Ugde(a,t)*Uedg(a,tau)*ExpdV(n,tau,y)*Ugde(b,tau) #A = Uedg(b,t)* Ugde(a,t-tau)* Ugde(b,tau) #A = Uedg(b,tau)*ExpdV(m,tau,x)*Ugde(a,tau)*Uedg(a,0)*ExpdV(n,0,y)*Ugde(a,0) #A = Uedg(b,t)*ExpdV(m,t,x)*Ugde(a,t)*Uedg(a,tau)*ExpdV(n,tau,y)*Ugde(a,tau) Anorm = Uged(n,T)*Uegd(n,T) verbatim = True if verbatim: print(" ") print("Expression to evaluate: ") print(" ") print(" Tr_bath{",A,"W_eq}") print(" ")
#A = Uedg(b,t)*ExpdV(m,0,x)*Ugde(a,t)*Uedg(a,tau)*ExpdV(n,0,y)*Ugde(b,tau) #A = Uedg(b,t)*ExpdV(m,t,x)*Ugde(a,t)*Uedg(a,tau)*ExpdV(n,tau,y)*Ugde(b,tau) #A = Uedg(b,t)* Ugde(a,t-tau)* Ugde(b,tau) #A = Uedg(b,tau)*ExpdV(m,tau,x)*Ugde(a,tau)*Uedg(a,0)*ExpdV(n,0,y)*Ugde(a,0) #A = Uedg(b,t)*ExpdV(m,t,x)*Ugde(a,t)*Uedg(a,tau)*ExpdV(n,tau,y)*Ugde(a,tau) #A = Uged(e,T)*Uedg(a,t)*Ugde(b,t)*Uedg(c,t-tau)*Ugde(d,t-tau)*Uegd(d,T) """ Parts of the relaxation tensor """ part = "test3" """ M1 K """ if part == "M1_K": A = Uged(b,T)*Uedg(b,t)*ExpdV(m,t,x)*Ugde(a,t)*Uedg(a,t-tau)\ *ExpdV(n,t-tau,y)*Ugde(b,t-tau)*Uegd(b,T) use_norm = False Anorm = Uged(n,T)*Uegd(n,T) nderiv = 2 filename = "m1_K.txt" elif part == "M1_H": pass elif part == "K_bk":
= <\Psi_g|Dagger(U_e(T))Dagger(U_a(t))<a|dV|b>U_b(t)Dagger(U_c(t-tau)) <c|dV|d>U_d(t-tau)U_d(T)|\Psi_g> = <\Psi_g|[U_g(T)Dagger(U_e(T))][Dagger(U_a(t))U_g(t)][Dagger(U_g(t)U_b(t)] x [Dagger(U_c(t-tau))U_g(t-tau)][Dagger(U_g(t-tau)U_d(t-tau)] x [U_d(T)Dagger(U_g(T))]|\Psi_g> = Uged(e,T)*Uedg(a,t)*Ugde(b,t)*Uedg(c,t-tau)*Ugde(d,t-tau)*Uegd(d,T) """ m = Symbol('m') n = Symbol('n') t1 = Symbol('t1') A = Uged(n, T) * Uedg(n, tau) * ExpdV(a, tau, x) * Ugde(m, tau) * ExpdV( b, 0, y) * Uegd(n, T) A = Uged(b, T) * ExpdV(n, 0, x) * Uegd(a, tau) * ExpdV(m, -tau, y) * Uged( b, tau) * Uegd(b, T) Anorm = Uged(n, T) * Uegd(n, T) verbatim = True if verbatim: print(" ") print("Expression to evaluate: ") print(" ") print(" Tr_bath{", A, "W_eq}") print(" ") print("The expression is normalized by:")
<a|H(t)|b><c|W|d> = J_ac*<\Psi_d|Dagger(U_a(t))*U_b(t)|\Psi_c>/Norm = J_ac*<\Psi_g|U_g(T)Dagger(U_d(T))Dagger(U_a(t))U_g(t) x Dagger(U_g(t))U_b(t)U_c(T)Dagger(U_g(T))|\Psi_g>/Norm = J_ac*<\Psi_g|[U_g(T)Dagger(U_d(T))][Dagger(U_a(t))U_g(t)] x [Dagger(U_g(t))U_b(t)][U_c(T)Dagger(U_g(T))]|\Psi_g> x Norm^-1 => Uged(d,T)*Uedg(a,t)*Ugde(b,t)*Uegd(c,T)*(1/Norm) Norm = Uged(d,T)*Uegd(c,T) """ A = Uged(d,T) *Uedg(a,t)*Ugde(b,t)* Uegd(c,T) Anorm = Uged(d,T)*Uegd(c,T) verbatim = False if verbatim: print(" ") print("Expression to evaluate: ") print(" ") print("Tr_bath{",A,"W_eq}") print(" ") print(" ") A = A.rewrite(gg)
<a|H(t)|b><c|H(t-tau)|d><d|W|e> = <\Psi_e|<a|H(t)|b><c|H(t-tau)|d>|\Psi_d> = <\Psi_g|Dagger(U_e(T))Dagger(U_a(t))U_b(t)Dagger(U_c(t-tau))U_d(t-tau) x U_d(T)|\Psi_g> = <\Psi_g|[U_g(T)Dagger(U_e(T))][Dagger(U_a(t))U_g(t)][Dagger(U_g(t)U_b(t)] x [Dagger(U_c(t-tau))U_g(t-tau)][Dagger(U_g(t-tau)U_d(t-tau)] x [U_d(T)Dagger(U_g(T))]|\Psi_g> = Uged(e,T)*Uedg(a,t)*Ugde(b,t)*Uedg(c,t-tau)*Ugde(d,t-tau)*Uegd(d,T) """ A = Uged(e, T) * Uedg(a, t) * Ugde(b, t) * Uedg(c, t - tau) * Ugde( d, t - tau) * Uegd(d, T) Anorm = Uged(e, T) * Uegd(d, T) verbatim = True if verbatim: print(" ") print("Expression to evaluate: ") print(" ") print(" Tr_bath{", A, "W_eq}") print(" ") print("The expression is normalized by:") print(" ") print(" Tr_bath{", Anorm, "W_eq}") print(" ")