mirror of
https://github.com/vale981/HOPSFlow-Paper
synced 2025-03-05 09:41:40 -05:00
plot the state evolution
This commit is contained in:
parent
66e7866b20
commit
12b514974e
3 changed files with 67 additions and 8 deletions
|
@ -71,7 +71,7 @@ We shift so that we just overlap with coupling/decoupling and one above.
|
|||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
[[file:./.ob-jupyter/ef0a7a7b6f1172696db92c18eb5a95ccec0faeef.svg]]
|
||||
[[file:./.ob-jupyter/7b48f7e993970d5cb00ceead732a16ea52bba18f.svg]]
|
||||
|
||||
#+begin_src jupyter-python :tangle no
|
||||
#ot.plot_cycles(models, bath=0, legend=True)
|
||||
|
@ -95,7 +95,7 @@ We shift so that we just overlap with coupling/decoupling and one above.
|
|||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
[[file:./.ob-jupyter/4549701b0956747aa203cfb74b1af946ce1cb906.svg]]
|
||||
[[file:./.ob-jupyter/470280b4020454f5eaec21d8f9f8d1ea12a530cd.svg]]
|
||||
|
||||
** Integrate
|
||||
#+begin_src jupyter-python
|
||||
|
@ -175,20 +175,52 @@ We shift so that we just overlap with coupling/decoupling and one above.
|
|||
[0. 0.88079708]]
|
||||
[[0.37754067 0. ]
|
||||
[0. 0.62245933]]
|
||||
/nix/store/vkzza81mzwyk5br1c6cm67g48xycvmvl-python3-3.9.15-env/lib/python3.9/site-packages/matplotlib/cbook/__init__.py:1369: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
/nix/store/h9ywp3qh1x47y82bwgaqrd1fxmp1bdy3-python3-3.9.15-env/lib/python3.9/site-packages/matplotlib/cbook/__init__.py:1369: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
return np.asarray(x, float)
|
||||
/nix/store/vkzza81mzwyk5br1c6cm67g48xycvmvl-python3-3.9.15-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5340: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
/nix/store/h9ywp3qh1x47y82bwgaqrd1fxmp1bdy3-python3-3.9.15-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5340: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
pts[0] = start
|
||||
/nix/store/vkzza81mzwyk5br1c6cm67g48xycvmvl-python3-3.9.15-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5341: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
/nix/store/h9ywp3qh1x47y82bwgaqrd1fxmp1bdy3-python3-3.9.15-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5341: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
pts[N + 1] = end
|
||||
/nix/store/vkzza81mzwyk5br1c6cm67g48xycvmvl-python3-3.9.15-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5344: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
/nix/store/h9ywp3qh1x47y82bwgaqrd1fxmp1bdy3-python3-3.9.15-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5344: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
pts[1:N+1, 1] = dep1slice
|
||||
/nix/store/vkzza81mzwyk5br1c6cm67g48xycvmvl-python3-3.9.15-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5346: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
/nix/store/h9ywp3qh1x47y82bwgaqrd1fxmp1bdy3-python3-3.9.15-env/lib/python3.9/site-packages/matplotlib/axes/_axes.py:5346: ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
pts[N+2:, 1] = dep2slice[::-1]
|
||||
#+end_example
|
||||
[[file:./.ob-jupyter/4856874e733d5f5018bed3f93e048cecaf3f50de.svg]]
|
||||
[[file:./.ob-jupyter/d8fd69f598a04d24c7d912a451860cf1e02368eb.svg]]
|
||||
:END:
|
||||
|
||||
#+begin_src jupyter-python
|
||||
b = qt.Bloch()
|
||||
with aux.get_data(model) as data:
|
||||
ρ = data.rho_t_accum.mean[:]
|
||||
σ_ρ = data.rho_t_accum.ensemble_std[:]
|
||||
# plt.plot(model.t[100:], abs(ρ[100:, 0, 1]) / abs(ρ[100:, 0, 0]))
|
||||
# plt.yscale("log")
|
||||
# plt.xlabel(r"$\tau$")
|
||||
# plt.ylabel(r"$|\rho_{01}| / \rho_{00}$")
|
||||
# fs.export_fig("coherences")
|
||||
xs = np.einsum("tij,ji->t", ρ, qt.sigmax().full())
|
||||
ys = np.einsum("tij,ji->t", ρ, qt.sigmay().full())
|
||||
zs = np.einsum("tij,ji->t", ρ, qt.sigmaz().full())
|
||||
|
||||
b.add_points([xs, ys, zs])
|
||||
b.view = [20, 20]
|
||||
b.point_size = [0.01]
|
||||
b.sphere_alpha = 0.01
|
||||
b.render()
|
||||
b
|
||||
|
||||
plt.plot(model.t, zs, label=r"$\langle \sigma_z\rangle$")
|
||||
plt.plot(model.t, xs, label=r"$\langle \sigma_x\rangle$")
|
||||
plt.plot(model.t, ys, label=r"$\langle \sigma_y\rangle$")
|
||||
plt.legend()
|
||||
plt.xlabel(r"$\tau$")
|
||||
fs.export_fig("state_evolution", y_scaling=.7)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
[[file:./.ob-jupyter/99edbd5d5058d4549a50986c86e4ef614a750526.svg]]
|
||||
|
||||
|
||||
#+begin_src jupyter-python
|
||||
ot.plot_steady_energy_changes([baseline], 2, label_fn=lambda _: "")
|
||||
|
|
Binary file not shown.
|
@ -74,6 +74,33 @@ for model in models[3:4]:
|
|||
aa.set_ylim((0.1,.4))
|
||||
fs.export_fig("prototype_thermalization", y_scaling=.7, x_scaling=2)
|
||||
|
||||
b = qt.Bloch()
|
||||
with aux.get_data(model) as data:
|
||||
ρ = data.rho_t_accum.mean[:]
|
||||
σ_ρ = data.rho_t_accum.ensemble_std[:]
|
||||
# plt.plot(model.t[100:], abs(ρ[100:, 0, 1]) / abs(ρ[100:, 0, 0]))
|
||||
# plt.yscale("log")
|
||||
# plt.xlabel(r"$\tau$")
|
||||
# plt.ylabel(r"$|\rho_{01}| / \rho_{00}$")
|
||||
# fs.export_fig("coherences")
|
||||
xs = np.einsum("tij,ji->t", ρ, qt.sigmax().full())
|
||||
ys = np.einsum("tij,ji->t", ρ, qt.sigmay().full())
|
||||
zs = np.einsum("tij,ji->t", ρ, qt.sigmaz().full())
|
||||
|
||||
b.add_points([xs, ys, zs])
|
||||
b.view = [20, 20]
|
||||
b.point_size = [0.01]
|
||||
b.sphere_alpha = 0.01
|
||||
b.render()
|
||||
b
|
||||
|
||||
plt.plot(model.t, zs, label=r"$\langle \sigma_z\rangle$")
|
||||
plt.plot(model.t, xs, label=r"$\langle \sigma_x\rangle$")
|
||||
plt.plot(model.t, ys, label=r"$\langle \sigma_y\rangle$")
|
||||
plt.legend()
|
||||
plt.xlabel(r"$\tau$")
|
||||
fs.export_fig("state_evolution", y_scaling=.7)
|
||||
|
||||
ot.plot_steady_energy_changes([baseline], 2, label_fn=lambda _: "")
|
||||
fs.export_fig("prototype_energy_change", y_scaling=.7)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue