From 5369dd9675fd6a3f615ee7aee9fe26d1c4ab03a9 Mon Sep 17 00:00:00 2001 From: Valentin Boettcher Date: Mon, 15 Aug 2022 21:47:23 +0200 Subject: [PATCH] minor updates in 10 --- .../10_antizeno_engine/.envrc | 2 +- .../10_first_anti_zeno_cc.py | 31 +++++++------------ .../10_antizeno_engine/anti_zeno_engine.py | 17 ++++------ .../10_antizeno_engine/continously_couple.org | 5 +-- .../10_antizeno_engine/with_gap.org | 15 ++++----- 5 files changed, 27 insertions(+), 43 deletions(-) diff --git a/python/energy_flow_proper/10_antizeno_engine/.envrc b/python/energy_flow_proper/10_antizeno_engine/.envrc index c7a853c..d3b3289 100644 --- a/python/energy_flow_proper/10_antizeno_engine/.envrc +++ b/python/energy_flow_proper/10_antizeno_engine/.envrc @@ -1,2 +1,2 @@ -use_flake +use_flake --impure eval "$shellHook" diff --git a/python/energy_flow_proper/10_antizeno_engine/10_first_anti_zeno_cc.py b/python/energy_flow_proper/10_antizeno_engine/10_first_anti_zeno_cc.py index 533b10f..ffd8e34 100644 --- a/python/energy_flow_proper/10_antizeno_engine/10_first_anti_zeno_cc.py +++ b/python/energy_flow_proper/10_antizeno_engine/10_first_anti_zeno_cc.py @@ -28,46 +28,37 @@ from anti_zeno_engine import * params ) = anti_zeno_engine( Δ=11, - ε=1,#.1, + ε=.1, ω_c=1, - ε_couple=.0001, - n=1, + ε_couple=0.7, + n=10, detune=.5, ω_0=20, T_c=1e3, T_h=1e4, - δ=[3.2*.01/4, 1.08*.01/4], + δ=[3.2*.01/4, 1*.01/4], γ=.2, switch_cycles=1, therm_initial_state=False, - ε_init=.000001/2, + ε_init=.00001/2, terms=7, - dt=0.01/2, - sp_tol=1e-4, + dt=0.01, + sp_tol=1e-3, init_time_steps=10, - interpolation_multiplier=10, ) model.k_max = 3 -ts = model.t # np.linspace(0,10,1000) -proc = model.thermal_process(1) -import hops -z=hops.core.utility.uni_to_gauss(np.random.rand(proc.get_num_y() * 2)) -proc.new_process(z) -pu.plot_complex(ts, proc(ts) * model.bcf_scales[1]) +aux.integrate(model, 1) params.cycles -aux.integrate(model, 10) - plot_az_coupling_diagram(model, params) plot_az_sd_overview(model, params) +fs.export_fig("with_gap_coupling_diagram", tikz=False, y_scaling=.4) plot_total_power(model, params) -plot_excited_state(model, params, with_init=True) +plot_excited_state(model, params) -plot_coherences(model, params) - -plot_power_output(model, params, steady_index=0) +plot_power_output(model, params) diff --git a/python/energy_flow_proper/10_antizeno_engine/anti_zeno_engine.py b/python/energy_flow_proper/10_antizeno_engine/anti_zeno_engine.py index 9baaa24..bab0e27 100644 --- a/python/energy_flow_proper/10_antizeno_engine/anti_zeno_engine.py +++ b/python/energy_flow_proper/10_antizeno_engine/anti_zeno_engine.py @@ -246,33 +246,28 @@ def plot_az_coupling_diagram(model, params, ax=None, model_t=False): def plot_az_sd_overview(model, params, ax=None): ωs = np.linspace(0.01 + model.ω_s[0] - 1, 2 * params.ω_0, 10000) - def total_sd(n, ω): - return model.bcf_scales[n] * ( - model.spectral_density(n)(np.abs(ω)) - * (1 / (np.expm1(np.abs(ωs) / model.T[n])) + np.heaviside(ω, 0)) - ) - ax.plot( ωs, - total_sd(0, ωs), + model.full_thermal_spectral_density(0)(ωs), label="Cold Bath", ) ax.plot( ωs, - total_sd(1, ωs), + model.full_thermal_spectral_density(1)(ωs), label="Hot Bath", ) ax.axvline(model.H.operator_norm(0) * 2 + params.Δ) ax.axvline(model.H.operator_norm(0) * 2 - params.Δ) - for mult in [1, 2, 3]: + for mult in [1, 10]: ax.plot( ωs, - total_sd(1, ωs).max() - * np.sinc((ωs - params.ω_0 - params.Δ) * params.τ_c * mult), + model.full_thermal_spectral_density(1)(ωs).max() + * np.sinc((ωs - params.ω_0 - params.Δ) * params.τ_c * mult / np.pi), label=rf"Filter $n={params.cycles * mult}$", ) ax.set_xlabel(r"$\omega$") + ax.set_ylabel(r"Spectral Density") ax.legend() diff --git a/python/energy_flow_proper/10_antizeno_engine/continously_couple.org b/python/energy_flow_proper/10_antizeno_engine/continously_couple.org index edb634b..480a66b 100644 --- a/python/energy_flow_proper/10_antizeno_engine/continously_couple.org +++ b/python/energy_flow_proper/10_antizeno_engine/continously_couple.org @@ -119,10 +119,7 @@ Init ray and silence stocproc. #+end_src #+RESULTS: -:RESULTS: -|
| | -[[file:./.ob-jupyter/fd54562a57fd5ebe331b4c6974d6f78980230a00.svg]] -:END: +: 7ef94938-dccc-41cf-a788-0729c098f789 #+begin_src jupyter-python diff --git a/python/energy_flow_proper/10_antizeno_engine/with_gap.org b/python/energy_flow_proper/10_antizeno_engine/with_gap.org index 60c8560..67b078b 100644 --- a/python/energy_flow_proper/10_antizeno_engine/with_gap.org +++ b/python/energy_flow_proper/10_antizeno_engine/with_gap.org @@ -23,7 +23,7 @@ Init ray and silence stocproc. #+begin_src jupyter-python import ray ray.shutdown() - ray.init(address="ray://100.126.247.22:10001") + ray.init() #+end_src #+RESULTS: @@ -89,18 +89,16 @@ Let's test the assumptions of the paper. #+RESULTS: :RESULTS: |
| | -[[file:./.ob-jupyter/2bd67476a36ad9358e8b80a70ec7008846713792.svg]] +[[file:./.ob-jupyter/20b0ad593cd085ce4629a367e6aefdb4c02b420b.svg]] :END: #+begin_src jupyter-python plot_az_sd_overview(model, params) + fs.export_fig("with_gap_coupling_diagram", tikz=False, y_scaling=.4) #+end_src #+RESULTS: -:RESULTS: -|
| | -[[file:./.ob-jupyter/676f3afa255198cce62786706a55f87f8c0a9bf4.svg]] -:END: +[[file:./.ob-jupyter/41b679038f2fa7a641d22545de705a71270f8f4f.svg]] #+begin_src jupyter-python @@ -108,7 +106,10 @@ Let's test the assumptions of the paper. #+end_src #+RESULTS: -|
| | +:RESULTS: +|
| | +[[file:./.ob-jupyter/360188c7be1e8ed8250a2d21678a0752b35017d8.svg]] +:END: #+begin_src jupyter-python plot_excited_state(model, params)