add bias field simulations
|
@ -27,7 +27,7 @@
|
|||
shellOverride = (pkgs: oldAttrs: {
|
||||
shellHook = ''
|
||||
# export PYTHONPATH=/home/hiro/src/stocproc/:$PYTHONPATH
|
||||
# export PYTHONPATH=/home/hiro/src/two_qubit_model/:$PYTHONPATH
|
||||
export PYTHONPATH=/home/hiro/src/two_qubit_model/:$PYTHONPATH
|
||||
# export PYTHONPATH=/home/hiro/src/hops/:$PYTHONPATH
|
||||
# export PYTHONPATH=/home/hiro/src/hopsflow/:$PYTHONPATH
|
||||
export LD_LIBRARY_PATH="${(pkgs.lib.makeLibraryPath [pkgs.arb])}"
|
||||
|
|
2
python/otto_motor/poetry.lock
generated
|
@ -732,7 +732,7 @@ qutip = "^4.6.3"
|
|||
type = "git"
|
||||
url = "git@github.com:vale981/two_qubit_model.git"
|
||||
reference = "main"
|
||||
resolved_reference = "1306895b4a44f384f7dca65a02dcbb4bd7d0e8fb"
|
||||
resolved_reference = "9c2dd0f625b16c3be723382fdc83796086660578"
|
||||
|
||||
[[package]]
|
||||
name = "hops"
|
||||
|
|
Before Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 2.8 MiB |
Before Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 38 KiB |
|
@ -902,3 +902,50 @@ Interestingly, even with the too-fast switching we have greater power, and great
|
|||
[[file:./.ob-jupyter/48801c84dacb82ca9d37f0af0519727e298ec1fd.svg]]
|
||||
[[file:./.ob-jupyter/0ef615f736de27bf2129d27452b3f55fb30ff82e.svg]]
|
||||
:END:
|
||||
|
||||
|
||||
* Rotating Hamiltonian
|
||||
Let us brieofly demonstrate the effects of rotating the system
|
||||
hamiltonian.
|
||||
|
||||
** Construction
|
||||
#+begin_src jupyter-python :tangle tangle/rot.py :results none
|
||||
<<boilerplate>>
|
||||
import itertools
|
||||
from hops.util.dynamic_matrix import ConstantMatrix
|
||||
#+end_src
|
||||
|
||||
#+begin_src jupyter-python :tangle tangle/rot.py
|
||||
rot_models = []
|
||||
weights = [.3, .6]
|
||||
for weight in weights:
|
||||
off_ax = sc.make_model(0, 0)
|
||||
off_ax.H_bias = ConstantMatrix(.3 / 2 * qt.sigmax().full())
|
||||
rot_models.append(off_ax)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
||||
#+begin_src jupyter-python
|
||||
τs = rot_models[0].t
|
||||
#plt.plot(τs, np.einsum('tij,ij->t', rot_models[0].H(τs), qt.sigmay().full()).real)
|
||||
plt.plot(τs, abs(rot_models[0].H(τs)[:, 0, 0]))
|
||||
plt.plot(τs, abs(rot_models[0].H(τs)[:, 0, 1]))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
: ConstantMatrix(array([[0. +0.j, 0.15+0.j], [0.15+0.j, 0. +0.j]]))
|
||||
: ConstantMatrix(array([[0. +0.j, 0.15+0.j], [0.15+0.j, 0. +0.j]]))
|
||||
| <matplotlib.lines.Line2D | at | 0x7f12bfd809a0> |
|
||||
[[file:./.ob-jupyter/d0d95f8d7e00f7a9dda3749f2a14973988e6887b.svg]]
|
||||
:END:
|
||||
|
||||
** Integration
|
||||
#+begin_src jupyter-python :tangle tangle/rot.py
|
||||
ot.integrate_online_multi(off_ax_models, 10, increment=10, analyze_kwargs=dict(every=10_000))
|
||||
#+end_src
|
||||
|
||||
#+begin_src jupyter-python
|
||||
aux.import_results(other_data_path="taurus/.data_oa", other_results_path="taurus/results")
|
||||
#+end_src
|
||||
|
|
|
@ -310,3 +310,10 @@ for (i, model), weight in zip(enumerate(off_ax_models), weights):
|
|||
f, a = ot.plot_energy(model)
|
||||
a.set_title(rf"$r_y={weight}$")
|
||||
fs.export_fig(f"full_energy_offaxis_{weight}", x_scaling=2, y_scaling=1)
|
||||
|
||||
τs = rot_models[0].t
|
||||
#plt.plot(τs, np.einsum('tij,ij->t', rot_models[0].H(τs), qt.sigmay().full()).real)
|
||||
plt.plot(τs, abs(rot_models[0].H(τs)[:, 0, 0]))
|
||||
plt.plot(τs, abs(rot_models[0].H(τs)[:, 0, 1]))
|
||||
|
||||
aux.import_results(other_data_path="taurus/.data_oa", other_results_path="taurus/results")
|
||||
|
|
31
python/otto_motor/subprojects/cycle_shift/tangle/rot.py
Normal file
|
@ -0,0 +1,31 @@
|
|||
import plot_utils as pu
|
||||
from hiro_models.one_qubit_model import StocProcTolerances
|
||||
from hiro_models.otto_cycle import OttoEngine
|
||||
import hiro_models.model_auxiliary as aux
|
||||
import numpy as np
|
||||
import qutip as qt
|
||||
import utilities as ut
|
||||
import stocproc
|
||||
import matplotlib.pyplot as plt
|
||||
import otto_utilities as ot
|
||||
import shift_cycle as sc
|
||||
import ray
|
||||
import figsaver as fs
|
||||
ray.shutdown()
|
||||
|
||||
#ray.init(address='auto')
|
||||
ray.init()
|
||||
from hops.util.logging_setup import logging_setup
|
||||
import logging
|
||||
logging_setup(logging.INFO)
|
||||
import itertools
|
||||
from hops.util.dynamic_matrix import ConstantMatrix
|
||||
|
||||
rot_models = []
|
||||
weights = [.3, .6]
|
||||
for weight in weights:
|
||||
off_ax = sc.make_model(0, 0)
|
||||
off_ax.H_bias = ConstantMatrix(.3 / 2 * qt.sigmax().full())
|
||||
rot_models.append(off_ax)
|
||||
|
||||
ot.integrate_online_multi(off_ax_models, 10, increment=10, analyze_kwargs=dict(every=10_000))
|