mirror of
https://github.com/vale981/master-thesis
synced 2025-03-04 17:41:43 -05:00
correct scaling
This commit is contained in:
parent
44143189de
commit
cd5b5648aa
2 changed files with 85 additions and 46 deletions
|
@ -24,7 +24,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-15_16-33-19_035369_76479/sockets/plasma_store', 'raylet_socket_name': '/tmp/ray/session_2022-08-15_16-33-19_035369_76479/sockets/raylet', 'webui_url': '', 'session_dir': '/tmp/ray/session_2022-08-15_16-33-19_035369_76479', 'metrics_export_port': 56879, 'gcs_address': '192.168.100.170:64999', 'address': '192.168.100.170:64999', 'node_id': 'cd3c35a56063d205e53b29934473b89b3baea526868d0ff8e806b08e'})
|
||||
: 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-25_14-28-33_210699_311404/sockets/plasma_store', 'raylet_socket_name': '/tmp/ray/session_2022-08-25_14-28-33_210699_311404/sockets/raylet', 'webui_url': '', 'session_dir': '/tmp/ray/session_2022-08-25_14-28-33_210699_311404', 'metrics_export_port': 51335, 'gcs_address': '141.30.17.225:49191', 'address': '141.30.17.225:49191', 'node_id': 'f56218ac6f7953fb2918fe3d9901e37b9d6eb39dbcb570c6f6b3d37b'})
|
||||
|
||||
#+begin_src jupyter-python :results none
|
||||
from hops.util.logging_setup import logging_setup
|
||||
|
@ -76,8 +76,8 @@ Let's lay down some basic functionality.
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
| <matplotlib.lines.Line2D | at | 0x7f7678510df0> |
|
||||
[[file:./.ob-jupyter/8326a30a0b67dac1fcbfa726d3677ad081f50681.svg]]
|
||||
| <matplotlib.lines.Line2D | at | 0x7f08c50754c0> |
|
||||
[[file:./.ob-jupyter/1fdbf5e8f0e4baea901a45cd3b8e07fdffa55dc0.svg]]
|
||||
:END:
|
||||
|
||||
** Hot Thermalization
|
||||
|
@ -90,8 +90,8 @@ Let's lay down some basic functionality.
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
| <matplotlib.lines.Line2D | at | 0x7f7669dd3b50> |
|
||||
[[file:./.ob-jupyter/beef0051823ad8d69a03749d66188767c06f00d6.svg]]
|
||||
| <matplotlib.lines.Line2D | at | 0x7f08b69cbe50> |
|
||||
[[file:./.ob-jupyter/c329795210622a56c5cc54daccb1843b5adc48ca.svg]]
|
||||
:END:
|
||||
|
||||
** Compression
|
||||
|
@ -102,8 +102,8 @@ Let's lay down some basic functionality.
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
| <matplotlib.lines.Line2D | at | 0x7f7669d4e100> |
|
||||
[[file:./.ob-jupyter/2c1c45c42776db17721492efacd6f4856f8fe3b3.svg]]
|
||||
| <matplotlib.lines.Line2D | at | 0x7f08b69454f0> |
|
||||
[[file:./.ob-jupyter/7ed97af88f090ad1bb3b943711a34408dc1a9072.svg]]
|
||||
:END:
|
||||
|
||||
** Cold Thermalization
|
||||
|
@ -116,8 +116,8 @@ Let's lay down some basic functionality.
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
| <matplotlib.lines.Line2D | at | 0x7f7669d33610> |
|
||||
[[file:./.ob-jupyter/a425435a0d34373dd92cf2a415ceec18a1fd69af.svg]]
|
||||
| <matplotlib.lines.Line2D | at | 0x7f08b692ca90> |
|
||||
[[file:./.ob-jupyter/b429a448a8d92927925baa9ce7d054721d70a9e1.svg]]
|
||||
:END:
|
||||
|
||||
** Full Cycle
|
||||
|
@ -138,16 +138,16 @@ Now we turn the system around after each fill-cycle.
|
|||
|
||||
t = np.linspace(0, t_cycle, 1000)
|
||||
|
||||
plt.plot(t, H_cyc.operator_norm(t), label=r"$||H_\mathrm{S}||$")
|
||||
plt.plot(t, L[0].operator_norm(t), label=r"$||L_\mathrm{c}||$")
|
||||
plt.plot(t, L[1].operator_norm(t), label=r"$||L_\mathrm{h}||$")
|
||||
plt.plot(t, H_cyc.operator_norm(t) - 1, label=r"$f(\tau)$")
|
||||
plt.plot(t, L[0].operator_norm(t) * 2, label=r"$g_{c}(\tau)$")
|
||||
plt.plot(t, L[1].operator_norm(t) * 2, label=r"$g_{h}(\tau)$")
|
||||
plt.xlabel(r"$\tau$")
|
||||
plt.legend()
|
||||
fs.export_fig("modulation")
|
||||
fs.export_fig("modulation", x_scaling=.5, y_scaling=.35)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
[[file:./.ob-jupyter/2b79808a3127f0a93ce6cbde00ae4888c83b2696.svg]]
|
||||
[[file:./.ob-jupyter/5c1a8c11fde4110a9bba10a2d2b1da3401ec327a.svg]]
|
||||
|
||||
** Shifts
|
||||
#+begin_src jupyter-python
|
||||
|
@ -162,8 +162,8 @@ Now we turn the system around after each fill-cycle.
|
|||
scales = []
|
||||
|
||||
for i, t_exp in enumerate([0, t_expansion / scale]):
|
||||
ω_exp = H_cyc.operator_norm(i)
|
||||
|
||||
ω_exp = H_cyc.operator_norm(i * t_cycle / 3)
|
||||
print(ω_exp)
|
||||
def objective(ω_s):
|
||||
ref_model.ω_s[i] = ω_s
|
||||
|
||||
|
@ -174,16 +174,34 @@ Now we turn the system around after each fill-cycle.
|
|||
)
|
||||
shifts.append(res.x)
|
||||
scales.append(-res.fun)
|
||||
ω = np.linspace(0.1, 10, 1000)
|
||||
plt.plot(ω, ref_model.full_thermal_spectral_density(i)(ω) / -res.fun)
|
||||
ω = np.linspace(0.01, 3, 1000)
|
||||
lines = plt.plot(
|
||||
ω,
|
||||
ref_model.full_thermal_spectral_density(i)(ω) / -res.fun,
|
||||
label=["Cold", "Hot"][i],
|
||||
)
|
||||
plt.plot(
|
||||
ω_exp,
|
||||
ref_model.full_thermal_spectral_density(i)(ω_exp) / -res.fun,
|
||||
marker="o",
|
||||
color=lines[0].get_color(),
|
||||
)
|
||||
|
||||
plt.legend()
|
||||
plt.xlabel(r"$\omega$")
|
||||
plt.ylabel("Arbitrary Units")
|
||||
print(shifts, scales)
|
||||
fs.export_fig("spectral_densities", x_scaling=.5, y_scaling=.35)
|
||||
# shifts = [0.010005778765750251, 0.5000003902186526]
|
||||
# scales = [0.3656483223378975, 3.198956858189882]
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
: [0.010005778765750251, 0.5000003902186526] [0.3656483223378975, 3.198956858189882]
|
||||
[[file:./.ob-jupyter/97d3960ba8288d117b1bf5774e57ac8bb1500b83.svg]]
|
||||
: 1.0
|
||||
: 2.0
|
||||
: [0.01000577876575025, 1.0000001111768948] [0.5819473793333508, 3.865799283487837]
|
||||
[[file:./.ob-jupyter/9d07a4219e4be9d77a71c884947f1722740f24a8.svg]]
|
||||
:END:
|
||||
|
||||
|
||||
|
@ -213,26 +231,29 @@ Now we turn the system around after each fill-cycle.
|
|||
aux.integrate(model, 10000)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: [INFO hops.core.integration 76479] Choosing the nonlinear integrator.
|
||||
: [INFO hops.core.integration 76479] Using 8 integrators.
|
||||
: [INFO hops.core.integration 76479] Some 30 trajectories have to be integrated.
|
||||
: [INFO hops.core.integration 76479] Using 1820 hierarchy states.
|
||||
: 100% 30/30 [00:22<00:00, 1.32it/s]
|
||||
|
||||
|
||||
#+begin_src jupyter-python
|
||||
f, a = pu.plot_energy_overview(model, strobe_frequency=ω_mod)
|
||||
model.full_thermal_bcf(0)(0) * model.bcf_scales[0]
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
| 0.6043008870314562+0j |
|
||||
|
||||
#+begin_src jupyter-python
|
||||
f, a = pu.plot_energy_overview(model, strobe_frequency=ω_mod, hybrid=True)
|
||||
# a.plot(model.t, model.H.operator_norm(model.t))
|
||||
# a.plot(model.t, model.L[0].operator_norm(model.t))
|
||||
# a.plot(model.t, model.L[1].operator_norm(model.t))
|
||||
ax.set_xlabel(r"$\tau$")
|
||||
a.set_xlabel(r"$\tau$")
|
||||
a.legend()
|
||||
#fs.export_fig("energy_strobe", y_scaling=.6)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
[[file:./.ob-jupyter/5d6c6959a02462528cdb3d541f8dd5ecf303f362.svg]]
|
||||
:RESULTS:
|
||||
: <matplotlib.legend.Legend at 0x7f08af06dc70>
|
||||
[[file:./.ob-jupyter/d00d2d44c36070dc6d2af0c0850f30355fd5bf36.svg]]
|
||||
:END:
|
||||
|
||||
#+begin_src jupyter-python
|
||||
fig, ax = plt.subplots()
|
||||
|
@ -250,7 +271,7 @@ Now we turn the system around after each fill-cycle.
|
|||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
[[file:./.ob-jupyter/4938909f0a3699e7c9912ab201d2f04199b355e7.svg]]
|
||||
[[file:./.ob-jupyter/a920807166eb55c5dcb225c6c41cd01ca5c2df89.svg]]
|
||||
|
||||
|
||||
#+begin_src jupyter-python
|
||||
|
@ -289,9 +310,9 @@ Now we turn the system around after each fill-cycle.
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
: /nix/store/yf7vf1pic6xfwr035xywcczjm08psvpa-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/9fp3glm79h56gz17w052rlqw3gwcza7i-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)
|
||||
[[file:./.ob-jupyter/69c7da5a4fa9adc0fb49b0ff097ea6fbc28c58ca.svg]]
|
||||
[[file:./.ob-jupyter/d7b074c74ef3761fe491ad92283655746125d59e.svg]]
|
||||
:END:
|
||||
|
||||
|
||||
|
@ -309,9 +330,9 @@ Now we turn the system around after each fill-cycle.
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
: /nix/store/yf7vf1pic6xfwr035xywcczjm08psvpa-python3-3.9.13-env/lib/python3.9/site-packages/qutip/bloch.py:639: UserWarning: There are no gridspecs with layoutgrids. Possibly did not call parent GridSpec with the "figure" keyword
|
||||
: /nix/store/9fp3glm79h56gz17w052rlqw3gwcza7i-python3-3.9.13-env/lib/python3.9/site-packages/qutip/bloch.py:639: UserWarning: There are no gridspecs with layoutgrids. Possibly did not call parent GridSpec with the "figure" keyword
|
||||
: self.fig.canvas.draw()
|
||||
: /nix/store/yf7vf1pic6xfwr035xywcczjm08psvpa-python3-3.9.13-env/lib/python3.9/site-packages/IPython/core/pylabtools.py:151: UserWarning: There are no gridspecs with layoutgrids. Possibly did not call parent GridSpec with the "figure" keyword
|
||||
: /nix/store/9fp3glm79h56gz17w052rlqw3gwcza7i-python3-3.9.13-env/lib/python3.9/site-packages/IPython/core/pylabtools.py:151: UserWarning: There are no gridspecs with layoutgrids. Possibly did not call parent GridSpec with the "figure" keyword
|
||||
: fig.canvas.print_figure(bytes_io, **kw)
|
||||
[[file:./.ob-jupyter/633b45a276b59c015a575e42b611b52283311ebe.svg]]
|
||||
[[file:./.ob-jupyter/072aab236948e2e79dc6a892c44f33144b4fd2d9.svg]]
|
||||
:END:
|
||||
|
|
|
@ -68,12 +68,12 @@ dt = .1
|
|||
|
||||
t = np.linspace(0, t_cycle, 1000)
|
||||
|
||||
plt.plot(t, H_cyc.operator_norm(t), label=r"$||H_\mathrm{S}||$")
|
||||
plt.plot(t, L[0].operator_norm(t), label=r"$||L_\mathrm{c}||$")
|
||||
plt.plot(t, L[1].operator_norm(t), label=r"$||L_\mathrm{h}||$")
|
||||
plt.plot(t, H_cyc.operator_norm(t) - 1, label=r"$f(\tau)$")
|
||||
plt.plot(t, L[0].operator_norm(t) * 2, label=r"$g_{c}(\tau)$")
|
||||
plt.plot(t, L[1].operator_norm(t) * 2, label=r"$g_{h}(\tau)$")
|
||||
plt.xlabel(r"$\tau$")
|
||||
plt.legend()
|
||||
fs.export_fig("modulation")
|
||||
fs.export_fig("modulation", x_scaling=.5, y_scaling=.35)
|
||||
|
||||
from scipy.optimize import minimize_scalar
|
||||
|
||||
|
@ -86,8 +86,8 @@ shifts = []
|
|||
scales = []
|
||||
|
||||
for i, t_exp in enumerate([0, t_expansion / scale]):
|
||||
ω_exp = H_cyc.operator_norm(i)
|
||||
|
||||
ω_exp = H_cyc.operator_norm(i * t_cycle / 3)
|
||||
print(ω_exp)
|
||||
def objective(ω_s):
|
||||
ref_model.ω_s[i] = ω_s
|
||||
|
||||
|
@ -98,10 +98,26 @@ for i, t_exp in enumerate([0, t_expansion / scale]):
|
|||
)
|
||||
shifts.append(res.x)
|
||||
scales.append(-res.fun)
|
||||
ω = np.linspace(0.1, 10, 1000)
|
||||
plt.plot(ω, ref_model.full_thermal_spectral_density(i)(ω) / -res.fun)
|
||||
ω = np.linspace(0.01, 3, 1000)
|
||||
lines = plt.plot(
|
||||
ω,
|
||||
ref_model.full_thermal_spectral_density(i)(ω) / -res.fun,
|
||||
label=["Cold", "Hot"][i],
|
||||
)
|
||||
plt.plot(
|
||||
ω_exp,
|
||||
ref_model.full_thermal_spectral_density(i)(ω_exp) / -res.fun,
|
||||
marker="o",
|
||||
color=lines[0].get_color(),
|
||||
)
|
||||
|
||||
plt.legend()
|
||||
plt.xlabel(r"$\omega$")
|
||||
plt.ylabel("Arbitrary Units")
|
||||
print(shifts, scales)
|
||||
fs.export_fig("spectral_densities", x_scaling=.5, y_scaling=.35)
|
||||
# shifts = [0.010005778765750251, 0.5000003902186526]
|
||||
# scales = [0.3656483223378975, 3.198956858189882]
|
||||
|
||||
model = QubitModelMutliBath(
|
||||
δ=list(1/np.array(scales) * .1/2),#[.05*4, .01*4],
|
||||
|
@ -123,11 +139,13 @@ model = QubitModelMutliBath(
|
|||
|
||||
aux.integrate(model, 10000)
|
||||
|
||||
f, a = pu.plot_energy_overview(model, strobe_frequency=ω_mod)
|
||||
model.full_thermal_bcf(0)(0) * model.bcf_scales[0]
|
||||
|
||||
f, a = pu.plot_energy_overview(model, strobe_frequency=ω_mod, hybrid=True)
|
||||
# a.plot(model.t, model.H.operator_norm(model.t))
|
||||
# a.plot(model.t, model.L[0].operator_norm(model.t))
|
||||
# a.plot(model.t, model.L[1].operator_norm(model.t))
|
||||
ax.set_xlabel(r"$\tau$")
|
||||
a.set_xlabel(r"$\tau$")
|
||||
a.legend()
|
||||
#fs.export_fig("energy_strobe", y_scaling=.6)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue