Skip to content

Commit 6a22cf0

Browse files
committed
fix some errors
1 parent d551412 commit 6a22cf0

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

src/ADOs.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ struct ADOs
3333
N::Int
3434
parity::AbstractParity
3535

36-
function ADOs(data::SparseVector{ComplexF64,Int64}, dims, N::Int, parity::AbstractParity)
36+
function ADOs(data::AbstractVector, dims, N::Int, parity::AbstractParity)
3737
dimensions = _gen_dimensions(dims)
3838
Vsize = size(data, 1)
3939
((Vsize / N) == prod(dimensions)^2) || error("The `dimensions` is not consistent with the ADOs number `N`.")
40-
return new(data, dimensions, N, parity)
40+
return new(sparsevec(data), dimensions, N, parity)
4141
end
4242
end
4343

@@ -50,7 +50,7 @@ Generate the object of auxiliary density operators for HEOM model.
5050
- `N::Int` : the number of auxiliary density operators.
5151
- `parity::AbstractParity` : the parity label (`EVEN` or `ODD`). Default to `EVEN`.
5252
"""
53-
ADOs(V::AbstractVector, N::Int, parity::AbstractParity = EVEN) = ADOs(sparsevec(V), (size(V, 1) / N), N, parity)
53+
ADOs(V::AbstractVector, N::Int, parity::AbstractParity = EVEN) = ADOs(V, isqrt(Int(size(V, 1) / N)), N, parity)
5454

5555
@doc raw"""
5656
ADOs(ρ, N, parity)

src/bath/BosonBath.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ end
513513
function Base.getproperty(
514514
b::BType,
515515
key::Symbol,
516-
) where {B<:Union{bosonReal,bosonImage,bosonRealImag,bosonAbsorb,bosonEmit}}
516+
) where {BType<:Union{bosonReal,bosonImag,bosonRealImag,bosonAbsorb,bosonEmit}}
517517
# a comment here to avoid bad render by JuliaFormatter
518518
if key === :dims
519519
return dimensions_to_dims(getfield(b, :dimensions))

src/bath/FermionBath.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ function fermionEmit(
213213
)
214214
end
215215

216-
function Base.getproperty(b::BType, key::Symbol) where {B<:Union{fermionAbsorb,fermionEmit}}
216+
function Base.getproperty(b::BType, key::Symbol) where {BType<:Union{fermionAbsorb,fermionEmit}}
217217
# a comment here to avoid bad render by JuliaFormatter
218218
if key === :dims
219219
return dimensions_to_dims(getfield(b, :dimensions))

src/heom_matrices/M_Boson.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ Note that the parity only need to be set as `ODD` when the system contains fermi
155155
println("[DONE]")
156156
flush(stdout)
157157
end
158-
return M_Boson(L_he, tier, copy(_Hsys.dimensions), Nado, sup_dim, parity, Bath, hierarchy)
158+
return M_Boson(L_he, tier, _Hsys.dimensions, Nado, sup_dim, parity, Bath, hierarchy)
159159
end
160160

161161
_getBtier(M::M_Boson) = M.tier

src/heom_matrices/M_Boson_Fermion.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Note that the parity only need to be set as `ODD` when the system contains fermi
225225
println("[DONE]")
226226
flush(stdout)
227227
end
228-
return M_Boson_Fermion(L_he, Btier, Ftier, copy(_Hsys.dimensions), Nado, sup_dim, parity, Bbath, Fbath, hierarchy)
228+
return M_Boson_Fermion(L_he, Btier, Ftier, _Hsys.dimensions, Nado, sup_dim, parity, Bbath, Fbath, hierarchy)
229229
end
230230

231231
_getBtier(M::M_Boson_Fermion) = M.Btier

src/heom_matrices/M_Fermion.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Generate the fermion-type HEOM Liouvillian superoperator matrix
152152
println("[DONE]")
153153
flush(stdout)
154154
end
155-
return M_Fermion(L_he, tier, copy(_Hsys.dimensions), Nado, sup_dim, parity, Bath, hierarchy)
155+
return M_Fermion(L_he, tier, _Hsys.dimensions, Nado, sup_dim, parity, Bath, hierarchy)
156156
end
157157

158158
_getBtier(M::M_Fermion) = 0

src/heom_matrices/M_S.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Note that the parity only need to be set as `ODD` when the system contains fermi
6161
println("[DONE]")
6262
flush(stdout)
6363
end
64-
return M_S(Lsys, 0, copy(_Hsys.dimensions), 1, sup_dim, parity)
64+
return M_S(Lsys, 0, _Hsys.dimensions, 1, sup_dim, parity)
6565
end
6666

6767
_getBtier(M::M_S) = 0

src/heom_matrices/heom_matrix_base.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,10 @@ end
329329
addFermionDissipator(M::AbstractHEOMLSMatrix, jumpOP::QuantumObject) = addFermionDissipator(M, [jumpOP])
330330

331331
function _fermion_lindblad_dissipator(
332-
J::QuantumObject{DT,OperatorQuantumObject},
332+
J::QuantumObject{OperatorQuantumObject},
333333
parity::AbstractParity,
334334
Id_cache = I(size(J, 1)),
335-
) where {DT}
335+
)
336336
_J = J.data
337337
Jd_J = _J' * _J
338338
return (-1)^(value(parity)) * _sprepost(_J, _J') - (_spre(Jd_J, Id_cache) + _spost(Jd_J, Id_cache)) / 2

0 commit comments

Comments
 (0)