mirror of
https://github.com/vale981/master-thesis
synced 2025-03-06 10:31:37 -05:00
more useful config for 02
This commit is contained in:
parent
e3bb75687c
commit
f931e550fb
2 changed files with 29 additions and 23 deletions
|
@ -11,18 +11,18 @@ wc = 5
|
|||
s = 1
|
||||
|
||||
# The BCF fit
|
||||
bcf_terms = 7
|
||||
bcf_terms = 5
|
||||
g, w = get_ohm_g_w(bcf_terms, s, wc)
|
||||
|
||||
integration = IntP(t_max=30, t_steps=int(30 // 0.01))
|
||||
integration = IntP(t_max=30, t_steps=int(30 // 0.001))
|
||||
system = SysP(
|
||||
H_sys=0.5 * np.array([[-1, 0], [0, 1]]),
|
||||
L=0.5 * np.array([[0, 1], [1, 0]]),
|
||||
psi0=np.array([0, 1]),
|
||||
g=g,
|
||||
w=w,
|
||||
bcf_scale=0.8,
|
||||
T=0.1,
|
||||
bcf_scale=0.5,
|
||||
T=0.5,
|
||||
)
|
||||
|
||||
params = HIParams(
|
||||
|
@ -33,7 +33,7 @@ params = HIParams(
|
|||
normalized_by_hand=True,
|
||||
result_type=ResultType.ZEROTH_AND_FIRST_ORDER,
|
||||
truncation_scheme=TruncationScheme_Power_multi.from_g_w(
|
||||
g=g, w=w, p=1, q=0.5, kfac=1.4
|
||||
g=.5 * g, w=w, p=1, q=0.5, kfac=1.2
|
||||
),
|
||||
save_therm_rng_seed=True,
|
||||
),
|
||||
|
|
|
@ -17,18 +17,18 @@ This will be tangled into the [[file:config.py][config file]] that can be used w
|
|||
s = 1
|
||||
|
||||
# The BCF fit
|
||||
bcf_terms = 7
|
||||
bcf_terms = 5
|
||||
g, w = get_ohm_g_w(bcf_terms, s, wc)
|
||||
|
||||
integration = IntP(t_max=30, t_steps=int(30 // 0.01))
|
||||
integration = IntP(t_max=30, t_steps=int(30 // 0.001))
|
||||
system = SysP(
|
||||
H_sys=0.5 * np.array([[-1, 0], [0, 1]]),
|
||||
L=0.5 * np.array([[0, 1], [1, 0]]),
|
||||
psi0=np.array([0, 1]),
|
||||
g=g,
|
||||
w=w,
|
||||
bcf_scale=0.8,
|
||||
T=0.1,
|
||||
bcf_scale=0.5,
|
||||
T=0.5,
|
||||
)
|
||||
|
||||
params = HIParams(
|
||||
|
@ -39,7 +39,7 @@ This will be tangled into the [[file:config.py][config file]] that can be used w
|
|||
normalized_by_hand=True,
|
||||
result_type=ResultType.ZEROTH_AND_FIRST_ORDER,
|
||||
truncation_scheme=TruncationScheme_Power_multi.from_g_w(
|
||||
g=g, w=w, p=1, q=0.5, kfac=1.4
|
||||
g=.5 * g, w=w, p=1, q=0.5, kfac=1.2
|
||||
),
|
||||
save_therm_rng_seed=True,
|
||||
),
|
||||
|
@ -80,6 +80,7 @@ This will be tangled into the [[file:config.py][config file]] that can be used w
|
|||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
import utilities as ut
|
||||
import figsaver as fs
|
||||
#+end_src
|
||||
|
||||
** Load the Data
|
||||
|
@ -102,7 +103,7 @@ Now we read the trajectory data.
|
|||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: 2000
|
||||
: 10000
|
||||
|
||||
** Calculate System Energy
|
||||
Simple sanity check.
|
||||
|
@ -112,16 +113,21 @@ Simple sanity check.
|
|||
system.H_sys,
|
||||
result.N,
|
||||
params.HiP.nonlinear,
|
||||
save="./results/energy.npy",
|
||||
save="./results/new_energy.npy",
|
||||
)
|
||||
|
||||
plt.errorbar(result.τ, e_sys.real, yerr=σ_e_sys.real, ecolor="yellow")
|
||||
with fs.hiro_style():
|
||||
plt.gcf().set_size_inches(4, 3)
|
||||
plt.errorbar(result.τ, e_sys.real, yerr=σ_e_sys.real, ecolor="yellow")
|
||||
plt.ylabel(r"$\langle H_S\rangle$")
|
||||
plt.xlabel(r"$τ$")
|
||||
fs.export_fig("system_energy")
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
: <ErrorbarContainer object of 3 artists>
|
||||
[[file:./.ob-jupyter/4380c3cff03d9ecce002e7639da95347ebeb7e4b.svg]]
|
||||
: 100% 9999/9999 [00:18<00:00, 537.35it/s]
|
||||
[[file:./.ob-jupyter/8b78428b701f2cea9e77431271a938887e37b378.svg]]
|
||||
:END:
|
||||
|
||||
** Calculate the Heat Flow
|
||||
|
@ -153,8 +159,8 @@ Now we can apply our tooling to one trajectory for testing.
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
| <matplotlib.lines.Line2D | at | 0x7fb51d6ebeb0> |
|
||||
[[file:./.ob-jupyter/784bb9515cdf0d7723991b501cf27baed17cadc6.svg]]
|
||||
| <matplotlib.lines.Line2D | at | 0x7eff709eb220> |
|
||||
[[file:./.ob-jupyter/39bebc8dc69aeb2172d4106408c4a55002e30282.svg]]
|
||||
:END:
|
||||
|
||||
And now for all trajectories.
|
||||
|
@ -175,7 +181,7 @@ And now for all trajectories.
|
|||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
[[file:./.ob-jupyter/4b3410c9b264efc91db2ed51f42af8cf36740356.svg]]
|
||||
[[file:./.ob-jupyter/de03e329cbf96503020daa1c6d71737021171363.svg]]
|
||||
|
||||
|
||||
We can integrate the energy change in the bath:
|
||||
|
@ -186,7 +192,7 @@ We can integrate the energy change in the bath:
|
|||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
[[file:./.ob-jupyter/37da2774f4feba941b206216e48ace6bca062196.svg]]
|
||||
[[file:./.ob-jupyter/54f6b6bf2aad6068f2bd09782296ad6335ddb629.svg]]
|
||||
|
||||
** Calculate the Interaction Energy
|
||||
First we calculate it from energy conservation.
|
||||
|
@ -197,8 +203,8 @@ First we calculate it from energy conservation.
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
| <matplotlib.lines.Line2D | at | 0x7fb51c575250> |
|
||||
[[file:./.ob-jupyter/f031dd94dd25d838302c5d125be23f78a3cbe72b.svg]]
|
||||
| <matplotlib.lines.Line2D | at | 0x7eff7033e2e0> |
|
||||
[[file:./.ob-jupyter/f1321149bc686f5eaddad9a2ee837f2a83fedf77.svg]]
|
||||
:END:
|
||||
|
||||
And then from first principles:
|
||||
|
@ -224,8 +230,8 @@ And both together:
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
: <matplotlib.legend.Legend at 0x7fb51c4d0b50>
|
||||
[[file:./.ob-jupyter/31340f5271d2e0755bc77033d88f6a385465a5dc.svg]]
|
||||
: <matplotlib.legend.Legend at 0x7eff70317df0>
|
||||
[[file:./.ob-jupyter/9c36dd646aac2908b8b780e05ffffb1a3c0aa53e.svg]]
|
||||
:END:
|
||||
|
||||
Seems to work :P.
|
||||
|
|
Loading…
Add table
Reference in a new issue