Skip to content

Commit a6ccde1

Browse files
TendonFFFcailixun
andauthored
Brmesolve user guide (#492)
Co-authored-by: cailixun <[email protected]>
1 parent 68e2d94 commit a6ccde1

File tree

6 files changed

+281
-0
lines changed

6 files changed

+281
-0
lines changed

.typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[default.extend-words]
22
ket = "ket"
33
sme = "sme"
4+
nd = "nd"

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
- Add Bloch-Redfield master equation solver. ([#473])
1212
- Implement Bloch Sphere rendering and align style with qutip. ([#472], [#480], [#485], [#487], [#489])
1313
- Add `Base.copy` method for `AbstractQuantumObject`. ([#486])
14+
- Add documentation for Bloch-Redfield master equation. ([#493])
1415

1516
## [v0.31.1]
1617
Release date: 2025-05-16
@@ -241,3 +242,4 @@ Release date: 2024-11-13
241242
[#486]: https://github.com/qutip/QuantumToolbox.jl/issues/486
242243
[#487]: https://github.com/qutip/QuantumToolbox.jl/issues/487
243244
[#489]: https://github.com/qutip/QuantumToolbox.jl/issues/489
245+
[#493]: https://github.com/qutip/QuantumToolbox.jl/issues/493

docs/make.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ const PAGES = [
5959
"Monte Carlo Solver" => "users_guide/time_evolution/mcsolve.md",
6060
"Stochastic Solver" => "users_guide/time_evolution/stochastic.md",
6161
"Solving Problems with Time-dependent Hamiltonians" => "users_guide/time_evolution/time_dependent.md",
62+
"Bloch-Redfield master equation" => "users_guide/time_evolution/brmesolve.md",
6263
],
6364
"Intensive parallelization on a Cluster" => "users_guide/cluster.md",
6465
"Hierarchical Equations of Motion" => "users_guide/HEOM.md",

docs/src/resources/bibliography.bib

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,23 @@ @article{Hill-Wootters1997
119119
doi = {10.1103/PhysRevLett.78.5022},
120120
url = {https://link.aps.org/doi/10.1103/PhysRevLett.78.5022}
121121
}
122+
123+
@book{Cohen_Tannoudji_atomphoton,
124+
address = {New York},
125+
author = {{Cohen-Tannoudji}, C. and {Grynberg}, G. and {Dupont-Roc}, J.},
126+
publisher = {Wiley},
127+
timestamp = {2010-12-01T16:20:40.000+0100},
128+
title = {Atom-Photon Interactions: Basic Processes and Applications },
129+
year = 1992
130+
}
131+
132+
@book{breuer2002,
133+
title = {The Theory of Open Quantum Systems},
134+
author = {Breuer, Heinz-Peter and Petruccione, Francesco},
135+
year = {2002},
136+
publisher = {Oxford university press},
137+
address = {Oxford New York},
138+
isbn = {978-0-19-852063-4},
139+
langid = {english},
140+
lccn = {530.12}
141+
}
Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,252 @@
1+
# [Bloch-Redfield master equation](@id doc-TE:Bloch-Redfield-master-equation)
2+
3+
The [Lindblad master equation](@ref doc-TE:Lindblad-Master-Equation-Solver) introduced earlier is constructed so that it describes a physical evolution of the density matrix (i.e., trace and positivity preserving), but it does not provide a connection to any underlying microscopic physical model.
4+
The Lindblad operators (collapse operators) describe phenomenological processes, such as for example dephasing and spin flips, and the rates of these processes are arbitrary parameters in the model.
5+
In many situations the collapse operators and their corresponding rates have clear physical interpretation, such as dephasing and relaxation rates, and in those cases the Lindblad master equation is usually the method of choice.
6+
7+
However, in some cases, for example systems with varying energy biases and eigenstates and that couple to an environment in some well-defined manner (through a physically motivated system-environment interaction operator), it is often desirable to derive the master equation from more fundamental physical principles, and relate it to for example the noise-power spectrum of the environment.
8+
9+
The Bloch-Redfield formalism is one such approach to derive a master equation from a microscopic system.
10+
It starts from a combined system-environment perspective, and derives a perturbative master equation for the system alone, under the assumption of weak system-environment coupling.
11+
One advantage of this approach is that the dissipation processes and rates are obtained directly from the properties of the environment.
12+
On the downside, it does not intrinsically guarantee that the resulting master equation unconditionally preserves the physical properties of the density matrix (because it is a perturbative method).
13+
The Bloch-Redfield master equation must therefore be used with care, and the assumptions made in the derivation must be honored.
14+
(The Lindblad master equation is in a sense more robust -- it always results in a physical density matrix -- although some collapse operators might not be physically justified).
15+
For a full derivation of the Bloch Redfield master equation, see e.g. [Cohen_Tannoudji_atomphoton](@citet) or [breuer2002](@citet).
16+
Here we present only a brief version of the derivation, with the intention of introducing the notation and how it relates to the implementation in `QuantumToolbox.jl`.
17+
18+
19+
## [Brief Derivation and Definitions](@id doc-TE:Brief-Derivation-and-Definitions)
20+
21+
The starting point of the Bloch-Redfield formalism is the total Hamiltonian for the system and the environment (bath): ``\hat{H} = \hat{H}_{\rm S} + \hat{H}_{\rm B} + \hat{H}_{\rm I}``, where ``\hat{H}`` is the total system+bath Hamiltonian, ``\hat{H}_{\rm S}`` and ``\hat{H}_{\rm B}`` are the system and bath Hamiltonians, respectively, and ``\hat{H}_{\rm I}`` is the interaction Hamiltonian.
22+
23+
The most general form of a master equation for the system dynamics is obtained by tracing out the bath from the von-Neumann equation of motion for the combined system (``\frac{d}{dt}\hat{\rho} = -i\hbar^{-1}[\hat{H}, \hat{\rho}]``). In the interaction picture the result is
24+
25+
```math
26+
\frac{d}{dt}\hat{\rho}_{\textrm{S}}(t) = - \hbar^{-2}\int_0^t d\tau\; \textrm{Tr}_{\textrm{B}} [\hat{H}_{\textrm{I}}(t), [\hat{H}_{\textrm{I}}(\tau), \hat{\rho}_{\textrm{S}}(\tau)\otimes\hat{\rho}_{\textrm{B}}]],
27+
```
28+
29+
where the additional assumption that the total system-bath density matrix can be factorized as ``\hat{\rho}(t) \approx \hat{\rho}_{\textrm{S}}(t) \otimes \hat{\rho}_{\textrm{B}}``.
30+
This assumption is known as the Born approximation, and it implies that there never is any entanglement between the system and the bath, neither in the initial state nor at any time during the evolution.
31+
*It is justified for weak system-bath interaction.*
32+
33+
The master equation above is non-Markovian, i.e., the change in the density matrix at a time ``t`` depends on states at all times ``\tau < t``, making it intractable to solve both theoretically and numerically.
34+
To make progress towards a manageable master equation, we now introduce the Markovian approximation, in which ``\hat{\rho}_{\textrm{S}}(\tau)`` is replaced by ``\hat{\rho}_{\textrm{S}}(t)``.
35+
The result is the Redfield equation
36+
37+
```math
38+
\frac{d}{dt}\hat{\rho}_{\textrm{S}}(t) = - \hbar^{-2}\int_0^t d\tau\; \textrm{Tr}_{\textrm{B}} [\hat{H}_{\textrm{I}}(t), [\hat{H}_{\textrm{I}}(\tau), \hat{\rho}_{\textrm{S}}(t)\otimes\hat{\rho}_{\textrm{B}}]],
39+
```
40+
41+
which is local in time with respect the density matrix, but still not Markovian since it contains an implicit dependence on the initial state. By extending the integration to infinity and substituting ``\tau \rightarrow t-\tau``, a fully Markovian master equation is obtained:
42+
43+
```math
44+
\frac{d}{dt}\hat{\rho}_{\textrm{S}}(t) = - \hbar^{-2}\int_0^\infty d\tau\; \textrm{Tr}_{\textrm{B}} [\hat{H}_{\textrm{I}}(t), [\hat{H}_{\textrm{I}}(t-\tau), \hat{\rho}_{\textrm{S}}(t)\otimes\hat{\rho}_{\textrm{B}}]].
45+
```
46+
47+
The two Markovian approximations introduced above are valid if the time-scale with which the system dynamics changes is large compared to the time-scale with which correlations in the bath decays (corresponding to a "short-memory" bath, which results in Markovian system dynamics).
48+
49+
The Markovian master equation above is still on a too general form to be suitable for numerical implementation. We therefore assume that the system-bath interaction takes the form ``\hat{H}_{\textrm{I}} = \sum_\alpha \hat{A}_\alpha \otimes \hat{B}_\alpha`` and where ``\hat{A}_\alpha`` are system operators and ``\hat{B}_\alpha`` are bath operators.
50+
This allows us to write master equation in terms of system operators and bath correlation functions:
51+
52+
```math
53+
\begin{split}\frac{d}{dt}\hat{\rho}_{\textrm{S}}(t) =
54+
-\hbar^{-2}
55+
\sum_{\alpha\beta}
56+
\int_0^\infty d\tau\;
57+
\left\{
58+
g_{\alpha\beta}(\tau) \left[\hat{A}_\alpha(t)\hat{A}_\beta(t-\tau)\hat{\rho}_{\textrm{S}}(t) - \hat{A}_\beta(t-\tau)\hat{\rho}_{\textrm{S}}(t)\hat{A}_\alpha(t)\right]
59+
\right. \nonumber\\
60+
\left.
61+
+ g_{\alpha\beta}(-\tau) \left[\hat{\rho}_{\textrm{S}}(t)\hat{A}_\alpha(t-\tau)\hat{A}_\beta(t) - \hat{A}_\beta(t)\hat{\rho}_{\textrm{S}}(t)\hat{A}_\beta(t-\alpha)\right]
62+
\right\},\end{split}
63+
```
64+
65+
where ``g_{\alpha\beta}(\tau) = \textrm{Tr}_{\textrm{B}}\left[\hat{B}_\alpha(t)\hat{B}_\beta(t-\tau)\hat{\rho}_{\textrm{B}}\right] = \langle\hat{B}_\alpha(\tau)\hat{B}_\beta(0)\rangle``,
66+
since the bath state ``\hat{\rho}_{\textrm{B}}`` is a steady state.
67+
68+
In the eigenbasis of the system Hamiltonian, where ``A_{mn}(t) = A_{mn} e^{i\omega_{mn}t}``,
69+
``\omega_{mn} = \omega_m - \omega_n`` and ``\omega_m`` are the eigenfrequencies
70+
corresponding the eigenstate ``\left|m\rangle``, we obtain in matrix form in the Schrödinger picture
71+
72+
```math
73+
\begin{aligned}
74+
\frac{d}{dt} \rho_{ab}(t) = & -i\omega_{ab}\rho_{ab}(t)\\
75+
&-\hbar^{-2} \sum_{\alpha,\beta} \sum_{c,d}^{\rm sec} \int_0^\infty d\tau\;
76+
\left\{
77+
g_{\alpha\beta}(\tau)
78+
\left[\delta_{bd}\sum_nA^\alpha_{an}A^\beta_{nc}e^{i\omega_{cn}\tau}
79+
-
80+
A^\beta_{ac} A^\alpha_{db} e^{i\omega_{ca}\tau}
81+
\right]
82+
\right. \\
83+
&+
84+
\left.
85+
g_{\alpha\beta}(-\tau)
86+
\left[\delta_{ac}\sum_n A^\alpha_{dn}A^\beta_{nb} e^{i\omega_{nd}\tau}
87+
-
88+
A^\beta_{ac}A^\alpha_{db}e^{i\omega_{bd}\tau}
89+
\right]
90+
\right\} \rho_{cd}(t),
91+
\end{aligned}
92+
```
93+
94+
where the "sec" above the summation symbol indicate summation of the secular terms which satisfy ``|\omega_{ab}-\omega_{cd}| \ll \tau_ {\rm decay}``.
95+
This is an almost-useful form of the master equation. The final step before arriving at the form of the Bloch-Redfield master equation that is implemented in `QuantumToolbox.jl`, involves rewriting the bath correlation function ``g(\tau)`` in terms of the noise-power spectrum of the environment ``S(\omega) = \int_{-\infty}^\infty d\tau e^{i\omega\tau} g(\tau)``:
96+
97+
```math
98+
\int_0^\infty d\tau\; g_{\alpha\beta}(\tau) e^{i\omega\tau} = \frac{1}{2}S_{\alpha\beta}(\omega) + i\lambda_{\alpha\beta}(\omega),
99+
```
100+
101+
where ``\lambda_{ab}(\omega)`` is an energy shift that is neglected here. The final form of the Bloch-Redfield master equation is
102+
103+
104+
```math
105+
\frac{d}{dt}\rho_{ab}(t)
106+
=
107+
-i\omega_{ab}\rho_{ab}(t)
108+
+
109+
\sum_{c,d}^{\rm sec}R_{abcd}\rho_{cd}(t),
110+
```
111+
112+
where
113+
114+
```math
115+
\begin{aligned}
116+
R_{abcd} = -\frac{\hbar^{-2}}{2} \sum_{\alpha,\beta}
117+
\left\{
118+
\delta_{bd}\sum_nA^\alpha_{an}A^\beta_{nc}S_{\alpha\beta}(\omega_{cn})
119+
-
120+
A^\beta_{ac} A^\alpha_{db} S_{\alpha\beta}(\omega_{ca})
121+
\right. \nonumber\\
122+
+
123+
\left.
124+
\delta_{ac}\sum_n A^\alpha_{dn}A^\beta_{nb} S_{\alpha\beta}(\omega_{dn})
125+
-
126+
A^\beta_{ac}A^\alpha_{db} S_{\alpha\beta}(\omega_{db})
127+
\right\},
128+
\end{aligned}
129+
```
130+
131+
is the Bloch-Redfield tensor.
132+
133+
The Bloch-Redfield master equation in this form is suitable for numerical implementation. The input parameters are the system Hamiltonian ``\hat{H}_{\textrm{S}}``, the system operators through which the environment couples to the system ``\hat{A}_\alpha``, and the noise-power spectrum ``S_{\alpha\beta}(\omega)`` associated with each system-environment interaction term.
134+
135+
To simplify the numerical implementation we often assume that ``\hat{A}_\alpha`` are Hermitian and that cross-correlations between different environment operators vanish, resulting in
136+
137+
```math
138+
\begin{aligned}
139+
R_{abcd} = -\frac{\hbar^{-2}}{2} \sum_{\alpha}
140+
\left\{
141+
\delta_{bd}\sum_nA^\alpha_{an}A^\alpha_{nc}S_{\alpha}(\omega_{cn})
142+
-
143+
A^\alpha_{ac} A^\alpha_{db} S_{\alpha}(\omega_{ca})
144+
\right. \nonumber\\
145+
+
146+
\left.
147+
\delta_{ac}\sum_n A^\alpha_{dn}A^\alpha_{nb} S_{\alpha}(\omega_{dn})
148+
-
149+
A^\alpha_{ac}A^\alpha_{db} S_{\alpha}(\omega_{db})
150+
\right\}.
151+
\end{aligned}
152+
```
153+
154+
## [Bloch-Redfield master equation in `QuantumToolbox.jl`](@id Bloch-Redfield-master-equation-in-QuantumToolbox-jl)
155+
156+
### Preparing the Bloch-Redfield tensor
157+
158+
In `QuantumToolbox.jl`, the Bloch-redfield master equation can be calculated using the function [`bloch_redfield_tensor`](@ref).
159+
It takes two mandatory arguments: The system Hamiltonian ``\hat{H}`` and a nested list `a_ops` consist of tuples as `(A, spec)`
160+
with `A::QuantumObject` being the [`Operator`](@ref) ``\hat{A}_\alpha`` and `spec::Function` being the spectral density function ``S_\alpha(\omega)``.
161+
162+
It is possible to also get the ``\alpha``-th term for the bath directly using [`brterm`](@ref). This function takes only one Hermitian coupling operator ``\hat{A}_\alpha`` and spectral response function ``S_\alpha(\omega)``.
163+
164+
To illustrate how to calculate the Bloch-Redfield tensor, let's consider a two-level atom
165+
166+
```math
167+
\hat{H}_{\textrm{S}} = -\frac{1}{2}\Delta\hat{\sigma}_x - \frac{1}{2}\varepsilon_0\hat{\sigma}_z
168+
```
169+
170+
```@setup brmesolve
171+
using QuantumToolbox
172+
173+
using CairoMakie
174+
CairoMakie.enable_only_mime!(MIME"image/svg+xml"())
175+
```
176+
177+
```@example brmesolve
178+
Δ = 0.2 * 2π
179+
ε0 = 1.0 * 2π
180+
γ1 = 0.5
181+
182+
H = -Δ/2.0 * sigmax() - ε0/2 * sigmaz()
183+
184+
ohmic_spectrum(ω) = (ω == 0.0) ? γ1 : γ1 / 2 * (ω / (2 * π)) * (ω > 0.0)
185+
186+
R, U = bloch_redfield_tensor(H, [(sigmax(), ohmic_spectrum)])
187+
188+
R
189+
```
190+
191+
Note that it is also possible to add Lindblad dissipation superoperators in the
192+
Bloch-Refield tensor by passing the operators via the third argument `c_ops`
193+
like you would in the [`mesolve`](@ref) or [`mcsolve`](@ref) functions.
194+
For convenience, when the keyword argument `fock_basis = false`, the function [`bloch_redfield_tensor`](@ref) also returns the basis
195+
transformation operator `U`, the eigen vector matrix, since they are calculated in the
196+
process of generating the Bloch-Redfield tensor `R`, and the `U` are usually
197+
needed again later when transforming operators between the laboratory basis and the eigen basis.
198+
The tensor can be obtained in the laboratory basis by setting `fock_basis = true`,
199+
in that case, the transformation operator `U` is not returned.
200+
201+
### Time evolution
202+
203+
The evolution of a wave function or density matrix, according to the Bloch-Redfield
204+
master equation, can be calculated using the function [`mesolve`](@ref)
205+
with Bloch-Refield tensor `R` in the laboratory basis instead of a [`liouvillian`](@ref).
206+
For example, to evaluate the expectation values of the ``\hat{\sigma}_x``,
207+
``\hat{\sigma}_y``, and ``\hat{\sigma}_z`` operators for the example above, we can use the following code:
208+
209+
```@example brmesolve
210+
Δ = 0.2 * 2 * π
211+
ϵ0 = 1.0 * 2 * π
212+
γ1 = 0.5
213+
214+
H = - Δ/2.0 * sigmax() - ϵ0/2.0 * sigmaz()
215+
216+
ohmic_spectrum(ω) = (ω == 0.0) ? γ1 : γ1 / 2 * (ω / (2 * π)) * (ω > 0.0)
217+
218+
a_ops = ((sigmax(), ohmic_spectrum),)
219+
e_ops = [sigmax(), sigmay(), sigmaz()]
220+
221+
# same initial random ket state in QuTiP doc
222+
ψ0 = Qobj([
223+
0.05014193+0.66000276im,
224+
0.67231376+0.33147603im
225+
])
226+
227+
tlist = LinRange(0, 15.0, 1000)
228+
sol = brmesolve(H, ψ0, tlist, a_ops, e_ops=e_ops)
229+
expt_list = real(sol.expect)
230+
231+
# plot the evolution of state on Bloch sphere
232+
sphere = Bloch()
233+
add_points!(sphere, [expt_list[1,:], expt_list[2,:], expt_list[3,:]])
234+
sphere.vector_color = ["red"]
235+
236+
add_vectors!(sphere, [Δ, 0, ϵ0] / √(Δ^2 + ϵ0^2))
237+
238+
fig, _ = render(sphere)
239+
fig
240+
```
241+
242+
The two steps of calculating the Bloch-Redfield tensor `R` and evolving according to
243+
the corresponding master equation can be combined into one by using the function
244+
[`brmesolve`](@ref), in addition to the same arguments as [`mesolve`](@ref) and
245+
[`mcsolve`](@ref), the nested list of operator-spectrum
246+
tuple should be given under `a_ops`.
247+
248+
```@example brmesolve
249+
sol = brmesolve(H, ψ0, tlist, ((sigmax(),ohmic_spectrum),); e_ops=e_ops)
250+
```
251+
252+
The resulting `sol` is of the `struct` [`TimeEvolutionSol`](@ref) as [`mesolve`](@ref).

docs/src/users_guide/time_evolution/intro.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
- [Generate QobjEvo](@ref doc-TE:Generate-QobjEvo)
2929
- [QobjEvo fields (attributes)](@ref doc-TE:QobjEvo-fields-(attributes))
3030
- [Using parameters](@ref doc-TE:Using-parameters)
31+
- [Bloch-Redfield master equation](@ref doc-TE:Bloch-Redfield-master-equation)
32+
- [Brief Derivation and Definitions](@ref doc-TE:Brief-Derivation-and-Definitions)
33+
- [Bloch-Redfield master equation in `QuantumToolbox.jl`](@ref Bloch-Redfield-master-equation-in-QuantumToolbox-jl)
34+
3135

3236
# [Introduction](@id doc-TE:Introduction)
3337

@@ -44,6 +48,7 @@ The following table lists the solvers provided by `QuantumToolbox` for dynamic q
4448
| Monte Carlo evolution | [`mcsolve`](@ref) | [`mcsolveProblem`](@ref) [`mcsolveEnsembleProblem`](@ref) | [`TimeEvolutionMCSol`](@ref) |
4549
| Stochastic Schrödinger equation | [`ssesolve`](@ref) | [`ssesolveProblem`](@ref) [`ssesolveEnsembleProblem`](@ref) | [`TimeEvolutionStochasticSol`](@ref) |
4650
| Stochastic master equation | [`smesolve`](@ref) | [`smesolveProblem`](@ref) [`smesolveEnsembleProblem`](@ref) | [`TimeEvolutionStochasticSol`](@ref) |
51+
| Bloch-Redfield master equation | [`brmesolve`](@ref) | - | [`TimeEvolutionSol`](@ref) |
4752

4853
!!! note "Solving dynamics with pre-defined problems"
4954
`QuantumToolbox` provides two different methods to solve the dynamics. One can use the function calls listed above by either taking all the operators (like Hamiltonian and collapse operators, etc.) as inputs directly, or generating the `prob`lems by yourself and take it as an input of the function call, e.g., `sesolve(prob)`.

0 commit comments

Comments
 (0)