|
| 1 | +--- |
| 2 | +title: "Driven systems and dynamical decoupling" |
| 3 | +author: Yi-Te Huang |
| 4 | +date: 2025-01-14 # last update (keep this comment as a reminder) |
| 5 | + |
| 6 | +engine: julia |
| 7 | +--- |
| 8 | + |
| 9 | +Inspirations taken from an example in QuTiP-BoFiN article [@QuTiP-BoFiN2023]. |
| 10 | + |
| 11 | +## Introduction |
| 12 | + |
| 13 | +In this example, we show how to solve the time evolution with time-dependent Hamiltonian problems in hierarchical equations of motion approach. |
| 14 | + |
| 15 | +Here, we study dynamical decoupling which is a common tool used to undo the dephasing effect from the environment even for finite pulse duration. |
| 16 | + |
| 17 | +## Hamiltonian |
| 18 | + |
| 19 | +We consider a two-level system coupled to a bosonic reservoir ($\textrm{b}$). The total Hamiltonian is given by $H_{\textrm{T}}=H_\textrm{s}+H_\textrm{b}+H_\textrm{sb}$, where each terms takes the form |
| 20 | + |
| 21 | +$$ |
| 22 | +\begin{aligned} |
| 23 | +H_{\textrm{s}}(t) &= H_0 + H_{\textrm{D}}(t),\\ |
| 24 | +H_0 &= \frac{\omega_0}{2} \sigma_z,\\ |
| 25 | +H_{\textrm{b}} &=\sum_{k}\omega_{k}b_{k}^{\dagger}b_{k},\\ |
| 26 | +H_{\textrm{sb}} &=\sigma_z\sum_{k}g_{\alpha,k}(b_k + b_k^{\dagger}). |
| 27 | +\end{aligned} |
| 28 | +$$ |
| 29 | + |
| 30 | +Here, $H_{\textrm{b}}$ describes a bosonic reservoir where $b_{k}$ $(b_{k}^{\dagger})$ is the bosonic annihilation (creation) operator associated to the $k$th mode (with frequency $\omega_{k}$). |
| 31 | + |
| 32 | +Furthermore, to observe the time evolution of the coherence, we consider the initial state to be |
| 33 | +$$ |
| 34 | +ψ(t=0)=\frac{1}{\sqrt{2}}\left(|0\rangle+|1\rangle\right) |
| 35 | +$$ |
| 36 | + |
| 37 | +Now, we need to build the system Hamiltonian and initial state with the package [`QuantumToolbox.jl`](https://github.com/qutip/QuantumToolbox.jl) to construct the operators. |
| 38 | + |
| 39 | +```{julia} |
| 40 | +using HierarchicalEOM # this automatically loads `QuantumToolbox` |
| 41 | +using CairoMakie # for plotting results |
| 42 | +``` |
| 43 | + |
| 44 | +```{julia} |
| 45 | +ω0 = 0.0 |
| 46 | +σz = sigmaz() |
| 47 | +σx = sigmax() |
| 48 | +H0 = 0.5 * ω0 * σz |
| 49 | +
|
| 50 | +# Define the operator that measures the 0, 1 element of density matrix |
| 51 | +ρ01 = Qobj([0 1; 0 0]) |
| 52 | +
|
| 53 | +ψ0 = (basis(2, 0) + basis(2, 1)) / √2 |
| 54 | +``` |
| 55 | + |
| 56 | +The time-dependent driving term $H_{\textrm{D}}(t)$ has the form |
| 57 | + |
| 58 | +$$ |
| 59 | +H_{\textrm{D}}(t) = \sum_{n=1}^N f_n(t) \sigma_x |
| 60 | +$$ |
| 61 | + |
| 62 | +where the pulse is chosen to have duration $\tau$ together with a delay $\Delta$ between each pulses, namely |
| 63 | + |
| 64 | +$$ |
| 65 | +f_n(t) |
| 66 | += \begin{cases} |
| 67 | + V & \textrm{if}~~(n-1)\tau + n\Delta \leq t \leq n (\tau + \Delta),\\ |
| 68 | + 0 & \textrm{otherwise}. |
| 69 | + \end{cases} |
| 70 | +$$ |
| 71 | + |
| 72 | +Here, we set the period of the pulses to be $\tau V = \pi/2$. Therefore, we consider two scenarios with fast and slow pulses: |
| 73 | + |
| 74 | +```{julia} |
| 75 | +# a function which returns the amplitude of the pulse at time t |
| 76 | +function pulse(p, t) |
| 77 | + τ = 0.5 * π / p.V |
| 78 | + period = τ + p.Δ |
| 79 | +
|
| 80 | + if (t % period) < τ |
| 81 | + return p.V |
| 82 | + else |
| 83 | + return 0 |
| 84 | + end |
| 85 | +end |
| 86 | +
|
| 87 | +tlist = 0:0.4:400 |
| 88 | +amp_fast = 0.50 |
| 89 | +amp_slow = 0.01 |
| 90 | +delay = 20 |
| 91 | +
|
| 92 | +fastTuple = (V = amp_fast, Δ = delay) |
| 93 | +slowTuple = (V = amp_slow, Δ = delay) |
| 94 | +
|
| 95 | +# plot |
| 96 | +fig = Figure(size = (600, 350)) |
| 97 | +ax = Axis(fig[1, 1], xlabel = L"t") |
| 98 | +lines!(ax, tlist, [pulse(fastTuple, t) for t in tlist], label = "Fast Pulse", linestyle = :solid) |
| 99 | +lines!(ax, tlist, [pulse(slowTuple, t) for t in tlist], label = "Slow Pulse", linestyle = :dash) |
| 100 | +
|
| 101 | +axislegend(ax, position = :rt) |
| 102 | +
|
| 103 | +fig |
| 104 | +``` |
| 105 | + |
| 106 | +## Construct bath objects |
| 107 | + |
| 108 | +We assume the bosonic reservoir to have a [Drude-Lorentz Spectral Density](https://qutip.org/HierarchicalEOM.jl/stable/bath_boson/Boson_Drude_Lorentz/#Boson-Drude-Lorentz), and we utilize the Padé decomposition. Furthermore, the spectral densities depend on the following physical parameters: |
| 109 | + |
| 110 | +- the coupling strength $\Gamma$ between system and reservoir |
| 111 | +- the band-width $W$ |
| 112 | +- the product of the Boltzmann constant $k$ and the absolute temperature $T$ : $kT$ |
| 113 | +- the total number of exponentials for the reservoir $(N + 1)$ |
| 114 | + |
| 115 | +```{julia} |
| 116 | +Γ = 0.0005 |
| 117 | +W = 0.005 |
| 118 | +kT = 0.05 |
| 119 | +N = 3 |
| 120 | +bath = Boson_DrudeLorentz_Pade(σz, Γ, W, kT, N) |
| 121 | +``` |
| 122 | + |
| 123 | +## Construct HEOMLS matrix |
| 124 | + |
| 125 | +::: {.callout-warning} |
| 126 | +Only provide the **time-independent** part of system Hamiltonian when constructing HEOMLS matrices (the time-dependent part `H_t` should be given when solving the time evolution). |
| 127 | +::: |
| 128 | + |
| 129 | +```{julia} |
| 130 | +tier = 6 |
| 131 | +M = M_Boson(H0, tier, bath) |
| 132 | +``` |
| 133 | + |
| 134 | +## time evolution with time-independent Hamiltonian |
| 135 | +```{julia} |
| 136 | +noPulseSol = HEOMsolve(M, ψ0, tlist; e_ops = [ρ01]); |
| 137 | +``` |
| 138 | + |
| 139 | +## Solve time evolution with time-dependent Hamiltonian |
| 140 | + |
| 141 | +We need to provide a `QuantumToolbox.QuantumObjectEvolution` (named as `H_D` in this case) |
| 142 | + |
| 143 | +```{julia} |
| 144 | +H_D = QobjEvo(σx, pulse) |
| 145 | +``` |
| 146 | + |
| 147 | +The keyword argument `params` in `HEOMsolve` will be passed to the argument `p` in user-defined function (`pulse` in this case) directly: |
| 148 | + |
| 149 | +```{julia} |
| 150 | +fastPulseSol = HEOMsolve(M, ψ0, tlist; e_ops = [ρ01], H_t = H_D, params = fastTuple) |
| 151 | +slowPulseSol = HEOMsolve(M, ψ0, tlist; e_ops = [ρ01], H_t = H_D, params = slowTuple) |
| 152 | +``` |
| 153 | + |
| 154 | +## Plot the coherence |
| 155 | + |
| 156 | +```{julia} |
| 157 | +fig = Figure(size = (600, 350)) |
| 158 | +ax = Axis(fig[1, 1], xlabel = L"t", ylabel = L"\rho_{01}") |
| 159 | +lines!(ax, tlist, real(fastPulseSol.expect[1, :]), label = "Fast Pulse", linestyle = :solid) |
| 160 | +lines!(ax, tlist, real(slowPulseSol.expect[1, :]), label = "Slow Pulse", linestyle = :dot) |
| 161 | +lines!(ax, tlist, real(noPulseSol.expect[1, :]), label = "no Pulse", linestyle = :dash) |
| 162 | +
|
| 163 | +axislegend(ax, position = :lb) |
| 164 | +
|
| 165 | +fig |
| 166 | +``` |
| 167 | + |
| 168 | +## Version Information |
| 169 | +```{julia} |
| 170 | +HierarchicalEOM.versioninfo() |
| 171 | +``` |
| 172 | + |
0 commit comments