Skip to content

Commit

Permalink
build based on 12a8881
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed May 15, 2024
1 parent a0f69c9 commit 05feb5c
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 13 deletions.
53 changes: 46 additions & 7 deletions docs/examples/bath-observables/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,49 @@
correlations_cdag = [
cdagcdag_average[i, j, t] - cdag_average[i, 1, t] .* cdag_average[j, 1, t]
for i in 1:size(cdagcdag_average, 1), j in 1:size(cdagcdag_average, 2), t in 1:size(cdagcdag_average,3)
]</code></pre><p>It is possible to invert the thermofield transformation (details in <sup class="footnote-reference"><a id="citeref-riva_thermal_2023" href="#footnote-riva_thermal_2023">[riva_thermal_2023]</a></sup>). The expression of the mean value of the number operator for the physical modes can be expressed as a function of mean values in the extended bath, which we denote <span>$\langle \hat a_{2k}^\dagger \hat a_{2k} \rangle$</span>:</p>$<pre><code class="language-none">\langle \hat b_k^\dagger \hat b_k \rangle = \cosh{\theta_k}\sinh{\theta_k} (\langle \hat a_{2k}\hat a_{1k}\rangle + \langle \hat a_{1k}^\dagger\hat a_{2k}^\dagger\rangle ) + \sinh^2{\theta_k} (1+ \langle \hat a_{2k}^\dagger \hat a_{2k} \rangle ) ++ \cosh^2{\theta_k} \langle \hat a_{1k}^\dagger \hat a_{1k} \rangle</code></pre>$<p>We remark that in the thermofield case, a negative frequency <span>$\omega_{2k}$</span> is associated to each positive frequency <span>$\omega_{1k}$</span>. The sampling is therefore symmetric around zero. This marks a difference with T-TEDOPA, where the sampling of frequencies was obtained through the thermalized measure <span>$d\mu(\beta) = \sqrt{J(\omega, \beta)}d\omega$</span>, and was not symmetric. To recover the results for the physical bath of frequencies starting from the results of our simulations, that were conducted using the T-TEDOPA chain mapping, we need to do an extrapolation for all of the mean values appearing in Eq. \ref{eq:physical<em>occupations}, in order to have their values for each <span>$\omega$</span> at <span>$-\omega$</span> as well. This is done in the code with the `physical</em>occup<code>function:</code>``julia bath<em>occup</em>phys = physical<em>occup(correlations</em>cdag[:,:,T], correlations<em>c[:,:,T], omeg, bath</em>occup[:,:,T], β, N)</p><pre><code class="language-none">
Finally, in the pure dephasing case, it is also possible to obtain the analytical prediction of the time evolution of the occupations of the bath&#39;s modes, so that we can compare our numerical results with the analytical ones, exploiting the Heisenberg time evolution relation:
$$
\frac{d \langle \hat b_\omega \rangle}{dt} = -i \langle[ \hat b_\omega, \hat H] \rangle = - i \omega \langle\hat b_\omega \rangle - i \frac{\langle \hat \sigma_x \rangle}{2} \sqrt{J(\omega, \beta)}, \\
\frac{d \langle \hat n_\omega \rangle}{dt} = -i \langle[\hat b_\omega^\dagger \hat b_\omega, \hat H] \rangle= 2 \frac{|J(\omega,\beta)|}{\omega} \sin(\omega t).
$$
To this end, it is convenient to choose one of the eigenstates of $\hat \sigma_z$ as the initial state, so that $\langle \hat \sigma_x \rangle = \pm 1$. By solving these differential equations, one obtains the time evolved theoretical behavior of the bath. We define the function for the comparison with analytical predictions:</code></pre><p>julia Johmic(ω,s) = (2<em>α</em>ω^s)/(ωc^(s-1))</p><p>time_analytical = LinRange(0.0, tfinal, Int(tfinal))</p><p>Γohmic(t) = - quadgk(x -&gt; Johmic(x,s)<em>(1 - cos(x</em>t))<em>coth(β</em>x/2)/x^2, 0, ωc)[1]</p><p>Decoherence_ohmic(t) = 0.5 * exp(Γohmic(t))</p><p>α<em>theo = 0.25 * α function Jtherm(x) if 1 &gt;= x &gt;= 0 return +α</em>theo * abs(x)^s * (1 + coth(β<em>0.5</em>x)) elseif -1 &lt;= x &lt;= 0 return -α_theo * abs(x)^s * (1 + coth(β<em>0.5</em>x)) else return 0 end end</p><p>bath<em>occup</em>analytical(ω, t) = abs(Jtherm(ω))/(ω^2)<em>2</em>(1-cos(ω*t)) </p><pre><code class="language-none">We conclude the example by plotting.</code></pre><p>julia ρ12 = abs.(dat[&quot;data/Reduced ρ&quot;][1,2,:])</p><p>p1 = plot(time<em>analytical, t-&gt;Decoherence</em>ohmic(t), label=&quot;Analytics&quot;, title=L&quot;Pure Dephasing, Ohmic <span>$s=%$</span>s<span>$, $\beta = %$</span>β ~\mathrm{K}<span>$&quot;, linecolor=:black, xlabel=&quot;Time (arb. units)&quot;, ylabel=L&quot;Coherence $|\rho_{12}(t)|$</span>&quot;, linewidth=4, titlefontsize=16, legend=:best, legendfontsize=16, xguidefontsize=16, yguidefontsize=16, tickfontsize=10) p1 = plot!(dat[&quot;data/times&quot;], ρ12, lw=4, ls=:dash, label=&quot;Numerics&quot;)</p><p>cumul = [bath<em>occup</em>analytical(omeg[i], tfinal)*(omeg[i+1]-omeg[i]) for i in 1:(length(omeg)-1)]</p><p>p2 = plot(omeg[1:length(omeg)-1], cumul, lw = 4, linecolor=:black, xlabel=L&quot;\omega&quot;, ylabel=L&quot;\langle n^b<em>\omega \rangle&quot;, label=&quot;Analytics&quot;, title=&quot;Mode occupation in the extended bath&quot;) p2 = plot!(omeg, bath</em>occup[:, :, T], lw=4, ls=:dash, label=&quot;Numerics&quot;)</p><p>p3 = heatmap(omeg, omeg, abs.(real.(correlations<em>cdag[:,:,T]) .+ im*imag.(correlations</em>cdag[:,:,T])), xlabel=L&quot;\omega&quot;, ylabel=L&quot;\omega&quot;, title=&quot;Environmental correlations&quot;)</p><p>Mhalf = Int(length(omeg)*0.5)+1 M = length(omeg)</p><p>p4 = plot(omeg[Mhalf:M], bath<em>occup</em>phys, lw=4, xlabel=L&quot;\omega&quot;, ylabel=L&quot;\langle n^b_\omega \rangle&quot;, title=&quot;Mode occupation in the physical bath&quot;)</p><p>plot(p1, p2, p3, p4, layout = (2, 2), size = (1400, 1200)) ```</p><p>___________________</p><h1 id="References"><a class="docs-heading-anchor" href="#References">References</a><a id="References-1"></a><a class="docs-heading-anchor-permalink" href="#References" title="Permalink"></a></h1><section class="footnotes is-size-7"><ul><li class="footnote" id="footnote-chin_exact_2010"><a class="tag is-link" href="#citeref-chin_exact_2010">chin_exact_2010</a><blockquote><p>Chin, A. W.; Rivas, Á.; Huelga, S. F.; Plenio, M. B. Exact Mapping between System-Reservoir Quantum Models and Semi-Infinite Discrete Chains Using Orthogonal Polynomials. Journal of Mathematical Physics 2010, 51 (9), 092109. https://doi.org/10.1063/1.3490188.</p></blockquote></li><li class="footnote" id="footnote-tamascelli_efficient_2019"><a class="tag is-link" href="#citeref-tamascelli_efficient_2019">tamascelli_efficient_2019</a><blockquote><p>Tamascelli, D.; Smirne, A.; Lim, J.; Huelga, S. F.; Plenio, M. B. Efficient Simulation of Finite-Temperature Open Quantum Systems. Phys. Rev. Lett. 2019, 123 (9), 090402. https://doi.org/10.1103/PhysRevLett.123.090402.</p></blockquote></li><li class="footnote" id="footnote-devega_thermo_2015"><a class="tag is-link" href="#citeref-devega_thermo_2015">devega_thermo_2015</a><blockquote><p>de Vega, I.; Banuls, M-.C. Thermofield-based chain-mapping approach for open quantum systems. Phys. Rev. A 2015, 92 (5), 052116. https://doi.org/10.1103/PhysRevA.92.052116.</p></blockquote></li><li class="footnote" id="footnote-riva_thermal_2023"><a class="tag is-link" href="#citeref-riva_thermal_2023">riva_thermal_2023</a><blockquote><p>Riva, A.; Tamascelli, D.; Dunnett, A. J.; Chin, A. W. Thermal cycle and polaron formation in structured bosonic environments. Phys. Rev. B 2023, 108, 195138, https://doi.org/10.1103/PhysRevB.108.195138.</p></blockquote></li></ul></section></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../anderson-model/">« The Anderson Impurity Model</a><a class="docs-footer-nextpage" href="../../theory/">Theoretical Background »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 15 May 2024 16:21">Wednesday 15 May 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
]</code></pre><p>It is possible to invert the thermofield transformation (details in <sup class="footnote-reference"><a id="citeref-riva_thermal_2023" href="#footnote-riva_thermal_2023">[riva_thermal_2023]</a></sup>). The expression of the mean value of the number operator for the physical modes can be expressed as a function of mean values in the extended bath, which we denote <span>$\langle \hat a_{2k}^\dagger \hat a_{2k} \rangle$</span>:</p>$<pre><code class="language-none">\langle \hat b_k^\dagger \hat b_k \rangle = \cosh{\theta_k}\sinh{\theta_k} (\langle \hat a_{2k}\hat a_{1k}\rangle + \langle \hat a_{1k}^\dagger\hat a_{2k}^\dagger\rangle ) + \sinh^2{\theta_k} (1+ \langle \hat a_{2k}^\dagger \hat a_{2k} \rangle ) ++ \cosh^2{\theta_k} \langle \hat a_{1k}^\dagger \hat a_{1k} \rangle</code></pre>$<p>We remark that in the thermofield case, a negative frequency <span>$\omega_{2k}$</span> is associated to each positive frequency <span>$\omega_{1k}$</span>. The sampling is therefore symmetric around zero. This marks a difference with T-TEDOPA, where the sampling of frequencies was obtained through the thermalized measure <span>$d\mu(\beta) = \sqrt{J(\omega, \beta)}d\omega$</span>, and was not symmetric. To recover the results for the physical bath of frequencies starting from the results of our simulations, that were conducted using the T-TEDOPA chain mapping, we need to do an extrapolation for all of the mean values appearing in Eq. \ref{eq:physical<em>occupations}, in order to have their values for each <span>$\omega$</span> at <span>$-\omega$</span> as well. This is done in the code with the `physical</em>occup` function:</p><pre><code class="language-julia">bath_occup_phys = physical_occup(correlations_cdag[:,:,T], correlations_c[:,:,T], omeg, bath_occup[:,:,T], β, N)</code></pre><p>Finally, in the pure dephasing case, it is also possible to obtain the analytical prediction of the time evolution of the occupations of the bath&#39;s modes, so that we can compare our numerical results with the analytical ones, exploiting the Heisenberg time evolution relation: $ \frac{d \langle \hat b<em>\omega \rangle}{dt} = -i \langle[ \hat b</em>\omega, \hat H] \rangle = - i \omega \langle\hat b<em>\omega \rangle - i \frac{\langle \hat \sigma</em>x \rangle}{2} \sqrt{J(\omega, \beta)}, \
\frac{d \langle \hat n<em>\omega \rangle}{dt} = -i \langle[\hat b</em>\omega^\dagger \hat b<em>\omega, \hat H] \rangle= 2 \frac{|J(\omega,\beta)|}{\omega} \sin(\omega t). $ To this end, it is convenient to choose one of the eigenstates of \hat \sigma</em>z$ as the initial state, so that <span>$\langle \hat \sigma_x \rangle = \pm 1$</span>. By solving these differential equations, one obtains the time evolved theoretical behavior of the bath. We define the function for the comparison with analytical predictions:</p><pre><code class="language-julia">Johmic(ω,s) = (2*α*ω^s)/(ωc^(s-1))

