try very long coupling

This commit is contained in:
Valentin Boettcher 2022-06-12 15:20:16 +02:00
parent ed6e5beb45
commit d2b1ccae61
2 changed files with 24 additions and 59 deletions

View file

@ -82,7 +82,7 @@ def anti_zeno_engine(
return model, (τ_mod, τ_c, τ_bath, cycles, model.ω_s) return model, (τ_mod, τ_c, τ_bath, cycles, model.ω_s)
model, params = anti_zeno_engine(ε=1e-1, ε_couple=1/4) model, params = anti_zeno_engine(ε=1e-1, ε_couple=1e-3)
params params
@ -109,7 +109,7 @@ with aux.get_data(model) as data:
plt.plot(model.t, ρ_ee) plt.plot(model.t, ρ_ee)
from statsmodels.nonparametric.smoothers_lowess import lowess from statsmodels.nonparametric.smoothers_lowess import lowess
filtered = lowess(ρ_ee, model.t, is_sorted=True, return_sorted=False, frac=0.05/5, it=0) filtered = lowess(ρ_ee, model.t, is_sorted=True, return_sorted=False, frac=0.05, it=0)
plt.plot(model.t, filtered) plt.plot(model.t, filtered)
with aux.get_data(model) as data: with aux.get_data(model) as data:
@ -151,3 +151,5 @@ _, ax = fs.plot_energy_overview(model, markersize=1)
model, params = anti_zeno_engine(ω_0=6, ε=1e-1) model, params = anti_zeno_engine(ω_0=6, ε=1e-1)
_, ax = fs.plot_energy_overview(model, markersize=1) _, ax = fs.plot_energy_overview(model, markersize=1)
model, params = anti_zeno_engine(ε=1e-1, ε_couple=1/4)

View file

@ -103,12 +103,12 @@ Init ray and silence stocproc.
* Model Definition * Model Definition
#+begin_src jupyter-python #+begin_src jupyter-python
model, params = anti_zeno_engine(ε=1e-1, ε_couple=1/4) model, params = anti_zeno_engine(ε=1e-1, ε_couple=1e-3)
params params
#+end_src #+end_src
#+RESULTS: #+RESULTS:
| 1.2566370614359172 | 10.053096491487338 | 10.466663926059324 | 8 | (0 10) | | 1.2566370614359172 | 104.30087609918112 | 104.30851486716159 | 83 | (0 10) |
Let's test the assumptions of the paper. Let's test the assumptions of the paper.
@ -128,8 +128,8 @@ Let's test the assumptions of the paper.
#+RESULTS: #+RESULTS:
:RESULTS: :RESULTS:
| <matplotlib.lines.Line2D | at | 0x7f960ac80b50> | | <matplotlib.lines.Line2D | at | 0x7f9609c57be0> |
[[file:./.ob-jupyter/be0ec9303d06001ae4918a09abc91df4dee35a7a.svg]] [[file:./.ob-jupyter/1e2486aa48b134e6e04e86c4e8a61e2765670df7.svg]]
:END: :END:
#+begin_src jupyter-python :tangle nil #+begin_src jupyter-python :tangle nil
@ -140,8 +140,8 @@ Let's test the assumptions of the paper.
#+RESULTS: #+RESULTS:
:RESULTS: :RESULTS:
| <matplotlib.lines.Line2D | at | 0x7f960bd896a0> | | <matplotlib.lines.Line2D | at | 0x7f960a86b460> |
[[file:./.ob-jupyter/a1a3bf487639295688b6e279e56b9037bc41f08b.svg]] [[file:./.ob-jupyter/ef06a83eb4d653f3f747482f90c756a426f41326.svg]]
:END: :END:
@ -168,8 +168,8 @@ Let's test the assumptions of the paper.
#+RESULTS: #+RESULTS:
:RESULTS: :RESULTS:
: <matplotlib.legend.Legend at 0x7f960aca70d0> : <matplotlib.legend.Legend at 0x7f960a48a7f0>
[[file:./.ob-jupyter/a8946060252eb98d118b65dfa24a9ecda1d12bf2.svg]] [[file:./.ob-jupyter/0ca3fd474f532dcad50671f0cc152d660b37d1bf.svg]]
:END: :END:
- **too fast decoupling kills it** - **too fast decoupling kills it**
@ -190,7 +190,7 @@ Let's test the assumptions of the paper.
#+end_src #+end_src
#+RESULTS: #+RESULTS:
[[file:./.ob-jupyter/294d83bf1986bdafb1661ff20830beb942df9723.svg]] [[file:./.ob-jupyter/1fa5fc5caa749e69ae16f07ffbd67b6420f54156.svg]]
- no steady state ... but we have to average... - no steady state ... but we have to average...
@ -199,14 +199,14 @@ Let's test the assumptions of the paper.
plt.plot(model.t, ρ_ee) plt.plot(model.t, ρ_ee)
from statsmodels.nonparametric.smoothers_lowess import lowess from statsmodels.nonparametric.smoothers_lowess import lowess
filtered = lowess(ρ_ee, model.t, is_sorted=True, return_sorted=False, frac=0.05/5, it=0) filtered = lowess(ρ_ee, model.t, is_sorted=True, return_sorted=False, frac=0.05, it=0)
plt.plot(model.t, filtered) plt.plot(model.t, filtered)
#+end_src #+end_src
#+RESULTS: #+RESULTS:
:RESULTS: :RESULTS:
| <matplotlib.lines.Line2D | at | 0x7f960a4e3ac0> | | <matplotlib.lines.Line2D | at | 0x7f9609df5070> |
[[file:./.ob-jupyter/e06edb6435c22251a533a36ac6109265c7efeb19.svg]] [[file:./.ob-jupyter/4b8e6f94660d0abbeb3ff93d88e088a8249afb69.svg]]
:END: :END:
** TODO Power and Efficiency ** TODO Power and Efficiency
@ -227,7 +227,7 @@ We need the time points where we sample the total energy.
#+end_src #+end_src
#+RESULTS: #+RESULTS:
[[file:./.ob-jupyter/9f6d051adfd9c9f45c3a20a6c03097ee06fa9906.svg]] [[file:./.ob-jupyter/66981899ba65d026196d29f54e45b3663b179d43.svg]]
#+begin_src jupyter-python #+begin_src jupyter-python
with aux.get_data(model) as data: with aux.get_data(model) as data:
@ -238,50 +238,7 @@ We need the time points where we sample the total energy.
#+end_src #+end_src
#+RESULTS: #+RESULTS:
:RESULTS: [[file:./.ob-jupyter/d2a4d830b7965689e1085ea5b80633907f7f75f5.svg]]
: Loading: 100% 17/17 [00:00<00:00, 171.09it/s]
: [INFO root 863133] Writing cache to: results/ba7df99368964b9933f29b81136f37a9d573fe6ed91440ed48906c0dbdc087dc_4679484025cd9cc8d82e069b9d17885c456e6960c3260612d36c5b4c14ba0a48_op_exp_task_100_50_340c6375eb3a3e5b329053f541b602d84b3bf13b6c8911851fb6befcb823823e.npy
: Loading: 97% 33/34 [00:00<00:00, 82.97it/s]
: [INFO root 863133] Writing cache to: results/flow_4679484025cd9cc8d82e069b9d17885c456e6960c3260612d36c5b4c14ba0a48_flow_worker_100_50_9e0987996ea000d9bc276dffc5621585bc35dc00c1ecd305b40fa693d9a2a051.npy
: Loading: 97% 33/34 [00:00<00:00, 95.97it/s]
: [INFO root 863133] Writing cache to: results/interaction_4679484025cd9cc8d82e069b9d17885c456e6960c3260612d36c5b4c14ba0a48_interaction_energy_task_100_50_013ca26cb226de02fec37a78c300c480879ef32f60def77beef092023ba1f46a.npy
# [goto error]
#+begin_example
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Input In [62], in <cell line: 1>()
 2 _, ax = plt.subplots()
 3 #fs.plot_with_σ(model.t, model.bath_energy(data), bath=1, ax=ax)
----> 4 fs.plot_diff_vs_sigma(model.t, model.total_energy(data, every=50)[:-1], model.total_energy(data, every=50)[-1], ax=ax)
 5 ax.legend()
File ~/Documents/Projects/UNI/master/masterarb/python/energy_flow_proper/10_antizeno_engine/figsaver.py:142, in wrap_plot.<locals>.wrapped(ax, setup_function, *args, **kwargs)
 139 if not ax:
 140 fig, ax = setup_function()
--> 142 ret_val = f(*args, ax=ax, **kwargs)
 143 return (fig, ax, ret_val) if ret_val else (fig, ax)
File ~/Documents/Projects/UNI/master/masterarb/python/energy_flow_proper/10_antizeno_engine/figsaver.py:326, in plot_diff_vs_sigma(x, y, reference, ax, label, transform, ecolor, ealpha, ylabel, bath)
 323 current = y[i]
 325 not_last = current.N < y[-1].N
--> 326 consistency = current.consistency(reference)
 327 diff = abs(current - reference)
 329 ax.plot(
 330 x,
 331 diff.value,
 (...)
 335 color=None if not_last else "red",
 336 )
File ~/src/hopsflow/hopsflow/util.py:129, in EnsembleValue.consistency(self, other)
 126 def consistency(self, other: EnsembleValue) -> float:
 127 diff = abs(self[-1] - other[-1])
--> 129 return (diff.value < diff.σ).sum() / len(diff.for_bath(0).value) * 100
TypeError: object of type 'numpy.float64' has no len()
#+end_example
[[file:./.ob-jupyter/6c90699e7bcb14a58349734ba00cb508989be023.svg]]
:END:
#+begin_src jupyter-python #+begin_src jupyter-python
mean_norm = np.zeros_like(model.t) mean_norm = np.zeros_like(model.t)
@ -302,6 +259,7 @@ We need the time points where we sample the total energy.
[[file:./.ob-jupyter/26492ec360e7a3661c31c6377825d8e3061fc33f.svg]] [[file:./.ob-jupyter/26492ec360e7a3661c31c6377825d8e3061fc33f.svg]]
* Too long modulation?, more likely to small spectral sep or to strong coupling * Too long modulation?, more likely to small spectral sep or to strong coupling
- definitely not too long mod
#+begin_src jupyter-python :results none #+begin_src jupyter-python :results none
model, _ = anti_zeno_engine(Δ=5, γ=0.1 / 2, ω_c=1, ω_0=2, ε=1e-1, ε_couple=1 / 3, n=6, cycle_scale=1, switch_cycles=3) model, _ = anti_zeno_engine(Δ=5, γ=0.1 / 2, ω_c=1, ω_0=2, ε=1e-1, ε_couple=1 / 3, n=6, cycle_scale=1, switch_cycles=3)
#+end_src #+end_src
@ -342,3 +300,8 @@ _, ax = fs.plot_energy_overview(model, markersize=1)
#+RESULTS: #+RESULTS:
[[file:./.ob-jupyter/8d54f5d626c1ae1332fce377387c60385dfca9ba.svg]] [[file:./.ob-jupyter/8d54f5d626c1ae1332fce377387c60385dfca9ba.svg]]
* Longer modulation -> more harvest
#+begin_src jupyter-python :results none
model, params = anti_zeno_engine(ε=1e-1, ε_couple=1/4)
#+end_src