From 477399880b02c9af837f76380ae874bb1d4de0ff Mon Sep 17 00:00:00 2001 From: Valentin Boettcher Date: Fri, 26 Aug 2022 10:28:08 +0200 Subject: [PATCH] 10: less init --- .../10_first_anti_zeno_cc.py | 6 +- .../10_antizeno_engine/anti_zeno_engine.py | 4 +- .../10_antizeno_engine/continously_couple.org | 64 +++++-------------- 3 files changed, 22 insertions(+), 52 deletions(-) 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 9fd6740..15976e4 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 @@ -31,7 +31,7 @@ from anti_zeno_engine import * ε=1,#.1, ω_c=1, ε_couple=.68, - n=40, + n=35, detune=.5, ω_0=20, T_c=5e3, @@ -40,7 +40,7 @@ from anti_zeno_engine import * γ=.2, switch_cycles=1, therm_initial_state=False, - ε_init=.000001/2, + ε_init=.001/2, terms=7, dt=0.01/2, sp_tol=1e-4, @@ -66,7 +66,7 @@ plot_az_sd_overview(model, params) plot_total_power(model, params) -plot_excited_state(model, params) +plot_excited_state(model, params, with_init=True) plot_coherences(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 bab0e27..c7064f4 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 @@ -248,12 +248,12 @@ def plot_az_sd_overview(model, params, ax=None): ax.plot( ωs, - model.full_thermal_spectral_density(0)(ωs), + model.full_thermal_spectral_density(0)(ωs) * model.bcf_scales[0], label="Cold Bath", ) ax.plot( ωs, - model.full_thermal_spectral_density(1)(ωs), + model.full_thermal_spectral_density(1)(ωs) * model.bcf_scales[1], label="Hot Bath", ) ax.axvline(model.H.operator_norm(0) * 2 + params.Δ) 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 621d086..1325229 100644 --- a/python/energy_flow_proper/10_antizeno_engine/continously_couple.org +++ b/python/energy_flow_proper/10_antizeno_engine/continously_couple.org @@ -27,7 +27,7 @@ Init ray and silence stocproc. #+end_src #+RESULTS: -: RayContext(dashboard_url='', python_version='3.9.13', ray_version='1.13.0', ray_commit='e4ce38d001dbbe09cd21c497fedd03d692b2be3e', address_info={'node_ip_address': '192.168.100.170', 'raylet_ip_address': '192.168.100.170', 'redis_address': None, 'object_store_address': '/tmp/ray/session_2022-08-14_15-01-34_034850_14258/sockets/plasma_store', 'raylet_socket_name': '/tmp/ray/session_2022-08-14_15-01-34_034850_14258/sockets/raylet', 'webui_url': '', 'session_dir': '/tmp/ray/session_2022-08-14_15-01-34_034850_14258', 'metrics_export_port': 45019, 'gcs_address': '192.168.100.170:53722', 'address': '192.168.100.170:53722', 'node_id': '2369bf21ce3f134ac9781d678096447e25ad28328ed1d38ad4f5c777'}) +: RayContext(dashboard_url='', python_version='3.9.13', ray_version='1.13.0', ray_commit='e4ce38d001dbbe09cd21c497fedd03d692b2be3e', address_info={'node_ip_address': '141.30.17.225', 'raylet_ip_address': '141.30.17.225', 'redis_address': None, 'object_store_address': '/tmp/ray/session_2022-08-26_09-16-24_372243_434989/sockets/plasma_store', 'raylet_socket_name': '/tmp/ray/session_2022-08-26_09-16-24_372243_434989/sockets/raylet', 'webui_url': '', 'session_dir': '/tmp/ray/session_2022-08-26_09-16-24_372243_434989', 'metrics_export_port': 64820, 'gcs_address': '141.30.17.225:62541', 'address': '141.30.17.225:62541', 'node_id': 'b13e6e8fe3cb7e0a8e40b763d39febfe0bac4a37ea2d205950b6dc19'}) #+begin_src jupyter-python :results none from hops.util.logging_setup import logging_setup @@ -49,7 +49,7 @@ Init ray and silence stocproc. ε=1,#.1, ω_c=1, ε_couple=.68, - n=40, + n=35, detune=.5, ω_0=20, T_c=5e3, @@ -58,7 +58,7 @@ Init ray and silence stocproc. γ=.2, switch_cycles=1, therm_initial_state=False, - ε_init=.000001/2, + ε_init=.001/2, terms=7, dt=0.01/2, sp_tol=1e-4, @@ -79,6 +79,12 @@ Init ray and silence stocproc. pu.plot_complex(ts, proc(ts) * model.bcf_scales[1]) #+end_src +#+RESULTS: +:RESULTS: +|
| | +[[file:./.ob-jupyter/458ed32f5b39dff70d717cc2593889573946a962.svg]] +:END: + #+begin_src jupyter-python params.cycles @@ -105,7 +111,7 @@ Init ray and silence stocproc. #+RESULTS: :RESULTS: |
| | -[[file:./.ob-jupyter/2a8f8502ac9e11101c59c75c15da03cab48dbc86.svg]] +[[file:./.ob-jupyter/1f7ffd13448c6001e2f81fb22d1fa2c919b497ab.svg]] :END: #+begin_src jupyter-python @@ -126,53 +132,17 @@ Init ray and silence stocproc. #+RESULTS: :RESULTS: |
| | -[[file:./.ob-jupyter/a2ee618f4377def0d3f99b20f4d3fc914cbb1198.svg]] +[[file:./.ob-jupyter/ad693ff3d3c543c7fc8bcf66c226d1ee53e1f3b9.svg]] :END: #+begin_src jupyter-python - plot_excited_state(model, params) + plot_excited_state(model, params, with_init=True) #+end_src #+RESULTS: :RESULTS: -# [goto error] -#+begin_example - --------------------------------------------------------------------------- - RuntimeError Traceback (most recent call last) - Input In [57], in () - ----> 1 plot_excited_state(model, params) - - File ~/Documents/Projects/UNI/master/masterarb/python/energy_flow_proper/10_antizeno_engine/plot_utils.py:40, in wrap_plot..wrapped(ax, setup_function, *args, **kwargs) -  37 if not ax: -  38 fig, ax = setup_function() - ---> 40 ret_val = f(*args, ax=ax, **kwargs) -  41 return (fig, ax, ret_val) if ret_val else (fig, ax) - - File ~/Documents/Projects/UNI/master/masterarb/python/energy_flow_proper/10_antizeno_engine/anti_zeno_engine.py:285, in plot_excited_state(model, params, ax, with_init) -  283 @wrap_plot -  284 def plot_excited_state(model, params, ax=None, with_init=False): - --> 285 with aux.get_data(model) as data: -  286 mask = model.t >= 0 if with_init else model.t > params.τ_init -  288 plot_with_σ( -  289 model.t[mask], -  290 abs( -  (...) -  298 ax=ax, -  299 ) - - File ~/src/two_qubit_model/hiro_models/model_auxiliary.py:146, in get_data(model, data_path, read_only, **kwargs) -  135 return HIData( -  136 path, -  137 hi_key=model.hops_config, -  (...) -  142 **kwargs, -  143 ) -  145 else: - --> 146 raise RuntimeError(f"No data found for model with hash '{hexhash}'.") - - RuntimeError: No data found for model with hash '043441e996b658af99b232ace67ecc5c8d9ff76b8190a6707bf2556908770a5c'. -#+end_example -[[file:./.ob-jupyter/6140cc8a5adedec7ec2beecd22a919c202fd1f03.svg]] +|
| | +[[file:./.ob-jupyter/5ab38efefb7c03476efb3dea22c64715e4c7131f.svg]] :END: #+begin_src jupyter-python @@ -182,7 +152,7 @@ Init ray and silence stocproc. #+RESULTS: :RESULTS: |
| | -[[file:./.ob-jupyter/39b065c6a65911b3349c41e28138c9e15ff080da.svg]] +[[file:./.ob-jupyter/b53ff9a196a6e3f854b4fac57edc3a4f6341ab5c.svg]] :END: @@ -192,6 +162,6 @@ Init ray and silence stocproc. #+RESULTS: :RESULTS: -|
| | EnsembleValue | (((40000 -0.000918483945087149 0.00014770367528033136))) | -[[file:./.ob-jupyter/833c93cdbf0589c458fc058a3db8852a1144950e.svg]] +|
| | EnsembleValue | (((20000 0.00043025179411284724 0.00014964069641804805))) | +[[file:./.ob-jupyter/857d74261d2e1c38fc8bb26c43a46e15552ede09.svg]] :END: