Skip to content

Commit 23f6bb7

Browse files
Remove OperatorSum and TimeDependentOperatorSum
1 parent d1d0daf commit 23f6bb7

File tree

5 files changed

+90
-192
lines changed

5 files changed

+90
-192
lines changed

docs/src/api.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ OperatorKet
2626
SuperOperatorQuantumObject
2727
SuperOperator
2828
QuantumObject
29-
OperatorSum
3029
size
3130
eltype
3231
length

src/QuantumToolbox.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ include("qobj/states.jl")
8282
include("qobj/operators.jl")
8383
include("qobj/superoperators.jl")
8484
include("qobj/synonyms.jl")
85-
include("qobj/operator_sum.jl")
8685

8786
# time evolution
8887
include("time_evolution/time_evolution.jl")

src/qobj/operator_sum.jl

Lines changed: 0 additions & 58 deletions
This file was deleted.

src/time_evolution/time_evolution.jl

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export TimeDependentOperatorSum
21
export TimeEvolutionSol, TimeEvolutionMCSol, TimeEvolutionSSESol
32

43
export liouvillian, liouvillian_floquet, liouvillian_generalized
@@ -166,45 +165,6 @@ struct DiscreteLindbladJumpCallback <: LindbladJumpCallbackType end
166165

167166
ContinuousLindbladJumpCallback(; interp_points::Int = 10) = ContinuousLindbladJumpCallback(interp_points)
168167

169-
## Time-dependent sum of operators
170-
171-
struct TimeDependentOperatorSum{CFT,OST<:OperatorSum}
172-
coefficient_functions::CFT
173-
operator_sum::OST
174-
end
175-
176-
function TimeDependentOperatorSum(
177-
coefficient_functions,
178-
operators::Union{AbstractVector{<:QuantumObject},Tuple};
179-
params = nothing,
180-
init_time = 0.0,
181-
)
182-
# promote the type of the coefficients and the operators. Remember that the coefficient_functions si a vector of functions and the operators is a vector of QuantumObjects
183-
coefficients = [f(init_time, params) for f in coefficient_functions]
184-
operator_sum = OperatorSum(coefficients, operators)
185-
return TimeDependentOperatorSum(coefficient_functions, operator_sum)
186-
end
187-
188-
Base.size(A::TimeDependentOperatorSum) = size(A.operator_sum)
189-
Base.size(A::TimeDependentOperatorSum, inds...) = size(A.operator_sum, inds...)
190-
Base.length(A::TimeDependentOperatorSum) = length(A.operator_sum)
191-
192-
function op_sum_update_coefficients!(A::TimeDependentOperatorSum, t, params)
193-
@inbounds @simd for i in 1:length(A.coefficient_functions)
194-
A.operator_sum.coefficients[i] = A.coefficient_functions[i](t, params)
195-
end
196-
end
197-
198-
(A::TimeDependentOperatorSum)(t, params) = (op_sum_update_coefficients!(A, t, params); A)
199-
200-
@inline function LinearAlgebra.mul!(y::AbstractVector, A::TimeDependentOperatorSum, x::AbstractVector, α, β)
201-
return mul!(y, A.operator_sum, x, α, β)
202-
end
203-
204-
function liouvillian(A::TimeDependentOperatorSum, Id_cache = I(prod(A.operator_sum.operators[1].dims)))
205-
return TimeDependentOperatorSum(A.coefficient_functions, liouvillian(A.operator_sum, Id_cache))
206-
end
207-
208168
#######################################
209169

210170
function liouvillian_floquet(

0 commit comments

Comments
 (0)