some model tweaks

This commit is contained in:
Valentin Boettcher 2021-10-11 11:35:35 +02:00
parent 17344477cd
commit fc16acb858

View file

@ -25,7 +25,7 @@
#+end_src
#+RESULTS:
: <ipython-input-25-e225c2f5410d>:8: DeprecationWarning: `set_matplotlib_formats` is deprecated since IPython 7.23, directly use `matplotlib_inline.backend_inline.set_matplotlib_formats()`
: <ipython-input-87-e225c2f5410d>:8: DeprecationWarning: `set_matplotlib_formats` is deprecated since IPython 7.23, directly use `matplotlib_inline.backend_inline.set_matplotlib_formats()`
: set_matplotlib_formats('pdf', 'svg')
* Auxiliary Definitions
@ -40,9 +40,9 @@
* Model
Let's set up the basic parameters.
#+begin_src jupyter-python
γ = 5 # coupling ratio
γ = .1 # coupling ratio
ω_c = 1 # center of spect. dens
δ = 10 # breadth BCF
δ = 1 # breadth BCF
W = -ω_c * 1j - δ # exponent BCF
τ_max = 10 # the maximal simulation time
seed = 1 # seed for all pseudo random generators
@ -55,10 +55,10 @@ Let's set up the basic parameters.
And for fun: the BCF and the spectral density.
#+begin_src jupyter-python
def α(τ):
return np.exp(-1j * ω_c * τ - np.abs(τ) * δ)
return np.sqrt(δ) * np.exp(-1j * ω_c * τ - np.abs(τ) * δ)
def I(ω):
return 1 / (δ + (ω - ω_c) ** 2 / δ)
return np.sqrt(δ) / (δ + (ω - ω_c) ** 2 / δ)
#+end_src
#+RESULTS:
@ -75,10 +75,10 @@ And for fun: the BCF and the spectral density.
#+RESULTS:
:RESULTS:
| <matplotlib.lines.Line2D | at | 0x7fdf678abd30> |
| <matplotlib.lines.Line2D | at | 0x7fdf678b7040> |
| <matplotlib.lines.Line2D | at | 0x7fdf678b75e0> |
[[file:./.ob-jupyter/bdb210a75163bc236ebf25b8789809c5eba96b77.svg]]
| <matplotlib.lines.Line2D | at | 0x7f1609970e20> |
| <matplotlib.lines.Line2D | at | 0x7f1609900130> |
| <matplotlib.lines.Line2D | at | 0x7f16099006d0> |
[[file:./.ob-jupyter/9c3f7ad09ca2393c6d9b89cb03fc142b6475de10.svg]]
:END:
* HOPS
@ -95,76 +95,70 @@ fromt the ~stocproc~ examples.
#+begin_example
stocproc.stocproc - INFO - use neg freq
stocproc.method_ft - INFO - get_dt_for_accurate_interpolation, please wait ...
stocproc.method_ft - INFO - acc interp N 33 dt 2.88e-02 -> diff 3.79e-03
stocproc.method_ft - INFO - requires dt < 2.878e-02
stocproc.method_ft - INFO - acc interp N 33 dt 2.88e-01 -> diff 7.57e-03
stocproc.method_ft - INFO - requires dt < 2.878e-01
stocproc.method_ft - INFO - get_N_a_b_for_accurate_fourier_integral, please wait ...
stocproc.method_ft - INFO - J_w_min:1.00e-02 N 32 yields: interval [-2.90e+01,3.10e+01] diff 6.43e-01
stocproc.method_ft - INFO - J_w_min:1.00e-03 N 32 yields: interval [-9.85e+01,1.00e+02] diff 2.01e-01
stocproc.method_ft - INFO - J_w_min:1.00e-02 N 64 yields: interval [-2.90e+01,3.10e+01] diff 6.43e-01
stocproc.method_ft - INFO - J_w_min:1.00e-02 N 32 yields: interval [-8.95e+00,1.09e+01] diff 2.01e-01
stocproc.method_ft - INFO - J_w_min:1.00e-03 N 32 yields: interval [-3.06e+01,3.26e+01] diff 6.40e-01
stocproc.method_ft - INFO - J_w_min:1.00e-02 N 64 yields: interval [-8.95e+00,1.09e+01] diff 2.00e-01
stocproc.method_ft - INFO - J_w_min:1.00e-04 N 32 yields: interval [-9.90e+01,1.01e+02] diff 1.90e+00
stocproc.method_ft - INFO - J_w_min:1.00e-03 N 64 yields: interval [-3.06e+01,3.26e+01] diff 1.31e-01
stocproc.method_ft - INFO - J_w_min:1.00e-02 N 128 yields: interval [-8.95e+00,1.09e+01] diff 2.00e-01
stocproc.method_ft - INFO - increasing N while shrinking the interval does lower the error -> try next level
stocproc.method_ft - INFO - J_w_min:1.00e-04 N 32 yields: interval [-3.15e+02,3.17e+02] diff 6.40e-01
stocproc.method_ft - INFO - J_w_min:1.00e-03 N 64 yields: interval [-9.85e+01,1.00e+02] diff 2.00e-01
stocproc.method_ft - INFO - J_w_min:1.00e-02 N 128 yields: interval [-2.90e+01,3.10e+01] diff 6.43e-01
stocproc.method_ft - INFO - J_w_min:1.00e-05 N 32 yields: interval [-3.15e+02,3.17e+02] diff 2.68e+00
stocproc.method_ft - INFO - J_w_min:1.00e-04 N 64 yields: interval [-9.90e+01,1.01e+02] diff 1.15e+00
stocproc.method_ft - INFO - J_w_min:1.00e-03 N 128 yields: interval [-3.06e+01,3.26e+01] diff 6.33e-02
stocproc.method_ft - INFO - J_w_min:1.00e-02 N 256 yields: interval [-8.95e+00,1.09e+01] diff 2.00e-01
stocproc.method_ft - INFO - increasing N while shrinking the interval does lower the error -> try next level
stocproc.method_ft - INFO - J_w_min:1.00e-05 N 32 yields: interval [-9.99e+02,1.00e+03] diff 1.90e+00
stocproc.method_ft - INFO - J_w_min:1.00e-04 N 64 yields: interval [-3.15e+02,3.17e+02] diff 1.31e-01
stocproc.method_ft - INFO - J_w_min:1.00e-03 N 128 yields: interval [-9.85e+01,1.00e+02] diff 2.00e-01
stocproc.method_ft - INFO - J_w_min:1.00e-06 N 32 yields: interval [-9.99e+02,1.00e+03] diff 2.99e+00
stocproc.method_ft - INFO - J_w_min:1.00e-05 N 64 yields: interval [-3.15e+02,3.17e+02] diff 2.29e+00
stocproc.method_ft - INFO - J_w_min:1.00e-04 N 128 yields: interval [-9.90e+01,1.01e+02] diff 4.21e-01
stocproc.method_ft - INFO - J_w_min:1.00e-03 N 256 yields: interval [-3.06e+01,3.26e+01] diff 6.33e-02
stocproc.method_ft - INFO - J_w_min:1.00e-02 N 512 yields: interval [-8.95e+00,1.09e+01] diff 2.00e-01
stocproc.method_ft - INFO - increasing N while shrinking the interval does lower the error -> try next level
stocproc.method_ft - INFO - J_w_min:1.00e-06 N 32 yields: interval [-3.16e+03,3.16e+03] diff 2.68e+00
stocproc.method_ft - INFO - J_w_min:1.00e-05 N 64 yields: interval [-9.99e+02,1.00e+03] diff 1.15e+00
stocproc.method_ft - INFO - J_w_min:1.00e-04 N 128 yields: interval [-3.15e+02,3.17e+02] diff 6.33e-02
stocproc.method_ft - INFO - J_w_min:1.00e-03 N 256 yields: interval [-9.85e+01,1.00e+02] diff 2.00e-01
stocproc.method_ft - INFO - J_w_min:1.00e-07 N 32 yields: interval [-3.16e+03,3.16e+03] diff 3.09e+00
stocproc.method_ft - INFO - J_w_min:1.00e-06 N 64 yields: interval [-9.99e+02,1.00e+03] diff 2.84e+00
stocproc.method_ft - INFO - J_w_min:1.00e-05 N 128 yields: interval [-3.15e+02,3.17e+02] diff 1.66e+00
stocproc.method_ft - INFO - J_w_min:1.00e-04 N 256 yields: interval [-9.90e+01,1.01e+02] diff 5.63e-02
stocproc.method_ft - INFO - J_w_min:1.00e-03 N 512 yields: interval [-3.06e+01,3.26e+01] diff 6.33e-02
stocproc.method_ft - INFO - increasing N while shrinking the interval does lower the error -> try next level
stocproc.method_ft - INFO - J_w_min:1.00e-07 N 32 yields: interval [-1.00e+04,1.00e+04] diff 2.99e+00
stocproc.method_ft - INFO - J_w_min:1.00e-06 N 64 yields: interval [-3.16e+03,3.16e+03] diff 2.29e+00
stocproc.method_ft - INFO - J_w_min:1.00e-05 N 128 yields: interval [-9.99e+02,1.00e+03] diff 4.21e-01
stocproc.method_ft - INFO - J_w_min:1.00e-04 N 256 yields: interval [-3.15e+02,3.17e+02] diff 6.33e-02
stocproc.method_ft - INFO - J_w_min:1.00e-03 N 512 yields: interval [-9.85e+01,1.00e+02] diff 2.00e-01
stocproc.method_ft - INFO - J_w_min:1.00e-08 N 32 yields: interval [-1.00e+04,1.00e+04] diff 3.13e+00
stocproc.method_ft - INFO - J_w_min:1.00e-07 N 64 yields: interval [-3.16e+03,3.16e+03] diff 3.04e+00
stocproc.method_ft - INFO - J_w_min:1.00e-06 N 128 yields: interval [-9.99e+02,1.00e+03] diff 2.57e+00
stocproc.method_ft - INFO - J_w_min:1.00e-05 N 256 yields: interval [-3.15e+02,3.17e+02] diff 8.81e-01
stocproc.method_ft - INFO - J_w_min:1.00e-04 N 512 yields: interval [-9.90e+01,1.01e+02] diff 2.00e-02
stocproc.method_ft - INFO - J_w_min:1.00e-03 N 1024 yields: interval [-3.06e+01,3.26e+01] diff 6.33e-02
stocproc.method_ft - INFO - increasing N while shrinking the interval does lower the error -> try next level
stocproc.method_ft - INFO - J_w_min:1.00e-08 N 32 yields: interval [-3.16e+04,3.16e+04] diff 3.09e+00
stocproc.method_ft - INFO - J_w_min:1.00e-07 N 64 yields: interval [-1.00e+04,1.00e+04] diff 2.84e+00
stocproc.method_ft - INFO - J_w_min:1.00e-06 N 128 yields: interval [-3.16e+03,3.16e+03] diff 1.66e+00
stocproc.method_ft - INFO - J_w_min:1.00e-05 N 256 yields: interval [-9.99e+02,1.00e+03] diff 5.63e-02
stocproc.method_ft - INFO - J_w_min:1.00e-04 N 512 yields: interval [-3.15e+02,3.17e+02] diff 6.33e-02
stocproc.method_ft - INFO - J_w_min:1.00e-09 N 32 yields: interval [-3.16e+04,3.16e+04] diff 3.14e+00
stocproc.method_ft - INFO - J_w_min:1.00e-08 N 64 yields: interval [-1.00e+04,1.00e+04] diff 3.11e+00
stocproc.method_ft - INFO - J_w_min:1.00e-07 N 128 yields: interval [-3.16e+03,3.16e+03] diff 2.95e+00
stocproc.method_ft - INFO - J_w_min:1.00e-06 N 256 yields: interval [-9.99e+02,1.00e+03] diff 2.10e+00
stocproc.method_ft - INFO - J_w_min:1.00e-05 N 512 yields: interval [-3.15e+02,3.17e+02] diff 2.47e-01
stocproc.method_ft - INFO - J_w_min:1.00e-04 N 1024 yields: interval [-9.90e+01,1.01e+02] diff 2.00e-02
stocproc.method_ft - INFO - J_w_min:1.00e-03 N 2048 yields: interval [-3.06e+01,3.26e+01] diff 6.33e-02
stocproc.method_ft - INFO - increasing N while shrinking the interval does lower the error -> try next level
stocproc.method_ft - INFO - J_w_min:1.00e-09 N 32 yields: interval [-1.00e+05,1.00e+05] diff 3.13e+00
stocproc.method_ft - INFO - J_w_min:1.00e-08 N 64 yields: interval [-3.16e+04,3.16e+04] diff 3.04e+00
stocproc.method_ft - INFO - J_w_min:1.00e-07 N 128 yields: interval [-1.00e+04,1.00e+04] diff 2.57e+00
stocproc.method_ft - INFO - J_w_min:1.00e-06 N 256 yields: interval [-3.16e+03,3.16e+03] diff 8.81e-01
stocproc.method_ft - INFO - J_w_min:1.00e-05 N 512 yields: interval [-9.99e+02,1.00e+03] diff 2.00e-02
stocproc.method_ft - INFO - J_w_min:1.00e-04 N 1024 yields: interval [-3.15e+02,3.17e+02] diff 6.33e-02
stocproc.method_ft - INFO - J_w_min:1.00e-10 N 32 yields: interval [-1.00e+05,1.00e+05] diff 3.14e+00
stocproc.method_ft - INFO - J_w_min:1.00e-09 N 64 yields: interval [-3.16e+04,3.16e+04] diff 3.13e+00
stocproc.method_ft - INFO - J_w_min:1.00e-08 N 128 yields: interval [-1.00e+04,1.00e+04] diff 3.08e+00
stocproc.method_ft - INFO - J_w_min:1.00e-07 N 256 yields: interval [-3.16e+03,3.16e+03] diff 2.77e+00
stocproc.method_ft - INFO - J_w_min:1.00e-06 N 512 yields: interval [-9.99e+02,1.00e+03] diff 1.41e+00
stocproc.method_ft - INFO - J_w_min:1.00e-05 N 1024 yields: interval [-3.15e+02,3.17e+02] diff 1.94e-02
stocproc.method_ft - INFO - J_w_min:1.00e-04 N 2048 yields: interval [-9.90e+01,1.01e+02] diff 2.00e-02
stocproc.method_ft - INFO - increasing N while shrinking the interval does lower the error -> try next level
stocproc.method_ft - INFO - J_w_min:1.00e-10 N 32 yields: interval [-3.16e+05,3.16e+05] diff 3.14e+00
stocproc.method_ft - INFO - J_w_min:1.00e-09 N 64 yields: interval [-1.00e+05,1.00e+05] diff 3.11e+00
stocproc.method_ft - INFO - J_w_min:1.00e-08 N 128 yields: interval [-3.16e+04,3.16e+04] diff 2.95e+00
stocproc.method_ft - INFO - J_w_min:1.00e-07 N 256 yields: interval [-1.00e+04,1.00e+04] diff 2.10e+00
stocproc.method_ft - INFO - J_w_min:1.00e-06 N 512 yields: interval [-3.16e+03,3.16e+03] diff 2.47e-01
stocproc.method_ft - INFO - J_w_min:1.00e-05 N 1024 yields: interval [-9.99e+02,1.00e+03] diff 2.00e-02
stocproc.method_ft - INFO - J_w_min:1.00e-04 N 2048 yields: interval [-3.15e+02,3.17e+02] diff 6.33e-02
stocproc.method_ft - INFO - increasing N while shrinking the interval does lower the error -> try next level
stocproc.method_ft - INFO - J_w_min:1.00e-11 N 32 yields: interval [-1.00e+06,1.00e+06] diff 3.14e+00
stocproc.method_ft - INFO - J_w_min:1.00e-10 N 64 yields: interval [-3.16e+05,3.16e+05] diff 3.13e+00
stocproc.method_ft - INFO - J_w_min:1.00e-09 N 128 yields: interval [-1.00e+05,1.00e+05] diff 3.08e+00
stocproc.method_ft - INFO - J_w_min:1.00e-08 N 256 yields: interval [-3.16e+04,3.16e+04] diff 2.77e+00
stocproc.method_ft - INFO - J_w_min:1.00e-07 N 512 yields: interval [-1.00e+04,1.00e+04] diff 1.41e+00
stocproc.method_ft - INFO - J_w_min:1.00e-06 N 1024 yields: interval [-3.16e+03,3.16e+03] diff 1.94e-02
stocproc.method_ft - INFO - J_w_min:1.00e-05 N 2048 yields: interval [-9.99e+02,1.00e+03] diff 2.00e-02
stocproc.method_ft - INFO - increasing N while shrinking the interval does lower the error -> try next level
stocproc.method_ft - INFO - J_w_min:1.00e-12 N 32 yields: interval [-3.16e+06,3.16e+06] diff 3.14e+00
stocproc.method_ft - INFO - J_w_min:1.00e-11 N 64 yields: interval [-1.00e+06,1.00e+06] diff 3.14e+00
stocproc.method_ft - INFO - J_w_min:1.00e-10 N 128 yields: interval [-3.16e+05,3.16e+05] diff 3.12e+00
stocproc.method_ft - INFO - J_w_min:1.00e-09 N 256 yields: interval [-1.00e+05,1.00e+05] diff 3.02e+00
stocproc.method_ft - INFO - J_w_min:1.00e-08 N 512 yields: interval [-3.16e+04,3.16e+04] diff 2.44e+00
stocproc.method_ft - INFO - J_w_min:1.00e-07 N 1024 yields: interval [-1.00e+04,1.00e+04] diff 6.29e-01
stocproc.method_ft - INFO - J_w_min:1.00e-06 N 2048 yields: interval [-3.16e+03,3.16e+03] diff 6.32e-03
stocproc.method_ft - INFO - J_w_min:1.00e-11 N 32 yields: interval [-3.16e+05,3.16e+05] diff 3.14e+00
stocproc.method_ft - INFO - J_w_min:1.00e-10 N 64 yields: interval [-1.00e+05,1.00e+05] diff 3.14e+00
stocproc.method_ft - INFO - J_w_min:1.00e-09 N 128 yields: interval [-3.16e+04,3.16e+04] diff 3.12e+00
stocproc.method_ft - INFO - J_w_min:1.00e-08 N 256 yields: interval [-1.00e+04,1.00e+04] diff 3.02e+00
stocproc.method_ft - INFO - J_w_min:1.00e-07 N 512 yields: interval [-3.16e+03,3.16e+03] diff 2.44e+00
stocproc.method_ft - INFO - J_w_min:1.00e-06 N 1024 yields: interval [-9.99e+02,1.00e+03] diff 6.29e-01
stocproc.method_ft - INFO - J_w_min:1.00e-05 N 2048 yields: interval [-3.15e+02,3.17e+02] diff 6.32e-03
stocproc.method_ft - INFO - return, cause tol of 0.01 was reached
stocproc.method_ft - INFO - requires dx < 3.088e+00
stocproc.method_ft - INFO - increase N to match dt_new*(N-1) < t_max
stocproc.stocproc - INFO - Fourier Integral Boundaries: [-3.161e+03, 3.163e+03]
stocproc.stocproc - INFO - Number of Nodes : 16384
stocproc.stocproc - INFO - yields dx : 3.860e-01
stocproc.stocproc - INFO - yields dt : 9.935e-04
stocproc.stocproc - INFO - yields t_max : 1.628e+01
stocproc.method_ft - INFO - requires dx < 3.088e-01
stocproc.stocproc - INFO - Fourier Integral Boundaries: [-3.152e+02, 3.172e+02]
stocproc.stocproc - INFO - Number of Nodes : 2048
stocproc.stocproc - INFO - yields dx : 3.088e-01
stocproc.stocproc - INFO - yields dt : 9.935e-03
stocproc.stocproc - INFO - yields t_max : 2.034e+01
#+end_example
Let's plot it.
@ -182,12 +176,12 @@ Let's plot it.
#+RESULTS:
:RESULTS:
: stocproc.stocproc - INFO - use fixed seed (1) for new process
| <matplotlib.lines.Line2D | at | 0x7fdf677cff40> |
| <matplotlib.lines.Line2D | at | 0x7fdf677d93d0> |
| <matplotlib.lines.Line2D | at | 0x7f1609888a30> |
| <matplotlib.lines.Line2D | at | 0x7f1609888ee0> |
: Text(0, 0.5, 'η')
: Text(0.5, 0, 'τ')
: <matplotlib.legend.Legend at 0x7fdf677e1d60>
[[file:./.ob-jupyter/9c7b7e3950aefea89da8b607528feed1820a6a17.svg]]
: <matplotlib.legend.Legend at 0x7f1609888ca0>
[[file:./.ob-jupyter/4fed2a9479b6fdd1e3607dfae49a7c5ff02017a2.svg]]
:END:
** Actual Hops
@ -197,8 +191,8 @@ Let's plot it.
#+end_src
#+RESULTS:
: array([ 0. -1.j , -1.00858495+5.29718907j,
: -5. +0.j , 0. +0.j ,
: array([ 0. -1.j , -0.09725206+1.04291732j,
: -0.1 +0.j , 0. +0.j ,
: 0. +0.j , 0. +0.j ,
: 0. +0.j , 0. +0.j ])
@ -217,12 +211,12 @@ Let's plot it.
#+RESULTS:
:RESULTS:
| <matplotlib.lines.Line2D | at | 0x7fdf675d0d30> |
[[file:./.ob-jupyter/fe0476ee8777c7abb421394474bfcd16bb1931f6.svg]]
| <matplotlib.lines.Line2D | at | 0x7f160a8d3b20> |
[[file:./.ob-jupyter/e0008afdffe9110ef1e621d637674c9d6a7263a3.svg]]
:END:
#+begin_src jupyter-python
ts, ρs = hops.integrate_hops_ensemble(η, H_s, L, W, 10, [1, 0], τ_max, 100)
ts, ρs = hops.integrate_hops_ensemble(η, H_s, L, W, 4, [1, 0], τ_max, 1000)
#+end_src
#+RESULTS:
@ -234,8 +228,8 @@ Let's plot it.
#+RESULTS:
:RESULTS:
: /nix/store/b31vrvsyrlpp4xj9dpd1nmdffy2il1vz-python3-3.9.4-env/lib/python3.9/site-packages/numpy/core/_asarray.py:102: ComplexWarning: Casting complex values to real discards the imaginary part
: /nix/store/z1lf15g2zxp79fwaajlnim22xxwh293l-python3-3.9.4-env/lib/python3.9/site-packages/numpy/core/_asarray.py:102: ComplexWarning: Casting complex values to real discards the imaginary part
: return array(a, dtype, copy=False, order=order)
| <matplotlib.lines.Line2D | at | 0x7fdf66fd8ca0> |
[[file:./.ob-jupyter/241478e9f436f656d8b7cff757931a6ae7a81ca9.svg]]
| <matplotlib.lines.Line2D | at | 0x7f160a6e1130> |
[[file:./.ob-jupyter/2bea9d1f2f5d4f0385bad209290439581ffe7afa.svg]]
:END: