try another

This commit is contained in:
Valentin Boettcher 2022-07-11 18:02:35 +02:00
parent 50ebc6e24e
commit dec0705dae
2 changed files with 17 additions and 86 deletions

View file

@ -178,12 +178,12 @@ def anti_zeno_engine(
Δ,
(τ_mod, τ_c, τ_bath, cycles, model.ω_s, ω_0, τ_s, τ_off, n, Δ_switch, τ_init),
) = anti_zeno_engine(
Δ=15,
Δ=11,
ε=1,
ω_c=2,
ε_couple=0.2,
n=3,
detune=-2,
detune=-1.5,
ω_0=20,
T_c=8,
T_h=40,
@ -220,7 +220,7 @@ vs = np.linspace(0.1, 10, 100)
plt.plot(vs, chi(vs, ω_0))
plt.plot(vs, G_h(vs))
aux.integrate(model, 1)
aux.integrate(model, 100)
# _, ax = fs.plot_energy_overview(model, markersize=1, ensemble_args=dict(gc_sleep=0.05))
@ -228,7 +228,7 @@ fig, ax = plt.subplots()
with aux.get_data(model) as data:
fs.plot_with_σ(model.t, model.total_energy_from_power(data), ax=ax)
ax.legend()
#ax.legend()
with aux.get_data(model) as data:
fs.plot_with_σ(

View file

@ -25,7 +25,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': '141.30.17.225', 'raylet_ip_address': '141.30.17.225', 'redis_address': None, 'object_store_address': '/tmp/ray/session_2022-07-11_16-54-20_590904_33936/sockets/plasma_store', 'raylet_socket_name': '/tmp/ray/session_2022-07-11_16-54-20_590904_33936/sockets/raylet', 'webui_url': '', 'session_dir': '/tmp/ray/session_2022-07-11_16-54-20_590904_33936', 'metrics_export_port': 61718, 'gcs_address': '141.30.17.225:55788', 'address': '141.30.17.225:55788', 'node_id': '714c1cafb7153ccef4b9cc0a9481d02e096e4cf1720657c269036390'})
: 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-07-11_17-56-08_601005_343893/sockets/plasma_store', 'raylet_socket_name': '/tmp/ray/session_2022-07-11_17-56-08_601005_343893/sockets/raylet', 'webui_url': '', 'session_dir': '/tmp/ray/session_2022-07-11_17-56-08_601005_343893', 'metrics_export_port': 33700, 'gcs_address': '141.30.17.225:52666', 'address': '141.30.17.225:52666', 'node_id': 'c868ef9cb4594a88f4d75d22b97e6e30132618843dcccc5031cf3e62'})
#+begin_src jupyter-python :results none
from hops.util.logging_setup import logging_setup
@ -198,12 +198,12 @@ Init ray and silence stocproc.
Δ,
(τ_mod, τ_c, τ_bath, cycles, model.ω_s, ω_0, τ_s, τ_off, n, Δ_switch, τ_init),
) = anti_zeno_engine(
Δ=15,
Δ=11,
ε=1,
ω_c=2,
ε_couple=0.2,
n=3,
detune=-2,
detune=-1.5,
ω_0=20,
T_c=8,
T_h=40,
@ -229,7 +229,7 @@ Let's test the assumptions of the paper.
#+end_src
#+RESULTS:
: 29
: 21
** BCFs and Modulations
#+begin_src jupyter-python :tangle nil
@ -245,8 +245,8 @@ Let's test the assumptions of the paper.
#+RESULTS:
:RESULTS:
| <matplotlib.lines.Line2D | at | 0x7f5bdab79070> |
[[file:./.ob-jupyter/16f8323bc4bb5eb0ac508c5471b90d962251e4f8.svg]]
| <matplotlib.lines.Line2D | at | 0x7f4c9b5ddfa0> |
[[file:./.ob-jupyter/f197c60a4dd01166b654064ca4d794d7645d96df.svg]]
:END:
#+begin_src jupyter-python :tangle nil
@ -259,13 +259,13 @@ Let's test the assumptions of the paper.
plt.plot(ωs, np.sinc((ωs - ω_0 - Δ) * τ_s * cycles))
plt.plot(ωs, np.sinc((ωs - ω_0 - Δ) * τ_s * cycles * 2), color="orange", linewidth=.5)
plt.plot(ωs, np.sinc((ωs - ω_0 - Δ) * τ_s * cycles * 10), color="yellow", linewidth=.4)
plt.xlim(34, 36)
#plt.xlim(34, 36)
#+end_src
#+RESULTS:
:RESULTS:
| 34.0 | 36.0 |
[[file:./.ob-jupyter/02f9e47c19da02f1557bf16f09487b7e948a5ff6.svg]]
| <matplotlib.lines.Line2D | at | 0x7f4c8cedb5b0> |
[[file:./.ob-jupyter/0b52df5f4c1b72a077f2a791adbb3c8c1bd2fe32.svg]]
:END:
#+begin_src jupyter-python
@ -318,76 +318,11 @@ Let's test the assumptions of the paper.
** TODO Integration
#+begin_src jupyter-python
aux.integrate(model, 1)
aux.integrate(model, 100)
#+end_src
#+RESULTS:
:RESULTS:
#+begin_example
[INFO hops.core.integration 33936] Choosing the nonlinear integrator.
[INFO hops.core.integration 33936] Using 4 integrators.
[INFO hops.core.integration 33936] Some 1 trajectories have to be integrated.
[INFO hops.core.integration 33936] Using 1820 hierarchy states.
0% 0/1 [00:00<?, ?it/s][INFO hops.core.signal_delay 33936] caught sig 'SIGINT'
[INFO hops.core.signal_delay 33936] caught sig 'SIGINT'
[INFO hops.core.signal_delay 33936] caught sig 'SIGINT'
[INFO hops.core.signal_delay 33936] caught sig 'SIGINT'
100% 1/1 [05:01<00:00, 301.60s/it]
[INFO hops.core.signal_delay 33936] caught 4 signal(s)
[INFO hops.core.signal_delay 33936] emit signal 'SIGINT'
#+end_example
# [goto error]
#+begin_example
---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
Input In [39], in <cell line: 1>()
----> 1 aux.integrate(model, 1)
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:1288, in HOPSSupervisor.integrate(self, clear_pd)
 1285 break
 1287 integration.update()
-> 1288 data.new_samples(
 1289 idx=index,
 1290 incomplete=incomplete,
 1291 psi0=psi0,
 1292 aux_states=aux_states,
 1293 stoc_proc=stoc_proc,
 1294 result_type=self.params.HiP.result_type,
 1295 normed=self._normed_average,
 1296 rng_seed=seed,
 1297 )
File ~/src/hops/hops/core/signal_delay.py:87, in sig_delay.__exit__(self, exc_type, exc_val, exc_tb)
 84 if len(self.sigh.sigs_caught) > 0 and self.handler is not None:
 85 self.handler(self.sigh.sigs_caught)
---> 87 self._restore()
File ~/src/hops/hops/core/signal_delay.py:68, in sig_delay._restore(self)
 66 for i, s in enumerate(self.sigs):
 67 signal.signal(s, self.old_handlers[i])
---> 68 self.sigh.emit()
File ~/src/hops/hops/core/signal_delay.py:42, in SigHandler.emit(self)
 40 for s in self.sigs_caught:
 41 log.info("emit signal '{}'".format(SIG_MAP[s]))
---> 42 os.kill(os.getpid(), s)
KeyboardInterrupt:
#+end_example
:END:
: 602a65a4-50ca-485c-84f9-0f0adcce05f1
#+begin_src jupyter-python
@ -397,15 +332,11 @@ Let's test the assumptions of the paper.
with aux.get_data(model) as data:
fs.plot_with_σ(model.t, model.total_energy_from_power(data), ax=ax)
ax.legend()
#ax.legend()
#+end_src
#+RESULTS:
:RESULTS:
: [WARNING matplotlib.legend 35102] No artists with labels found to put in legend. Note that artists whose label start with an underscore are ignored when legend() is called with no argument.
: <matplotlib.legend.Legend at 0x7fc879935fa0>
[[file:./.ob-jupyter/ddf025e019b5263ef3c09c16c7c88caa71609683.svg]]
:END:
[[file:./.ob-jupyter/11e4a0abf6a0dea91c5542b16a38a0be24d727b7.svg]]
- **too fast decoupling kills it**
- no anti-zeno effects without detuning?