try slightly longer coupling

This commit is contained in:
Valentin Boettcher 2022-06-15 11:04:34 +02:00
parent e3ba68d319
commit 1dc1264cd8
2 changed files with 19 additions and 95 deletions

View file

@ -92,7 +92,7 @@ def anti_zeno_engine(
return model, Δ, (τ_mod, τ_c, τ_bath, cycles, model.ω_s)
model, Δ, params = anti_zeno_engine(ε=1/10, ε_couple=1/2, n=3, detune=4, ω_0 = 10, δ=[1]*2, γ=.05/2)
model, Δ, params = anti_zeno_engine(ε=1/10, ε_couple=1/5, n=3, detune=4, ω_0 = 10, δ=[1]*2, γ=.05/2)
#model, params = anti_zeno_engine(ε=1/2, ε_couple=1e-4, n=1, detune=.5, δ=[.1,.1])
params
@ -125,8 +125,8 @@ plt.plot(model.t, filtered)
with aux.get_data(model) as data:
_, ax = plt.subplots()
#fs.plot_with_σ(model.t, model.bath_energy(data), bath=0, ax=ax)
#fs.plot_with_σ(model.t, model.bath_energy(data), bath=1, ax=ax)
fs.plot_with_σ(model.t, model.bath_energy(data), bath=0, ax=ax)
fs.plot_with_σ(model.t, model.bath_energy(data), bath=1, ax=ax)
fs.plot_with_σ(model.t, model.total_energy(data), ax=ax)
#fs.plot_with_σ(model.t, model.system_energy(data), ax=ax)

View file

@ -25,7 +25,7 @@ Init ray and silence stocproc.
#+end_src
#+RESULTS:
: RayContext(dashboard_url='', python_version='3.9.12', ray_version='1.12.1', ray_commit='4863e33856b54ccf8add5cbe75e41558850a1b75', address_info={'node_ip_address': '192.168.44.161', 'raylet_ip_address': '192.168.44.161', 'redis_address': None, 'object_store_address': '/tmp/ray/session_2022-06-14_15-13-29_474547_2829582/sockets/plasma_store', 'raylet_socket_name': '/tmp/ray/session_2022-06-14_15-13-29_474547_2829582/sockets/raylet', 'webui_url': '', 'session_dir': '/tmp/ray/session_2022-06-14_15-13-29_474547_2829582', 'metrics_export_port': 59840, 'gcs_address': '192.168.44.161:65285', 'address': '192.168.44.161:65285', 'node_id': '032a1c3d37c720f19db3119948af1f1313c1670e974ad6fb1e960c71'})
: RayContext(dashboard_url='', python_version='3.9.12', ray_version='1.12.1', ray_commit='4863e33856b54ccf8add5cbe75e41558850a1b75', address_info={'node_ip_address': '127.0.0.1', 'raylet_ip_address': '127.0.0.1', 'redis_address': None, 'object_store_address': '/tmp/ray/session_2022-06-14_17-41-54_433521_3434369/sockets/plasma_store', 'raylet_socket_name': '/tmp/ray/session_2022-06-14_17-41-54_433521_3434369/sockets/raylet', 'webui_url': '', 'session_dir': '/tmp/ray/session_2022-06-14_17-41-54_433521_3434369', 'metrics_export_port': 65400, 'gcs_address': '127.0.0.1:50926', 'address': '127.0.0.1:50926', 'node_id': '3e25f54f48fa791eb7ce3c3b1ee8e11e81b8f0b01ec60ad8c4940760'})
#+begin_src jupyter-python :results none
from hops.util.logging_setup import logging_setup
@ -112,7 +112,7 @@ Init ray and silence stocproc.
* Model Definition
#+begin_src jupyter-python
model, Δ, params = anti_zeno_engine(ε=1/10, ε_couple=1/2, n=3, detune=4, ω_0 = 10, δ=[1]*2, γ=.05/2)
model, Δ, params = anti_zeno_engine(ε=1/10, ε_couple=1/5, n=3, detune=4, ω_0 = 10, δ=[1]*2, γ=.05/2)
#model, params = anti_zeno_engine(ε=1/2, ε_couple=1e-4, n=1, detune=.5, δ=[.1,.1])
params
#+end_src
@ -138,8 +138,8 @@ Let's test the assumptions of the paper.
#+RESULTS:
:RESULTS:
| <matplotlib.lines.Line2D | at | 0x7f7db78a7ac0> |
[[file:./.ob-jupyter/df2c75be5b4885c67ce2a213e3baa6a0c6a88c9a.svg]]
| <matplotlib.lines.Line2D | at | 0x7f5d393d5880> |
[[file:./.ob-jupyter/8f948efd5a869329fee584e266642232b144fb58.svg]]
:END:
#+begin_src jupyter-python :tangle nil
@ -152,8 +152,8 @@ Let's test the assumptions of the paper.
#+RESULTS:
:RESULTS:
: <matplotlib.lines.Line2D at 0x7f7dc77f7cd0>
[[file:./.ob-jupyter/d73ec34dd915bf36eadae46fa0f37add6f365c43.svg]]
: <matplotlib.lines.Line2D at 0x7f5d3943ef10>
[[file:./.ob-jupyter/f10d4889fa3ba5e14cf18b06786c8c3abbb543ef.svg]]
:END:
@ -162,82 +162,6 @@ Let's test the assumptions of the paper.
aux.integrate(model, 5000)
#+end_src
#+RESULTS:
:RESULTS:
: [INFO hops.core.integration 22464] Choosing the nonlinear integrator.
: /home/hiro/src/hops/hops/core/hierarchy_data.py:497: UserWarning: test_file_version FAILED with exception Unable to open file (file is already open for write/SWMR write (may use <h5clear file> to clear file consistency flags))
: warnings.warn(
: /home/hiro/src/hops/hops/core/hierarchy_data.py:500: UserWarning: hdf5_name .data/5dcdeeef6e79bd5c4ee636c23a1905053441c9fa49ea5b8f516844fd17e69033/_3/5dcdeeef6e79bd5c4ee636c23a1905053441c9fa49ea5b8f516844fd17e69033_3a50d7c5e5577f16c8ee57fead7fa546_1.h5
: warnings.warn("hdf5_name {}".format(self.hdf5_name))
: /home/hiro/src/hops/hops/core/hierarchy_data.py:503: UserWarning: Moving .data/5dcdeeef6e79bd5c4ee636c23a1905053441c9fa49ea5b8f516844fd17e69033/_3/5dcdeeef6e79bd5c4ee636c23a1905053441c9fa49ea5b8f516844fd17e69033_3a50d7c5e5577f16c8ee57fead7fa546_1.h5 to .data/5dcdeeef6e79bd5c4ee636c23a1905053441c9fa49ea5b8f516844fd17e69033/_3/5dcdeeef6e79bd5c4ee636c23a1905053441c9fa49ea5b8f516844fd17e69033_3a50d7c5e5577f16c8ee57fead7fa546_1.h5backup_1655110347.2761068 and starting fresh.
: warnings.warn(
# [goto error]
#+begin_example
---------------------------------------------------------------------------
RaySystemError Traceback (most recent call last)
Input In [8], in <cell line: 1>()
----> 1 aux.integrate(model, 100)
File ~/src/two_qubit_model/hiro_models/model_auxiliary.py:108, in integrate(model, n, data_path, clear_pd)
 98 # with model_db(data_path) as db:
 99 # if hash in db and "data" db[hash]
 101 supervisor = HOPSSupervisor(
 102 model.hops_config,
 103 n,
 104 data_path=data_path,
 105 data_name=hash,
 106 )
--> 108 supervisor.integrate(clear_pd)
 110 with supervisor.get_data(True) as data:
 111 with model_db(data_path) as db:
File ~/src/hops/hops/core/integration.py:1238, in HOPSSupervisor.integrate(self, clear_pd)
 1235 with self.get_data_and_maybe_clear(clear_pd) as data:
 1236 t = data.get_time()
-> 1238 num_integrators = int(ray.available_resources().get("CPU", 0))
 1240 if num_integrators == 0:
 1241 raise RuntimeError("No cpu available for integration!")
File /nix/store/pwhaggpgvxhy410r6vlx448v9lp8n08s-python3-3.9.12-env/lib/python3.9/site-packages/ray/_private/client_mode_hook.py:105, in client_mode_hook.<locals>.wrapper(*args, **kwargs)
 103 if func.__name__ != "init" or is_client_mode_enabled_by_default:
 104 return getattr(ray, func.__name__)(*args, **kwargs)
--> 105 return func(*args, **kwargs)
File /nix/store/pwhaggpgvxhy410r6vlx448v9lp8n08s-python3-3.9.12-env/lib/python3.9/site-packages/ray/state.py:912, in available_resources()
 898 @DeveloperAPI
 899 @client_mode_hook(auto_init=False)
 900 def available_resources():
 901 """Get the current available cluster resources.
 902
 903  This is different from `cluster_resources` in that this will return idle
 (...)
 910  resource in the cluster.
 911  """
--> 912 return state.available_resources()
File /nix/store/pwhaggpgvxhy410r6vlx448v9lp8n08s-python3-3.9.12-env/lib/python3.9/site-packages/ray/state.py:724, in GlobalState.available_resources(self)
 712 def available_resources(self):
 713 """Get the current available cluster resources.
 714
 715  This is different from `cluster_resources` in that this will return
 (...)
 722  resource in the cluster.
 723  """
--> 724 self._check_connected()
 726 available_resources_by_id = self._available_resources_per_node()
 728 # Calculate total available resources.
File /nix/store/pwhaggpgvxhy410r6vlx448v9lp8n08s-python3-3.9.12-env/lib/python3.9/site-packages/ray/state.py:48, in GlobalState._check_connected(self)
 46 # _really_init_global_state should have set self.global_state_accessor
 47 if self.global_state_accessor is None:
---> 48 raise ray.exceptions.RaySystemError(
 49 "Ray has not been started yet. You can start Ray with 'ray.init()'."
 50 )
RaySystemError: System error: Ray has not been started yet. You can start Ray with 'ray.init()'.
#+end_example
:END:
#+begin_src jupyter-python
_, ax = fs.plot_energy_overview(model, markersize=1)
@ -249,8 +173,8 @@ Let's test the assumptions of the paper.
#+RESULTS:
:RESULTS:
: <matplotlib.legend.Legend at 0x7f7dc795f160>
[[file:./.ob-jupyter/71865724376f7ec07276bc5b647a3af7b6e11ef3.svg]]
: <matplotlib.legend.Legend at 0x7f5d39483160>
[[file:./.ob-jupyter/6fee2283b3f65342853912bb98569e3c62ef772b.svg]]
:END:
- **too fast decoupling kills it**
@ -283,7 +207,7 @@ Let's test the assumptions of the paper.
: pts[1:N+1, 1] = dep1slice
: /nix/store/pwhaggpgvxhy410r6vlx448v9lp8n08s-python3-3.9.12-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/55f62edc949c1a9136b9b7e4e0ee3092e8a3d516.svg]]
[[file:./.ob-jupyter/8b909fa7cbb714b4528b2b0e0f9761a47e7db62d.svg]]
:END:
@ -299,8 +223,8 @@ Let's test the assumptions of the paper.
#+RESULTS:
:RESULTS:
| <matplotlib.lines.Line2D | at | 0x7f7db7963bb0> |
[[file:./.ob-jupyter/aa719a7b720ed6ad480377ed1ef3a108549bc981.svg]]
| <matplotlib.lines.Line2D | at | 0x7f5d29c55ee0> |
[[file:./.ob-jupyter/03a06548b8d1288b319a3b9b25634c5c4fcdc505.svg]]
:END:
** TODO Power and Efficiency
@ -311,8 +235,8 @@ We need the time points where we sample the total energy.
#+begin_src jupyter-python
with aux.get_data(model) as data:
_, ax = plt.subplots()
#fs.plot_with_σ(model.t, model.bath_energy(data), bath=0, ax=ax)
#fs.plot_with_σ(model.t, model.bath_energy(data), bath=1, ax=ax)
fs.plot_with_σ(model.t, model.bath_energy(data), bath=0, ax=ax)
fs.plot_with_σ(model.t, model.bath_energy(data), bath=1, ax=ax)
fs.plot_with_σ(model.t, model.total_energy(data), ax=ax)
#fs.plot_with_σ(model.t, model.system_energy(data), ax=ax)
@ -321,7 +245,7 @@ We need the time points where we sample the total energy.
#+end_src
#+RESULTS:
[[file:./.ob-jupyter/659bbfc215c82a10871222a3d66b736895fb5f57.svg]]
[[file:./.ob-jupyter/f57e03b6d37041984f9097410062f59603f2b7f7.svg]]
#+begin_src jupyter-python
with aux.get_data(model) as data:
@ -332,7 +256,7 @@ We need the time points where we sample the total energy.
#+end_src
#+RESULTS:
[[file:./.ob-jupyter/d2a4d830b7965689e1085ea5b80633907f7f75f5.svg]]
[[file:./.ob-jupyter/468cd90d3bad32388856d285d1a89bda150cff67.svg]]
#+begin_src jupyter-python
mean_norm = np.zeros_like(model.t)
@ -350,7 +274,7 @@ We need the time points where we sample the total energy.
#+end_src
#+RESULTS:
[[file:./.ob-jupyter/88389fabb204bbc873bba8fe150ec208513c42af.svg]]
[[file:./.ob-jupyter/914086091aa9249ecbf1e295919a1f66b1720b55.svg]]
* Too long modulation?, more likely to small spectral sep or to strong coupling
- definitely not too long mod