time_analytical = LinRange(0.0, tfinal, Int(tfinal))

Γohmic(t) = - quadgk(x -&gt; Johmic(x,s)*(1 - cos(x*t))*coth(β*x/2)/x^2, 0, ωc)[1]

Decoherence_ohmic(t) = 0.5 * exp(Γohmic(t))


α_theo = 0.25 * α
function Jtherm(x)
if 1 &gt;= x &gt;= 0
return +α_theo * abs(x)^s * (1 + coth(β*0.5*x))
elseif -1 &lt;= x &lt;= 0
return -α_theo * abs(x)^s * (1 + coth(β*0.5*x))
else
return 0
end
end

bath_occup_analytical(ω, t) = abs(Jtherm(ω))/(ω^2)*2*(1-cos(ω*t)) </code></pre><p>We conclude the example by plotting.</p><pre><code class="language-julia">ρ12 = abs.(dat[&quot;data/Reduced ρ&quot;][1,2,:])

p1 = plot(time_analytical, t-&gt;Decoherence_ohmic(t), label=&quot;Analytics&quot;, title=L&quot;Pure Dephasing, Ohmic $s=%$s$, $\beta = %$β ~\mathrm{K}$&quot;, linecolor=:black, xlabel=&quot;Time (arb. units)&quot;, ylabel=L&quot;Coherence $|\rho_{12}(t)|$&quot;, linewidth=4, titlefontsize=16, legend=:best, legendfontsize=16, xguidefontsize=16, yguidefontsize=16, tickfontsize=10)
p1 = plot!(dat[&quot;data/times&quot;], ρ12, lw=4, ls=:dash, label=&quot;Numerics&quot;)

