mirror of
https://github.com/vale981/master-thesis
synced 2025-03-06 02:21:38 -05:00
the one config to rule them all
This commit is contained in:
parent
b9aae25b41
commit
9b704f67ea
1 changed files with 100 additions and 79 deletions
|
@ -10,20 +10,35 @@ from stocproc import StocProc_FFT
|
|||
np.__config__.blas_opt_info = np.__config__.blas_ilp64_opt_info # fix for qutip
|
||||
import qutip
|
||||
|
||||
|
||||
wc = 2
|
||||
s = 1
|
||||
Ω = 1
|
||||
Λ = 1
|
||||
γ = 0.1
|
||||
|
||||
|
||||
hops_bcf = hops.util.bcf.OhmicBCF_zeroTemp(
|
||||
s,
|
||||
1,
|
||||
wc,
|
||||
)
|
||||
|
||||
def make_config(
|
||||
max_HO_level: int,
|
||||
bcf_terms: int = 4,
|
||||
t_max: float = 10,
|
||||
k_fac: float = 1.4,
|
||||
sp_tol: float = 1e-3,
|
||||
):
|
||||
# The BCF fit
|
||||
bcf_terms = 4
|
||||
g, w = get_ohm_g_w(bcf_terms, s, wc)
|
||||
|
||||
max_HO_level = 10
|
||||
integration = IntP(t_max=10, t_steps=int(10 // 0.1))
|
||||
integration = IntP(t_max=t_max, t_steps=int(t_max // 0.1))
|
||||
|
||||
q_proto = qutip.operators.create(max_HO_level) + qutip.operators.destroy(max_HO_level)
|
||||
q_proto = qutip.operators.create(max_HO_level) + qutip.operators.destroy(
|
||||
max_HO_level
|
||||
)
|
||||
p_proto = (
|
||||
qutip.operators.destroy(max_HO_level) - qutip.operators.create(max_HO_level)
|
||||
) / 1j
|
||||
|
@ -32,6 +47,7 @@ q_1 = qutip.tensor(q_proto, qutip.qeye(max_HO_level))
|
|||
p_1 = qutip.tensor(p_proto, qutip.qeye(max_HO_level))
|
||||
q_2 = qutip.tensor(qutip.qeye(max_HO_level), q_proto)
|
||||
p_2 = qutip.tensor(qutip.qeye(max_HO_level), p_proto)
|
||||
|
||||
system = SysP(
|
||||
H_sys=(
|
||||
0.25 * (p_1 ** 2 + q_1 ** 2 + p_2 ** 2 + q_2 ** 2)
|
||||
|
@ -49,11 +65,6 @@ system = SysP(
|
|||
T=[0.3, 0],
|
||||
)
|
||||
|
||||
hops_bcf = hops.util.bcf.OhmicBCF_zeroTemp(
|
||||
s,
|
||||
1,
|
||||
wc,
|
||||
)
|
||||
|
||||
params = HIParams(
|
||||
SysP=system,
|
||||
|
@ -62,7 +73,7 @@ params = HIParams(
|
|||
nonlinear=True,
|
||||
result_type=ResultType.ZEROTH_AND_FIRST_ORDER,
|
||||
truncation_scheme=TruncationScheme_Power_multi.from_g_w(
|
||||
g=system.g, w=system.w, p=[1, 1], q=[0.5, 0.5], kfac=[1.5, 1.5]
|
||||
g=system.g, w=system.w, p=[1, 1], q=[0.5, 0.5], kfac=[k_fac] * 2
|
||||
),
|
||||
save_therm_rng_seed=True,
|
||||
),
|
||||
|
@ -75,8 +86,8 @@ params = HIParams(
|
|||
),
|
||||
alpha=hops_bcf,
|
||||
t_max=integration.t_max,
|
||||
intgr_tol=1e-5,
|
||||
intpl_tol=1e-5,
|
||||
intgr_tol=sp_tol,
|
||||
intpl_tol=sp_tol,
|
||||
negative_frequencies=False,
|
||||
),
|
||||
StocProc_FFT(
|
||||
|
@ -87,8 +98,8 @@ params = HIParams(
|
|||
),
|
||||
alpha=hops_bcf,
|
||||
t_max=integration.t_max,
|
||||
intgr_tol=1e-5,
|
||||
intpl_tol=1e-5,
|
||||
intgr_tol=sp_tol,
|
||||
intpl_tol=sp_tol,
|
||||
negative_frequencies=False,
|
||||
),
|
||||
],
|
||||
|
@ -101,10 +112,20 @@ params = HIParams(
|
|||
s, 1, wc, beta=1 / system.__non_key__["T"][0]
|
||||
),
|
||||
t_max=integration.t_max,
|
||||
intgr_tol=1e-5,
|
||||
intpl_tol=1e-5,
|
||||
intgr_tol=sp_tol,
|
||||
intpl_tol=sp_tol,
|
||||
negative_frequencies=False,
|
||||
),
|
||||
None,
|
||||
],
|
||||
)
|
||||
|
||||
return params
|
||||
|
||||
params = make_config(
|
||||
max_HO_level=8,
|
||||
bcf_terms=5,
|
||||
t_max=10,
|
||||
k_fac=1.3,
|
||||
sp_tol=1e-6,
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue