Skip to content

Commit d8a280a

Browse files
Minor changes
1 parent 61461e8 commit d8a280a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

docs/src/users_guide/settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Here, we list out each setting along with the specific functions that will use i
1313

1414
- `tidyup_tol::Float64 = 1e-14` : tolerance for [`tidyup`](@ref) and [`tidyup!`](@ref).
1515
- `auto_tidyup::Bool = true` : Automatically tidyup during the following situations:
16-
* Solving for eigenstates, including [`eigenstates`](@ref), [`eigsolve`](@ref), and [`eigsolve_al`](@ref).
16+
* Solving for eigenstates, including [`eigenstates`](@ref), [`eigsolve`](@ref), [`eigsolve_al`](@ref), [`bloch_redfield_tensor`](@ref), [`brterm`](@ref) and [`brmesolve`](@ref).
1717
- (to be announced)
1818

1919
## Change default settings

src/time_evolution/brmesolve.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function bloch_redfield_tensor(
3737
U = QuantumObject(rst.vectors, Operator(), H.dimensions)
3838
sec_cutoff = float(sec_cutoff)
3939

40-
H_new = getVal(fock_basis) ? H : QuantumObject(Diagonal(real.(rst.values)), Operator(), H.dimensions)
40+
H_new = getVal(fock_basis) ? H : QuantumObject(Diagonal(rst.values), Operator(), H.dimensions)
4141
c_ops_new = isnothing(c_ops) ? nothing : map(x -> getVal(fock_basis) ? x : U' * x * U, c_ops)
4242
R = liouvillian(H_new, c_ops_new)
4343

@@ -112,13 +112,6 @@ function _brterm(
112112
ac_term = (A_mat .* spectrum) * A_mat
113113
bd_term = A_mat * (A_mat .* trans(spectrum))
114114

115-
# Remove small values before passing in the Liouville space
116-
if settings.auto_tidyup
117-
tidyup!(A_mat)
118-
tidyup!(ac_term)
119-
tidyup!(bd_term)
120-
end
121-
122115
if sec_cutoff != -1
123116
m_cut = similar(skew)
124117
map!(x -> abs(x) < sec_cutoff, m_cut, skew)
@@ -129,6 +122,13 @@ function _brterm(
129122
M_cut = @. abs(vec_skew - vec_skew') < sec_cutoff
130123
end
131124

125+
# Remove small values before passing in the Liouville space
126+
if settings.auto_tidyup
127+
tidyup!(A_mat)
128+
tidyup!(ac_term)
129+
tidyup!(bd_term)
130+
end
131+
132132
out =
133133
0.5 * (
134134
+ _sprepost(A_mat .* trans(spectrum), A_mat) + _sprepost(A_mat, A_mat .* spectrum) - _spost(ac_term, Id) -

0 commit comments

Comments
 (0)