cumul = [bath_occup_analytical(omeg[i], tfinal)*(omeg[i+1]-omeg[i]) for i in 1:(length(omeg)-1)]

p2 = plot(omeg[1:length(omeg)-1], cumul, lw = 4, linecolor=:black,
xlabel=L&quot;\omega&quot;, ylabel=L&quot;\langle n^b_\omega \rangle&quot;, label=&quot;Analytics&quot;,
title=&quot;Mode occupation in the extended bath&quot;)
p2 = plot!(omeg, bath_occup[:, :, T], lw=4, ls=:dash, label=&quot;Numerics&quot;)

p3 = heatmap(omeg, omeg, abs.(real.(correlations_cdag[:,:,T]) .+ im*imag.(correlations_cdag[:,:,T])),
xlabel=L&quot;\omega&quot;,
ylabel=L&quot;\omega&quot;, title=&quot;Environmental correlations&quot;)


Mhalf = Int(length(omeg)*0.5)+1
M = length(omeg)

p4 = plot(omeg[Mhalf:M], bath_occup_phys, lw=4,
xlabel=L&quot;\omega&quot;, ylabel=L&quot;\langle n^b_\omega \rangle&quot;,
title=&quot;Mode occupation in the physical bath&quot;)

plot(p1, p2, p3, p4, layout = (2, 2), size = (1400, 1200))</code></pre><p>___________________</p><h1 id="References"><a class="docs-heading-anchor" href="#References">References</a><a id="References-1"></a><a class="docs-heading-anchor-permalink" href="#References" title="Permalink"></a></h1><section class="footnotes is-size-7"><ul><li class="footnote" id="footnote-chin_exact_2010"><a class="tag is-link" href="#citeref-chin_exact_2010">chin_exact_2010</a><blockquote><p>Chin, A. W.; Rivas, Á.; Huelga, S. F.; Plenio, M. B. Exact Mapping between System-Reservoir Quantum Models and Semi-Infinite Discrete Chains Using Orthogonal Polynomials. Journal of Mathematical Physics 2010, 51 (9), 092109. https://doi.org/10.1063/1.3490188.</p></blockquote></li><li class="footnote" id="footnote-tamascelli_efficient_2019"><a class="tag is-link" href="#citeref-tamascelli_efficient_2019">tamascelli_efficient_2019</a><blockquote><p>Tamascelli, D.; Smirne, A.; Lim, J.; Huelga, S. F.; Plenio, M. B. Efficient Simulation of Finite-Temperature Open Quantum Systems. Phys. Rev. Lett. 2019, 123 (9), 090402. https://doi.org/10.1103/PhysRevLett.123.090402.</p></blockquote></li><li class="footnote" id="footnote-devega_thermo_2015"><a class="tag is-link" href="#citeref-devega_thermo_2015">devega_thermo_2015</a><blockquote><p>de Vega, I.; Banuls, M-.C. Thermofield-based chain-mapping approach for open quantum systems. Phys. Rev. A 2015, 92 (5), 052116. https://doi.org/10.1103/PhysRevA.92.052116.</p></blockquote></li><li class="footnote" id="footnote-riva_thermal_2023"><a class="tag is-link" href="#citeref-riva_thermal_2023">riva_thermal_2023</a><blockquote><p>Riva, A.; Tamascelli, D.; Dunnett, A. J.; Chin, A. W. Thermal cycle and polaron formation in structured bosonic environments. Phys. Rev. B 2023, 108, 195138, https://doi.org/10.1103/PhysRevB.108.195138.</p></blockquote></li></ul></section></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../anderson-model/">« The Anderson Impurity Model</a><a class="docs-footer-nextpage" href="../../theory/">Theoretical Background »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 15 May 2024 16:21">Wednesday 15 May 2024</span>. Using Julia version 1.7.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 05feb5c

Please sign in to comment.