mirror of
https://github.com/vale981/master-thesis
synced 2025-03-05 18:11:42 -05:00
whitespace
This commit is contained in:
parent
799fcb4d24
commit
5169671d6d
1 changed files with 15 additions and 15 deletions
|
@ -58,33 +58,33 @@ Basic parameters.
|
|||
#+begin_src jupyter-python
|
||||
class params:
|
||||
T = 2
|
||||
|
||||
|
||||
t_max = 10
|
||||
t_steps = int(t_max * 1/.01)
|
||||
k_max = 10
|
||||
N = 1000
|
||||
|
||||
|
||||
seed = 100
|
||||
dim = 2
|
||||
H_s = σ3 + np.eye(dim)
|
||||
L = σ2 #1 / 2 * (σ1 - 1j * σ2)
|
||||
ψ_0 = np.array([0, 1])
|
||||
|
||||
|
||||
s = 1
|
||||
num_exp_t = 4
|
||||
|
||||
|
||||
wc = 1
|
||||
|
||||
|
||||
with open("good_fit_data_abs_brute_force", "rb") as f:
|
||||
good_fit_data_abs = pickle.load(f)
|
||||
|
||||
|
||||
alpha = 0.8
|
||||
# _, g_tilde, w_tilde = good_fit_data_abs[(numExpFit, s)]
|
||||
# g_tilde = np.array(g_tilde)
|
||||
# w_tilde = np.array(w_tilde)
|
||||
# g = 1 / np.pi * gamma_func(s + 1) * wc ** (s + 1) * np.asarray(g_tilde)
|
||||
# w = wc * np.asarray(w_tilde)
|
||||
|
||||
|
||||
bcf_scale = np.pi / 2 * alpha * wc ** (1 - s)
|
||||
#+end_src
|
||||
|
||||
|
@ -1067,11 +1067,11 @@ And try to calculate the energy flow.
|
|||
a = np.array((params.L @ ψ_0.T).T)
|
||||
EtaTherm.new_process(temp_y)
|
||||
η_dot = scipy.misc.derivative(EtaTherm, int_result.τ, dx=1e-3, order=5)
|
||||
|
||||
|
||||
ψ_1 = (-w * g * params.bcf_scale)[None, :, None] * ψ_1.reshape(
|
||||
params.t_steps, params.num_exp_t, params.dim
|
||||
)
|
||||
|
||||
|
||||
# return np.array(np.sum(ψ_0.conj() * ψ_0, axis=1)).flatten().real
|
||||
j_0 = np.array(
|
||||
2
|
||||
|
@ -1081,7 +1081,7 @@ And try to calculate the energy flow.
|
|||
/ np.sum(ψ_0.conj() * ψ_0, axis=1)
|
||||
).real
|
||||
).flatten()
|
||||
|
||||
|
||||
j_therm = np.array(
|
||||
2
|
||||
,* (
|
||||
|
@ -1104,7 +1104,7 @@ Now we calculate the average over all trajectories.
|
|||
dj, dj_therm = flow_for_traj(
|
||||
int_result.ψ_0[i], int_result.ψ_1[i], int_result.temp_y[i]
|
||||
)
|
||||
|
||||
|
||||
j_0 += dj
|
||||
j_therm += dj_therm
|
||||
j_0 /= params.N
|
||||
|
@ -1183,7 +1183,7 @@ With this we can retrieve the energy of the interaction Hamiltonian.
|
|||
params.t_steps, params.num_exp_t, params.dim
|
||||
)
|
||||
EtaTherm.new_process(temp_y)
|
||||
|
||||
|
||||
E_i = np.array(
|
||||
2
|
||||
,* (
|
||||
|
@ -1195,7 +1195,7 @@ With this we can retrieve the energy of the interaction Hamiltonian.
|
|||
)
|
||||
).real
|
||||
).flatten()
|
||||
|
||||
|
||||
E_i += np.array(
|
||||
2
|
||||
,* (
|
||||
|
@ -1207,9 +1207,9 @@ With this we can retrieve the energy of the interaction Hamiltonian.
|
|||
)
|
||||
).real
|
||||
).flatten()
|
||||
|
||||
|
||||
E_s = np.array(np.sum(b.conj() * ψ_0, axis=1)).flatten().real
|
||||
|
||||
|
||||
return (E_i + E_s) / np.sum(ψ_0.conj() * ψ_0, axis=1).real
|
||||
#+end_src
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue