From 647b869eae3abb670422f92113fafc90bccd03de Mon Sep 17 00:00:00 2001 From: Valentin Boettcher Date: Wed, 3 Aug 2022 17:15:03 +0200 Subject: [PATCH] two ho more time steps --- .../ho_analytic_two_baths.org | 27 ++++++++++--------- .../11_new_ho_comparison/two_ho.py | 11 ++++---- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/python/energy_flow_proper/11_new_ho_comparison/ho_analytic_two_baths.org b/python/energy_flow_proper/11_new_ho_comparison/ho_analytic_two_baths.org index 1605f37..aab0051 100644 --- a/python/energy_flow_proper/11_new_ho_comparison/ho_analytic_two_baths.org +++ b/python/energy_flow_proper/11_new_ho_comparison/ho_analytic_two_baths.org @@ -31,7 +31,7 @@ hops_bcf = hops.util.bcf.OhmicBCF_zeroTemp(s, 1, wc) g, w = hops_bcf.exponential_coefficients(bcf_terms) - integration = IntP(t_steps=(2, 100)) + integration = IntP(t_steps=(20, 1000)) q_proto = qutip.operators.create(max_HO_level) + qutip.operators.destroy( max_HO_level @@ -154,8 +154,8 @@ #+end_src #+RESULTS: -: ho_data_local/two_baths/_6/two_baths_6be504a1a85fd41f80e35d1f604cbfd6_1.h5 -: 0% 34/10000 [02:22<11:35:31, 4.19s/it] +: ho_data/two_baths/_6/two_baths_6be504a1a85fd41f80e35d1f604cbfd6_1.h5 +: 0it [00:00, ?it/s] * Flow #+begin_src jupyter-python :results none @@ -202,8 +202,8 @@ #+RESULTS: :RESULTS: : WARNING:matplotlib.legend:No artists with labels found to put in legend. Note that artists whose label start with an underscore are ignored when legend() is called with no argument. -: -[[file:./.ob-jupyter/fa167f554a2a849afec72057205569a35a9ed376.svg]] +: +[[file:./.ob-jupyter/7dc9909701b9a96b2e00e19325c23b2ec0a8aa2b.svg]] :END: * Analytic @@ -254,7 +254,8 @@ #+begin_src jupyter-python fig, ax = plt.subplots() for params, flow, ex_flow, keys in zip(multi_params, flow_hops, exact_flows, model_keys): - consistency = (-1 * flow).consistency(ex_flow) + consistency = (-1 * flow.for_bath(0)).consistency(ex_flow[0]) + consistency1 = (-1 * flow.for_bath(1)).consistency(ex_flow[1]) pu.plot_with_σ( params.IntP.t, -1 * flow, @@ -267,7 +268,7 @@ -1 * flow, bath=1, ax=ax, - label=rf"$α(0)={params.SysP.g[0].sum().real:.2f}$ $ω_c={keys['wc']}$ ${consistency}\%$", + label=rf"$α(0)={params.SysP.g[0].sum().real:.2f}$ $ω_c={keys['wc']}$ ${consistency1}\%$", ) ax.plot(params.IntP.t, ex_flow[0], linestyle="dotted", color="black") ax.plot(params.IntP.t, ex_flow[1], linestyle="dotted", color="black") @@ -282,15 +283,15 @@ #+RESULTS: :RESULTS: -: -[[file:./.ob-jupyter/904cc3c3d597a77e7e3544b4a3463fdc110a9a36.svg]] +: +[[file:./.ob-jupyter/993434ccfc11251484909bde5f5f8eae60b822cf.svg]] :END: #+begin_src jupyter-python pu.plot_convergence( multi_params[-1].IntP.t, - (-1 * flow_hops[-1].for_bath(0) - -ex_flow[0]) * (1/flow_hops[-1].for_bath(1).max.value), + (-1 * flow_hops[-1].for_bath(1) + -ex_flow[1]) * (1/flow_hops[-1].for_bath(1).max.value), reference=np.zeros_like(ex_flow[0]) ) plt.axhline(0) @@ -300,8 +301,8 @@ #+RESULTS: :RESULTS: -: -[[file:./.ob-jupyter/23c886933441b9ce654cc2377af65a8009e23521.svg]] +: +[[file:./.ob-jupyter/df60edc8869ab6d9fcce16d1d99cfc5624368eb4.svg]] :END: * Obesrvations diff --git a/python/energy_flow_proper/11_new_ho_comparison/two_ho.py b/python/energy_flow_proper/11_new_ho_comparison/two_ho.py index 5657dce..0c98c9e 100644 --- a/python/energy_flow_proper/11_new_ho_comparison/two_ho.py +++ b/python/energy_flow_proper/11_new_ho_comparison/two_ho.py @@ -26,7 +26,7 @@ def ho_duo( hops_bcf = hops.util.bcf.OhmicBCF_zeroTemp(s, 1, wc) g, w = hops_bcf.exponential_coefficients(bcf_terms) - integration = IntP(t_steps=(2, 100)) + integration = IntP(t_steps=(20, 1000)) q_proto = qutip.operators.create(max_HO_level) + qutip.operators.destroy( max_HO_level @@ -202,7 +202,8 @@ for params, keys in zip(multi_params, model_keys): fig, ax = plt.subplots() for params, flow, ex_flow, keys in zip(multi_params, flow_hops, exact_flows, model_keys): - consistency = (-1 * flow).consistency(ex_flow) + consistency = (-1 * flow.for_bath(0)).consistency(ex_flow[0]) + consistency1 = (-1 * flow.for_bath(1)).consistency(ex_flow[1]) pu.plot_with_σ( params.IntP.t, -1 * flow, @@ -215,7 +216,7 @@ for params, flow, ex_flow, keys in zip(multi_params, flow_hops, exact_flows, mod -1 * flow, bath=1, ax=ax, - label=rf"$α(0)={params.SysP.g[0].sum().real:.2f}$ $ω_c={keys['wc']}$ ${consistency}\%$", + label=rf"$α(0)={params.SysP.g[0].sum().real:.2f}$ $ω_c={keys['wc']}$ ${consistency1}\%$", ) ax.plot(params.IntP.t, ex_flow[0], linestyle="dotted", color="black") ax.plot(params.IntP.t, ex_flow[1], linestyle="dotted", color="black") @@ -229,8 +230,8 @@ ax.legend() pu.plot_convergence( multi_params[-1].IntP.t, - (-1 * flow_hops[-1].for_bath(0) - -ex_flow[0]) * (1/flow_hops[-1].for_bath(1).max.value), + (-1 * flow_hops[-1].for_bath(1) + -ex_flow[1]) * (1/flow_hops[-1].for_bath(1).max.value), reference=np.zeros_like(ex_flow[0]) ) plt.axhline(0)