mirror of
https://github.com/vale981/master-thesis
synced 2025-03-08 19:31:40 -05:00
79 lines
1.6 KiB
Python
79 lines
1.6 KiB
Python
|
import matplotlib.pyplot as plt
|
|||
|
from hopsflow import gaussflow_two as gf
|
|||
|
import utilities as ut
|
|||
|
import hops.util.bcf
|
|||
|
import numpy as np
|
|||
|
|
|||
|
t_max = 5
|
|||
|
bcf_1 = hops.util.bcf.OhmicBCF_zeroTemp(
|
|||
|
1,
|
|||
|
1,
|
|||
|
1,
|
|||
|
)
|
|||
|
|
|||
|
bcf_2 = hops.util.bcf.OhmicBCF_zeroTemp(
|
|||
|
.3,
|
|||
|
1,
|
|||
|
3,
|
|||
|
)
|
|||
|
|
|||
|
α_0_1 = gf.BCF(
|
|||
|
t_max,
|
|||
|
bcf_1,
|
|||
|
num_terms=2,
|
|||
|
resolution=0.01,
|
|||
|
)
|
|||
|
|
|||
|
α_1 = gf.BCF(
|
|||
|
t_max,
|
|||
|
hops.util.bcf.OhmicBCF_nonZeroTemp(s=1, eta=1, w_c=1, beta=1 / 2),
|
|||
|
num_terms=3,
|
|||
|
resolution=0.01,
|
|||
|
)
|
|||
|
|
|||
|
α_0_2 = gf.BCF(
|
|||
|
t_max,
|
|||
|
bcf_2,
|
|||
|
num_terms=1,
|
|||
|
resolution=0.01,
|
|||
|
)
|
|||
|
|
|||
|
params = gf.SystemParams(Ω=1, Λ=1, η=[1, 1], γ=0, α_0=[α_0_1, α_0_1])
|
|||
|
t_points = np.linspace(0, t_max, 100)
|
|||
|
|
|||
|
G = gf.Propagator(params)
|
|||
|
|
|||
|
initial_state = np.array([1,0,2,0])
|
|||
|
traj = G(t_points) @ initial_state
|
|||
|
with ut.hiro_style():
|
|||
|
plt.plot(t_points, traj[:, [0,2]])
|
|||
|
|
|||
|
C = gf.CorrelationMatrix(params,gf.initial_correlation_pure_osci(1 , 1), [α_1, α_1])
|
|||
|
|
|||
|
energy = C.system_energy(t_points)
|
|||
|
|
|||
|
with ut.hiro_style():
|
|||
|
plt.plot(t_points, energy)
|
|||
|
|
|||
|
flow = [C.flow(t_points, i) for i in range(2)]
|
|||
|
|
|||
|
with ut.hiro_style():
|
|||
|
plt.plot(t_points, flow[0])
|
|||
|
plt.plot(t_points, flow[1])
|
|||
|
|
|||
|
from hopsflow import gaussflow as gf_old
|
|||
|
params_old = gf_old.SystemParams(Ω=params.Λ, η=params.η[1], α_0=α_0_1)
|
|||
|
α_0_dot = gf.BCF(
|
|||
|
t_points[-1],
|
|||
|
factors=-α_0_1.exponents * α_0_1.factors,
|
|||
|
exponents=α_0_1.exponents,
|
|||
|
|
|||
|
)
|
|||
|
old_flow = gf_old.Flow(params_old, α_1, α_0_dot, n=1)(t_points)
|
|||
|
|
|||
|
with ut.hiro_style():
|
|||
|
|
|||
|
plt.plot(t_points, old_flow)
|
|||
|
plt.plot(t_points, flow[0])
|
|||
|
plt.plot(t_points, flow[1])
|