mirror of
https://github.com/vale981/master-thesis
synced 2025-03-04 17:41:43 -05:00
10: less init
This commit is contained in:
parent
b5d11ad802
commit
477399880b
3 changed files with 22 additions and 52 deletions
|
@ -31,7 +31,7 @@ from anti_zeno_engine import *
|
||||||
ε=1,#.1,
|
ε=1,#.1,
|
||||||
ω_c=1,
|
ω_c=1,
|
||||||
ε_couple=.68,
|
ε_couple=.68,
|
||||||
n=40,
|
n=35,
|
||||||
detune=.5,
|
detune=.5,
|
||||||
ω_0=20,
|
ω_0=20,
|
||||||
T_c=5e3,
|
T_c=5e3,
|
||||||
|
@ -40,7 +40,7 @@ from anti_zeno_engine import *
|
||||||
γ=.2,
|
γ=.2,
|
||||||
switch_cycles=1,
|
switch_cycles=1,
|
||||||
therm_initial_state=False,
|
therm_initial_state=False,
|
||||||
ε_init=.000001/2,
|
ε_init=.001/2,
|
||||||
terms=7,
|
terms=7,
|
||||||
dt=0.01/2,
|
dt=0.01/2,
|
||||||
sp_tol=1e-4,
|
sp_tol=1e-4,
|
||||||
|
@ -66,7 +66,7 @@ plot_az_sd_overview(model, params)
|
||||||
|
|
||||||
plot_total_power(model, params)
|
plot_total_power(model, params)
|
||||||
|
|
||||||
plot_excited_state(model, params)
|
plot_excited_state(model, params, with_init=True)
|
||||||
|
|
||||||
plot_coherences(model, params)
|
plot_coherences(model, params)
|
||||||
|
|
||||||
|
|
|
@ -248,12 +248,12 @@ def plot_az_sd_overview(model, params, ax=None):
|
||||||
|
|
||||||
ax.plot(
|
ax.plot(
|
||||||
ωs,
|
ωs,
|
||||||
model.full_thermal_spectral_density(0)(ωs),
|
model.full_thermal_spectral_density(0)(ωs) * model.bcf_scales[0],
|
||||||
label="Cold Bath",
|
label="Cold Bath",
|
||||||
)
|
)
|
||||||
ax.plot(
|
ax.plot(
|
||||||
ωs,
|
ωs,
|
||||||
model.full_thermal_spectral_density(1)(ωs),
|
model.full_thermal_spectral_density(1)(ωs) * model.bcf_scales[1],
|
||||||
label="Hot Bath",
|
label="Hot Bath",
|
||||||
)
|
)
|
||||||
ax.axvline(model.H.operator_norm(0) * 2 + params.Δ)
|
ax.axvline(model.H.operator_norm(0) * 2 + params.Δ)
|
||||||
|
|
|
@ -27,7 +27,7 @@ Init ray and silence stocproc.
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+RESULTS:
|
#+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
|
#+begin_src jupyter-python :results none
|
||||||
from hops.util.logging_setup import logging_setup
|
from hops.util.logging_setup import logging_setup
|
||||||
|
@ -49,7 +49,7 @@ Init ray and silence stocproc.
|
||||||
ε=1,#.1,
|
ε=1,#.1,
|
||||||
ω_c=1,
|
ω_c=1,
|
||||||
ε_couple=.68,
|
ε_couple=.68,
|
||||||
n=40,
|
n=35,
|
||||||
detune=.5,
|
detune=.5,
|
||||||
ω_0=20,
|
ω_0=20,
|
||||||
T_c=5e3,
|
T_c=5e3,
|
||||||
|
@ -58,7 +58,7 @@ Init ray and silence stocproc.
|
||||||
γ=.2,
|
γ=.2,
|
||||||
switch_cycles=1,
|
switch_cycles=1,
|
||||||
therm_initial_state=False,
|
therm_initial_state=False,
|
||||||
ε_init=.000001/2,
|
ε_init=.001/2,
|
||||||
terms=7,
|
terms=7,
|
||||||
dt=0.01/2,
|
dt=0.01/2,
|
||||||
sp_tol=1e-4,
|
sp_tol=1e-4,
|
||||||
|
@ -79,6 +79,12 @@ Init ray and silence stocproc.
|
||||||
pu.plot_complex(ts, proc(ts) * model.bcf_scales[1])
|
pu.plot_complex(ts, proc(ts) * model.bcf_scales[1])
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+RESULTS:
|
||||||
|
:RESULTS:
|
||||||
|
| <Figure | size | 520x320 | with | 1 | Axes> | <AxesSubplot:> |
|
||||||
|
[[file:./.ob-jupyter/458ed32f5b39dff70d717cc2593889573946a962.svg]]
|
||||||
|
:END:
|
||||||
|
|
||||||
|
|
||||||
#+begin_src jupyter-python
|
#+begin_src jupyter-python
|
||||||
params.cycles
|
params.cycles
|
||||||
|
@ -105,7 +111,7 @@ Init ray and silence stocproc.
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
:RESULTS:
|
:RESULTS:
|
||||||
| <Figure | size | 520x320 | with | 1 | Axes> | <AxesSubplot:xlabel= | $\tau$ | > |
|
| <Figure | size | 520x320 | with | 1 | Axes> | <AxesSubplot:xlabel= | $\tau$ | > |
|
||||||
[[file:./.ob-jupyter/2a8f8502ac9e11101c59c75c15da03cab48dbc86.svg]]
|
[[file:./.ob-jupyter/1f7ffd13448c6001e2f81fb22d1fa2c919b497ab.svg]]
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
#+begin_src jupyter-python
|
#+begin_src jupyter-python
|
||||||
|
@ -126,53 +132,17 @@ Init ray and silence stocproc.
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
:RESULTS:
|
:RESULTS:
|
||||||
| <Figure | size | 520x320 | with | 1 | Axes> | <AxesSubplot:> |
|
| <Figure | size | 520x320 | with | 1 | Axes> | <AxesSubplot:> |
|
||||||
[[file:./.ob-jupyter/a2ee618f4377def0d3f99b20f4d3fc914cbb1198.svg]]
|
[[file:./.ob-jupyter/ad693ff3d3c543c7fc8bcf66c226d1ee53e1f3b9.svg]]
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
#+begin_src jupyter-python
|
#+begin_src jupyter-python
|
||||||
plot_excited_state(model, params)
|
plot_excited_state(model, params, with_init=True)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
:RESULTS:
|
:RESULTS:
|
||||||
# [goto error]
|
| <Figure | size | 520x320 | with | 1 | Axes> | <AxesSubplot:> |
|
||||||
#+begin_example
|
[[file:./.ob-jupyter/5ab38efefb7c03476efb3dea22c64715e4c7131f.svg]]
|
||||||
[0;31m---------------------------------------------------------------------------[0m
|
|
||||||
[0;31mRuntimeError[0m Traceback (most recent call last)
|
|
||||||
Input [0;32mIn [57][0m, in [0;36m<cell line: 1>[0;34m()[0m
|
|
||||||
[0;32m----> 1[0m [43mplot_excited_state[49m[43m([49m[43mmodel[49m[43m,[49m[43m [49m[43mparams[49m[43m)[49m
|
|
||||||
|
|
||||||
File [0;32m~/Documents/Projects/UNI/master/masterarb/python/energy_flow_proper/10_antizeno_engine/plot_utils.py:40[0m, in [0;36mwrap_plot.<locals>.wrapped[0;34m(ax, setup_function, *args, **kwargs)[0m
|
|
||||||
[1;32m 37[0m [38;5;28;01mif[39;00m [38;5;129;01mnot[39;00m ax:
|
|
||||||
[1;32m 38[0m fig, ax [38;5;241m=[39m setup_function()
|
|
||||||
[0;32m---> 40[0m ret_val [38;5;241m=[39m [43mf[49m[43m([49m[38;5;241;43m*[39;49m[43margs[49m[43m,[49m[43m [49m[43max[49m[38;5;241;43m=[39;49m[43max[49m[43m,[49m[43m [49m[38;5;241;43m*[39;49m[38;5;241;43m*[39;49m[43mkwargs[49m[43m)[49m
|
|
||||||
[1;32m 41[0m [38;5;28;01mreturn[39;00m (fig, ax, ret_val) [38;5;28;01mif[39;00m ret_val [38;5;28;01melse[39;00m (fig, ax)
|
|
||||||
|
|
||||||
File [0;32m~/Documents/Projects/UNI/master/masterarb/python/energy_flow_proper/10_antizeno_engine/anti_zeno_engine.py:285[0m, in [0;36mplot_excited_state[0;34m(model, params, ax, with_init)[0m
|
|
||||||
[1;32m 283[0m [38;5;129m@wrap_plot[39m
|
|
||||||
[1;32m 284[0m [38;5;28;01mdef[39;00m [38;5;21mplot_excited_state[39m(model, params, ax[38;5;241m=[39m[38;5;28;01mNone[39;00m, with_init[38;5;241m=[39m[38;5;28;01mFalse[39;00m):
|
|
||||||
[0;32m--> 285[0m [38;5;28;01mwith[39;00m [43maux[49m[38;5;241;43m.[39;49m[43mget_data[49m[43m([49m[43mmodel[49m[43m)[49m [38;5;28;01mas[39;00m data:
|
|
||||||
[1;32m 286[0m mask [38;5;241m=[39m model[38;5;241m.[39mt [38;5;241m>[39m[38;5;241m=[39m [38;5;241m0[39m [38;5;28;01mif[39;00m with_init [38;5;28;01melse[39;00m model[38;5;241m.[39mt [38;5;241m>[39m params[38;5;241m.[39mτ_init
|
|
||||||
[1;32m 288[0m plot_with_σ(
|
|
||||||
[1;32m 289[0m model[38;5;241m.[39mt[mask],
|
|
||||||
[1;32m 290[0m [38;5;28mabs[39m(
|
|
||||||
[0;32m (...)[0m
|
|
||||||
[1;32m 298[0m ax[38;5;241m=[39max,
|
|
||||||
[1;32m 299[0m )
|
|
||||||
|
|
||||||
File [0;32m~/src/two_qubit_model/hiro_models/model_auxiliary.py:146[0m, in [0;36mget_data[0;34m(model, data_path, read_only, **kwargs)[0m
|
|
||||||
[1;32m 135[0m [38;5;28;01mreturn[39;00m HIData(
|
|
||||||
[1;32m 136[0m path,
|
|
||||||
[1;32m 137[0m hi_key[38;5;241m=[39mmodel[38;5;241m.[39mhops_config,
|
|
||||||
[0;32m (...)[0m
|
|
||||||
[1;32m 142[0m [38;5;241m*[39m[38;5;241m*[39mkwargs,
|
|
||||||
[1;32m 143[0m )
|
|
||||||
[1;32m 145[0m [38;5;28;01melse[39;00m:
|
|
||||||
[0;32m--> 146[0m [38;5;28;01mraise[39;00m [38;5;167;01mRuntimeError[39;00m([38;5;124mf[39m[38;5;124m"[39m[38;5;124mNo data found for model with hash [39m[38;5;124m'[39m[38;5;132;01m{[39;00mhexhash[38;5;132;01m}[39;00m[38;5;124m'[39m[38;5;124m.[39m[38;5;124m"[39m)
|
|
||||||
|
|
||||||
[0;31mRuntimeError[0m: No data found for model with hash '043441e996b658af99b232ace67ecc5c8d9ff76b8190a6707bf2556908770a5c'.
|
|
||||||
#+end_example
|
|
||||||
[[file:./.ob-jupyter/6140cc8a5adedec7ec2beecd22a919c202fd1f03.svg]]
|
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
#+begin_src jupyter-python
|
#+begin_src jupyter-python
|
||||||
|
@ -182,7 +152,7 @@ Init ray and silence stocproc.
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
:RESULTS:
|
:RESULTS:
|
||||||
| <Figure | size | 520x320 | with | 1 | Axes> | <AxesSubplot:> |
|
| <Figure | size | 520x320 | with | 1 | Axes> | <AxesSubplot:> |
|
||||||
[[file:./.ob-jupyter/39b065c6a65911b3349c41e28138c9e15ff080da.svg]]
|
[[file:./.ob-jupyter/b53ff9a196a6e3f854b4fac57edc3a4f6341ab5c.svg]]
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
|
|
||||||
|
@ -192,6 +162,6 @@ Init ray and silence stocproc.
|
||||||
|
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
:RESULTS:
|
:RESULTS:
|
||||||
| <Figure | size | 520x320 | with | 1 | Axes> | <AxesSubplot:title= | (center : \(\bar{P}=-0.00092\pm 0.00015\)) | xlabel= | $\tau$ | ylabel= | $\langle{P}\rangle$ | > | EnsembleValue | (((40000 -0.000918483945087149 0.00014770367528033136))) |
|
| <Figure | size | 520x320 | with | 1 | Axes> | <AxesSubplot:title= | (center : \(\bar{P}=0.00043\pm 0.00015\)) | xlabel= | $\tau$ | ylabel= | $\langle{P}\rangle$ | > | EnsembleValue | (((20000 0.00043025179411284724 0.00014964069641804805))) |
|
||||||
[[file:./.ob-jupyter/833c93cdbf0589c458fc058a3db8852a1144950e.svg]]
|
[[file:./.ob-jupyter/857d74261d2e1c38fc8bb26c43a46e15552ede09.svg]]
|
||||||
:END:
|
:END:
|
||||||
|
|
Loading…
Add table
Reference in a new issue