mirror of
https://github.com/vale981/master-thesis
synced 2025-03-05 10:01:43 -05:00
looking good, need longer init
This commit is contained in:
parent
de12327d39
commit
d59b23f0a1
2 changed files with 77 additions and 25 deletions
|
@ -313,9 +313,7 @@ with aux.get_data(model) as data:
|
|||
|
||||
ρ_ee = data.rho_t_accum.mean[:, 0, 0].real
|
||||
|
||||
# plt.plot(model.t, ρ_ee)
|
||||
|
||||
plt.plot(model.t, ut.smoothen(model.t, ρ_ee, frac=.06, it=0))
|
||||
plt.plot(model.t, ut.smoothen(model.t, ρ_ee, frac=.5, it=0))
|
||||
|
||||
with aux.get_data(model) as data:
|
||||
_, ax = plt.subplots()
|
||||
|
@ -326,7 +324,6 @@ with aux.get_data(model) as data:
|
|||
|
||||
pu.plot_with_σ(model.t, model.total_energy(data), ax=ax)
|
||||
#pu.plot_with_σ(model.t, model.interaction_energy(data).for_bath(1), ax=ax)
|
||||
|
||||
#pu.plot_with_σ(model.t, model.system_energy(data), ax=ax)
|
||||
#pu.plot_with_σ(model.t, model.system_energy(data) + model.bath_energy(data).sum_baths(), ax=ax)
|
||||
#ax.plot(model.t, ut.smoothen(model.t, model.total_energy(data).value, frac=.1))
|
||||
|
@ -367,7 +364,7 @@ for begin, end in zip(ind_begin, ind_end):
|
|||
(tot_power.slice(begin, end)).mean
|
||||
)
|
||||
|
||||
steady_index = 4
|
||||
steady_index = 0
|
||||
power = sum(powers[steady_index:]) * (1/(len(powers[steady_index:])))
|
||||
|
||||
ax.set_ylabel(r"$\langle{P}\rangle$")
|
||||
|
|
|
@ -27,7 +27,62 @@ 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': '141.30.17.225', 'raylet_ip_address': '141.30.17.225', 'redis_address': None, 'object_store_address': '/tmp/ray/session_2022-08-04_11-17-18_747252_106699/sockets/plasma_store', 'raylet_socket_name': '/tmp/ray/session_2022-08-04_11-17-18_747252_106699/sockets/raylet', 'webui_url': '', 'session_dir': '/tmp/ray/session_2022-08-04_11-17-18_747252_106699', 'metrics_export_port': 62354, 'gcs_address': '141.30.17.225:53570', 'address': '141.30.17.225:53570', 'node_id': '079f1adbf34279fae2fd8852983a78a23ac1e68ab6ead506e1bb1467'})
|
||||
:RESULTS:
|
||||
# [goto error]
|
||||
#+begin_example
|
||||
[0;31m---------------------------------------------------------------------------[0m
|
||||
[0;31mConnectionError[0m Traceback (most recent call last)
|
||||
Input [0;32mIn [2][0m, in [0;36m<cell line: 3>[0;34m()[0m
|
||||
[1;32m 1[0m [38;5;28;01mimport[39;00m [38;5;21;01mray[39;00m
|
||||
[1;32m 2[0m ray[38;5;241m.[39mshutdown()
|
||||
[0;32m----> 3[0m [43mray[49m[38;5;241;43m.[39;49m[43minit[49m[43m([49m[43maddress[49m[38;5;241;43m=[39;49m[38;5;124;43m"[39;49m[38;5;124;43mauto[39;49m[38;5;124;43m"[39;49m[43m)[49m
|
||||
|
||||
File [0;32m/nix/store/zm0dbvm6kc79il5713w847760r9wxs2m-python3-3.9.13-env/lib/python3.9/site-packages/ray/_private/client_mode_hook.py:105[0m, in [0;36mclient_mode_hook.<locals>.wrapper[0;34m(*args, **kwargs)[0m
|
||||
[1;32m 103[0m [38;5;28;01mif[39;00m func[38;5;241m.[39m[38;5;18m__name__[39m [38;5;241m!=[39m [38;5;124m"[39m[38;5;124minit[39m[38;5;124m"[39m [38;5;129;01mor[39;00m is_client_mode_enabled_by_default:
|
||||
[1;32m 104[0m [38;5;28;01mreturn[39;00m [38;5;28mgetattr[39m(ray, func[38;5;241m.[39m[38;5;18m__name__[39m)([38;5;241m*[39margs, [38;5;241m*[39m[38;5;241m*[39mkwargs)
|
||||
[0;32m--> 105[0m [38;5;28;01mreturn[39;00m [43mfunc[49m[43m([49m[38;5;241;43m*[39;49m[43margs[49m[43m,[49m[43m [49m[38;5;241;43m*[39;49m[38;5;241;43m*[39;49m[43mkwargs[49m[43m)[49m
|
||||
|
||||
File [0;32m/nix/store/zm0dbvm6kc79il5713w847760r9wxs2m-python3-3.9.13-env/lib/python3.9/site-packages/ray/worker.py:954[0m, in [0;36minit[0;34m(address, num_cpus, num_gpus, resources, object_store_memory, local_mode, ignore_reinit_error, include_dashboard, dashboard_host, dashboard_port, job_config, configure_logging, logging_level, logging_format, log_to_driver, namespace, runtime_env, storage, _enable_object_reconstruction, _redis_max_memory, _plasma_directory, _node_ip_address, _driver_object_store_memory, _memory, _redis_password, _temp_dir, _metrics_export_port, _system_config, _tracing_startup_hook, _node_name, **kwargs)[0m
|
||||
[1;32m 952[0m bootstrap_address, redis_address, gcs_address [38;5;241m=[39m [38;5;28;01mNone[39;00m, [38;5;28;01mNone[39;00m, [38;5;28;01mNone[39;00m
|
||||
[1;32m 953[0m [38;5;28;01mif[39;00m address:
|
||||
[0;32m--> 954[0m bootstrap_address [38;5;241m=[39m [43mservices[49m[38;5;241;43m.[39;49m[43mcanonicalize_bootstrap_address[49m[43m([49m[43maddress[49m[43m)[49m
|
||||
[1;32m 955[0m [38;5;28;01massert[39;00m bootstrap_address [38;5;129;01mis[39;00m [38;5;129;01mnot[39;00m [38;5;28;01mNone[39;00m
|
||||
[1;32m 956[0m logger[38;5;241m.[39minfo(
|
||||
[1;32m 957[0m [38;5;124mf[39m[38;5;124m"[39m[38;5;124mConnecting to existing Ray cluster at address: [39m[38;5;132;01m{[39;00mbootstrap_address[38;5;132;01m}[39;00m[38;5;124m"[39m
|
||||
[1;32m 958[0m )
|
||||
|
||||
File [0;32m/nix/store/zm0dbvm6kc79il5713w847760r9wxs2m-python3-3.9.13-env/lib/python3.9/site-packages/ray/_private/services.py:451[0m, in [0;36mcanonicalize_bootstrap_address[0;34m(addr)[0m
|
||||
[1;32m 441[0m [38;5;124;03m"""Canonicalizes Ray cluster bootstrap address to host:port.[39;00m
|
||||
[1;32m 442[0m [38;5;124;03mReads address from the environment if needed.[39;00m
|
||||
[1;32m 443[0m
|
||||
[0;32m (...)[0m
|
||||
[1;32m 448[0m [38;5;124;03m Ray cluster address string in <host:port> format.[39;00m
|
||||
[1;32m 449[0m [38;5;124;03m"""[39;00m
|
||||
[1;32m 450[0m [38;5;28;01mif[39;00m addr [38;5;129;01mis[39;00m [38;5;28;01mNone[39;00m [38;5;129;01mor[39;00m addr [38;5;241m==[39m [38;5;124m"[39m[38;5;124mauto[39m[38;5;124m"[39m:
|
||||
[0;32m--> 451[0m addr [38;5;241m=[39m [43mget_ray_address_from_environment[49m[43m([49m[43m)[49m
|
||||
[1;32m 452[0m [38;5;28;01mtry[39;00m:
|
||||
[1;32m 453[0m bootstrap_address [38;5;241m=[39m resolve_ip_for_localhost(addr)
|
||||
|
||||
File [0;32m/nix/store/zm0dbvm6kc79il5713w847760r9wxs2m-python3-3.9.13-env/lib/python3.9/site-packages/ray/_private/services.py:358[0m, in [0;36mget_ray_address_from_environment[0;34m()[0m
|
||||
[1;32m 356[0m addr [38;5;241m=[39m os[38;5;241m.[39menviron[38;5;241m.[39mget(ray_constants[38;5;241m.[39mRAY_ADDRESS_ENVIRONMENT_VARIABLE)
|
||||
[1;32m 357[0m [38;5;28;01mif[39;00m addr [38;5;129;01mis[39;00m [38;5;28;01mNone[39;00m [38;5;129;01mor[39;00m addr [38;5;241m==[39m [38;5;124m"[39m[38;5;124mauto[39m[38;5;124m"[39m:
|
||||
[0;32m--> 358[0m addr [38;5;241m=[39m [43m_find_gcs_address_or_die[49m[43m([49m[43m)[49m
|
||||
[1;32m 359[0m [38;5;28;01mreturn[39;00m addr
|
||||
|
||||
File [0;32m/nix/store/zm0dbvm6kc79il5713w847760r9wxs2m-python3-3.9.13-env/lib/python3.9/site-packages/ray/_private/services.py:333[0m, in [0;36m_find_gcs_address_or_die[0;34m()[0m
|
||||
[1;32m 331[0m gcs_addresses [38;5;241m=[39m _find_address_from_flag([38;5;124m"[39m[38;5;124m--gcs-address[39m[38;5;124m"[39m)
|
||||
[1;32m 332[0m [38;5;28;01mif[39;00m [38;5;28mlen[39m(gcs_addresses) [38;5;241m>[39m [38;5;241m1[39m:
|
||||
[0;32m--> 333[0m [38;5;28;01mraise[39;00m [38;5;167;01mConnectionError[39;00m(
|
||||
[1;32m 334[0m [38;5;124mf[39m[38;5;124m"[39m[38;5;124mFound multiple active Ray instances: [39m[38;5;132;01m{[39;00mgcs_addresses[38;5;132;01m}[39;00m[38;5;124m. [39m[38;5;124m"[39m
|
||||
[1;32m 335[0m [38;5;124m"[39m[38;5;124mPlease specify the one to connect to by setting `--address` flag [39m[38;5;124m"[39m
|
||||
[1;32m 336[0m [38;5;124m"[39m[38;5;124mor `RAY_ADDRESS` environment variable.[39m[38;5;124m"[39m
|
||||
[1;32m 337[0m )
|
||||
[1;32m 338[0m sys[38;5;241m.[39mexit([38;5;241m1[39m)
|
||||
[1;32m 339[0m [38;5;28;01melif[39;00m [38;5;129;01mnot[39;00m gcs_addresses:
|
||||
|
||||
[0;31mConnectionError[0m: Found multiple active Ray instances: {'141.30.17.225:62313', '141.30.17.225:50182', '141.30.17.225:65147'}. Please specify the one to connect to by setting `--address` flag or `RAY_ADDRESS` environment variable.
|
||||
#+end_example
|
||||
:END:
|
||||
|
||||
#+begin_src jupyter-python :results none
|
||||
from hops.util.logging_setup import logging_setup
|
||||
|
@ -319,8 +374,8 @@ Let's test the assumptions of the paper.
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
: <matplotlib.legend.Legend at 0x7ff47b5d8f70>
|
||||
[[file:./.ob-jupyter/84c423a9401fb0410819d4df4fd07089f24fa24e.svg]]
|
||||
: <matplotlib.legend.Legend at 0x7f13b3f72e20>
|
||||
[[file:./.ob-jupyter/6731a563bc8b20945d52b785667f2e8efee540e9.svg]]
|
||||
:END:
|
||||
|
||||
#+begin_src jupyter-python :tangle nil
|
||||
|
@ -439,7 +494,7 @@ Let's test the assumptions of the paper.
|
|||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
[[file:./.ob-jupyter/50d1bb2a98247cea870e723c788bae09a3eb04ea.svg]]
|
||||
[[file:./.ob-jupyter/cce3efaf063c82f06c7cf8127c730600cde163dc.svg]]
|
||||
|
||||
- **too fast decoupling kills it**
|
||||
- no anti-zeno effects without detuning?
|
||||
|
@ -466,31 +521,29 @@ Let's test the assumptions of the paper.
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
: /nix/store/akzgacnj2l97sldws5cnxjlgv27317xd-python3-3.9.13-env/lib/python3.9/site-packages/matplotlib/cbook/__init__.py:1298: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
: /nix/store/zm0dbvm6kc79il5713w847760r9wxs2m-python3-3.9.13-env/lib/python3.9/site-packages/matplotlib/cbook/__init__.py:1298: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
: return np.asarray(x, float)
|
||||
: /nix/store/akzgacnj2l97sldws5cnxjlgv27317xd-python3-3.9.13-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5218: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
: /nix/store/zm0dbvm6kc79il5713w847760r9wxs2m-python3-3.9.13-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5218: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
: pts[0] = start
|
||||
: /nix/store/akzgacnj2l97sldws5cnxjlgv27317xd-python3-3.9.13-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5219: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
: /nix/store/zm0dbvm6kc79il5713w847760r9wxs2m-python3-3.9.13-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5219: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
: pts[N + 1] = end
|
||||
: /nix/store/akzgacnj2l97sldws5cnxjlgv27317xd-python3-3.9.13-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5222: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
: /nix/store/zm0dbvm6kc79il5713w847760r9wxs2m-python3-3.9.13-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5222: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
: pts[1:N+1, 1] = dep1slice
|
||||
: /nix/store/akzgacnj2l97sldws5cnxjlgv27317xd-python3-3.9.13-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5224: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
: /nix/store/zm0dbvm6kc79il5713w847760r9wxs2m-python3-3.9.13-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5224: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
: pts[N+2:, 1] = dep2slice[::-1]
|
||||
[[file:./.ob-jupyter/6c7dd6320634995333544d0d20997d252a9cfece.svg]]
|
||||
[[file:./.ob-jupyter/510fac6208b7950e74134f1538f5e47e04e48f53.svg]]
|
||||
:END:
|
||||
|
||||
- no steady state ... but we have to average...
|
||||
|
||||
#+begin_src jupyter-python
|
||||
# plt.plot(model.t, ρ_ee)
|
||||
|
||||
plt.plot(model.t, ut.smoothen(model.t, ρ_ee, frac=.06, it=0))
|
||||
plt.plot(model.t, ut.smoothen(model.t, ρ_ee, frac=.5, it=0))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
| <matplotlib.lines.Line2D | at | 0x7ff47bc9ebb0> |
|
||||
[[file:./.ob-jupyter/585df3b23fc95829cde1d1a31b416a1cb10d760d.svg]]
|
||||
| <matplotlib.lines.Line2D | at | 0x7f13b1ab4040> |
|
||||
[[file:./.ob-jupyter/26cbfca7cad147a1687d01c495ee0148dba1f8a8.svg]]
|
||||
:END:
|
||||
|
||||
** TODO Power and Efficiency
|
||||
|
@ -508,7 +561,6 @@ We need the time points where we sample the total energy.
|
|||
|
||||
pu.plot_with_σ(model.t, model.total_energy(data), ax=ax)
|
||||
#pu.plot_with_σ(model.t, model.interaction_energy(data).for_bath(1), ax=ax)
|
||||
|
||||
#pu.plot_with_σ(model.t, model.system_energy(data), ax=ax)
|
||||
#pu.plot_with_σ(model.t, model.system_energy(data) + model.bath_energy(data).sum_baths(), ax=ax)
|
||||
#ax.plot(model.t, ut.smoothen(model.t, model.total_energy(data).value, frac=.1))
|
||||
|
@ -516,7 +568,10 @@ We need the time points where we sample the total energy.
|
|||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
[[file:./.ob-jupyter/a7a655d96af4b59356371e5f4164ad83ea2a6f15.svg]]
|
||||
:RESULTS:
|
||||
: Loading: 0% 0/99999 [00:00<?, ?it/s]
|
||||
[[file:./.ob-jupyter/da54924ee7a3023ba22115cfd2d2c480e1194adc.svg]]
|
||||
:END:
|
||||
|
||||
#+begin_src jupyter-python
|
||||
ts_begin = τ_init + τ_off + ((τ_c + τ_off) * np.arange(0, n))
|
||||
|
@ -559,7 +614,7 @@ We need the time points where we sample the total energy.
|
|||
(tot_power.slice(begin, end)).mean
|
||||
)
|
||||
|
||||
steady_index = 4
|
||||
steady_index = 0
|
||||
power = sum(powers[steady_index:]) * (1/(len(powers[steady_index:])))
|
||||
|
||||
ax.set_ylabel(r"$\langle{P}\rangle$")
|
||||
|
@ -577,8 +632,8 @@ We need the time points where we sample the total energy.
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
: \(P=-0.0007\pm 0.0018\)
|
||||
[[file:./.ob-jupyter/d5776ec43522109db1d102212062ba37099e86fb.svg]]
|
||||
: \(P=-0.00081\pm 0.00020\)
|
||||
[[file:./.ob-jupyter/c6e1343e89d39c704cbb2e1c0d6de97ef9db8d44.svg]]
|
||||
:END:
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue