From 0ed0260b5d671ac7dece319fc112161842338351 Mon Sep 17 00:00:00 2001 From: CompatHelper Julia Date: Sun, 18 May 2025 01:12:44 +0000 Subject: [PATCH 01/14] CompatHelper: bump compat for SciMLOperators to 1, (keep existing compat) --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 8b33fbb74..821d18faa 100644 --- a/Project.toml +++ b/Project.toml @@ -61,7 +61,7 @@ OrdinaryDiffEqTsit5 = "1" Pkg = "1" Random = "1" SciMLBase = "2" -SciMLOperators = "0.3, 0.4" +SciMLOperators = "0.3, 0.4, 1" SparseArrays = "1" SpecialFunctions = "2" StaticArraysCore = "1" From 69b3e964bfab8f43fb4f11ca18c3a25a2ee6f56c Mon Sep 17 00:00:00 2001 From: Yi-Te Huang <44385685+ytdHuang@users.noreply.github.com> Date: Sat, 24 May 2025 17:34:42 +0800 Subject: [PATCH 02/14] bump compat version of `SciMLOperators` --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 821d18faa..52ad06a5a 100644 --- a/Project.toml +++ b/Project.toml @@ -61,7 +61,7 @@ OrdinaryDiffEqTsit5 = "1" Pkg = "1" Random = "1" SciMLBase = "2" -SciMLOperators = "0.3, 0.4, 1" +SciMLOperators = "1" SparseArrays = "1" SpecialFunctions = "2" StaticArraysCore = "1" From a191a6a5c419df41bc9e172344fe0f82d77899ed Mon Sep 17 00:00:00 2001 From: Yi-Te Huang <44385685+ytdHuang@users.noreply.github.com> Date: Thu, 29 May 2025 19:29:01 +0800 Subject: [PATCH 03/14] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 52ad06a5a..f37e19f62 100644 --- a/Project.toml +++ b/Project.toml @@ -61,7 +61,7 @@ OrdinaryDiffEqTsit5 = "1" Pkg = "1" Random = "1" SciMLBase = "2" -SciMLOperators = "1" +SciMLOperators = "0.3 - 1" SparseArrays = "1" SpecialFunctions = "2" StaticArraysCore = "1" From 1c7f9d698dc0ec67817919fbb197202bc8872386 Mon Sep 17 00:00:00 2001 From: Yi-Te Huang Date: Sat, 14 Jun 2025 23:13:40 +0800 Subject: [PATCH 04/14] try to fix `QobjEvo` in `SciMLOperators v1` --- Project.toml | 2 +- src/qobj/quantum_object_evo.jl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index f37e19f62..52ad06a5a 100644 --- a/Project.toml +++ b/Project.toml @@ -61,7 +61,7 @@ OrdinaryDiffEqTsit5 = "1" Pkg = "1" Random = "1" SciMLBase = "2" -SciMLOperators = "0.3 - 1" +SciMLOperators = "1" SparseArrays = "1" SpecialFunctions = "2" StaticArraysCore = "1" diff --git a/src/qobj/quantum_object_evo.jl b/src/qobj/quantum_object_evo.jl index a4111f7c7..26c20bd6e 100644 --- a/src/qobj/quantum_object_evo.jl +++ b/src/qobj/quantum_object_evo.jl @@ -512,7 +512,8 @@ function (A::QuantumObjectEvolution)( ) end - A.data(ψout.data, ψin.data, p, t) + # We put `nothing` in the place of `u` because the time-dependence doesn't depend on the state + A.data(ψout.data, ψin.data, nothing, p, t) return ψout end From 4649d734312fe1cef7f94ff0f4560ec95b3e5b29 Mon Sep 17 00:00:00 2001 From: Yi-Te Huang Date: Mon, 16 Jun 2025 22:05:18 +0800 Subject: [PATCH 05/14] try to make `SciMLOperator v1` work in `sprepost` --- src/qobj/superoperators.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qobj/superoperators.jl b/src/qobj/superoperators.jl index 6bc9a71c3..c0ab35a1c 100644 --- a/src/qobj/superoperators.jl +++ b/src/qobj/superoperators.jl @@ -15,8 +15,11 @@ _sprepost(A::AbstractMatrix, B::AbstractSparseMatrix) = kron(transpose(B), spars _sprepost(A::AbstractSparseMatrix, B::AbstractMatrix) = kron(transpose(sparse(B)), A) _sprepost(A::AbstractSparseMatrix, B::AbstractSparseMatrix) = kron(transpose(B), A) function _sprepost(A, B) # for any other input types - Id_cache = I(size(A, 1)) - return _spre(A, Id_cache) * _spost(B, Id_cache) + # TODO: use the commented code (since it is optimized for certain types of SciMLOperators, and was able to give correct results before `SciMLOperators v1.0.0`) + # Id_cache = I(size(A, 1)) + # return _spre(A, Id_cache) * _spost(B, Id_cache) + + return kron(transpose(B), A) end ## if input is AbstractSciMLOperator From e70c8ac91aefe0797f50aeefb30f76d464f4e006 Mon Sep 17 00:00:00 2001 From: Yi-Te Huang Date: Mon, 16 Jun 2025 22:34:25 +0800 Subject: [PATCH 06/14] try to use `IdentityOperator` --- src/qobj/superoperators.jl | 16 +++++++--------- test/core-test/quantum_objects_evo.jl | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/qobj/superoperators.jl b/src/qobj/superoperators.jl index c0ab35a1c..6e17c904a 100644 --- a/src/qobj/superoperators.jl +++ b/src/qobj/superoperators.jl @@ -14,13 +14,6 @@ _sprepost(A::AbstractMatrix, B::AbstractMatrix) = kron(transpose(sparse(B)), spa _sprepost(A::AbstractMatrix, B::AbstractSparseMatrix) = kron(transpose(B), sparse(A)) _sprepost(A::AbstractSparseMatrix, B::AbstractMatrix) = kron(transpose(sparse(B)), A) _sprepost(A::AbstractSparseMatrix, B::AbstractSparseMatrix) = kron(transpose(B), A) -function _sprepost(A, B) # for any other input types - # TODO: use the commented code (since it is optimized for certain types of SciMLOperators, and was able to give correct results before `SciMLOperators v1.0.0`) - # Id_cache = I(size(A, 1)) - # return _spre(A, Id_cache) * _spost(B, Id_cache) - - return kron(transpose(B), A) -end ## if input is AbstractSciMLOperator ## some of them are optimized to speed things up @@ -28,7 +21,7 @@ end _spre(A::MatrixOperator, Id::AbstractMatrix) = MatrixOperator(_spre(A.A, Id)) _spre(A::ScaledOperator, Id::AbstractMatrix) = ScaledOperator(A.λ, _spre(A.L, Id)) _spre(A::AddedOperator, Id::AbstractMatrix) = AddedOperator(map(op -> _spre(op, Id), A.ops)) -function _spre(A::AbstractSciMLOperator, Id::AbstractMatrix) +function _spre(A::AbstractSciMLOperator, Id::Union{AbstractMatrix,AbstractSciMLOperator}) _lazy_tensor_warning(Id, A) return kron(Id, A) end @@ -36,12 +29,17 @@ end _spost(B::MatrixOperator, Id::AbstractMatrix) = MatrixOperator(_spost(B.A, Id)) _spost(B::ScaledOperator, Id::AbstractMatrix) = ScaledOperator(B.λ, _spost(B.L, Id)) _spost(B::AddedOperator, Id::AbstractMatrix) = AddedOperator(map(op -> _spost(op, Id), B.ops)) -function _spost(B::AbstractSciMLOperator, Id::AbstractMatrix) +function _spost(B::AbstractSciMLOperator, Id::Union{AbstractMatrix,AbstractSciMLOperator}) B_T = transpose(B) _lazy_tensor_warning(B_T, Id) return kron(B_T, Id) end +function _sprepost(A::AbstractSciMLOperator, B::AbstractSciMLOperator) + Id_cache = IdentityOperator(size(A, 1)) + return _spre(A, Id_cache) * _spost(B, Id_cache) +end + ## intrinsic liouvillian _liouvillian(H::MT, Id::AbstractMatrix) where {MT<:Union{AbstractMatrix,AbstractSciMLOperator}} = -1im * (_spre(H, Id) - _spost(H, Id)) diff --git a/test/core-test/quantum_objects_evo.jl b/test/core-test/quantum_objects_evo.jl index a417f52ac..d726a3252 100644 --- a/test/core-test/quantum_objects_evo.jl +++ b/test/core-test/quantum_objects_evo.jl @@ -215,7 +215,7 @@ coef2(p, t) * conj(coef3(p, t)) * (spre(a) * spost(X') - 0.5 * spre(X' * a) - 0.5 * spost(X' * a)) + # cross terms conj(coef2(p, t)) * coef3(p, t) * (spre(X) * spost(a') - 0.5 * spre(a' * X) - 0.5 * spost(a' * X)) # cross terms L_ti = liouvillian(H_ti) + D1_ti + D2_ti - L_td = @test_logs (:warn,) (:warn,) liouvillian(H_td, c_ops) # warnings from lazy tensor in `lindblad_dissipator(c_op2)` + L_td = @test_logs (:warn,) (:warn,) (:warn,) (:warn,) liouvillian(H_td, c_ops) # warnings from lazy tensor in `lindblad_dissipator(c_op2)` ρvec = mat2vec(rand_dm(N)) @test L_td(p, t) ≈ L_ti @test iscached(L_td) == false From 4f4fc2be5b55d9d90214a1dccd72f9cc6e380843 Mon Sep 17 00:00:00 2001 From: Yi-Te Huang Date: Tue, 22 Jul 2025 22:53:04 +0800 Subject: [PATCH 07/14] fix `QobjEvo` in-place operator evaluation --- src/qobj/quantum_object_evo.jl | 6 +++++- src/qobj/superoperators.jl | 13 ++++++------- test/core-test/quantum_objects_evo.jl | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/qobj/quantum_object_evo.jl b/src/qobj/quantum_object_evo.jl index 26c20bd6e..237579c25 100644 --- a/src/qobj/quantum_object_evo.jl +++ b/src/qobj/quantum_object_evo.jl @@ -513,7 +513,11 @@ function (A::QuantumObjectEvolution)( end # We put `nothing` in the place of `u` because the time-dependence doesn't depend on the state - A.data(ψout.data, ψin.data, nothing, p, t) + ## TODO: should use SciMLOperators v1 API: A.data(ψout.data, ψin.data, nothing, p, t) + ## But somehow that doesn't work for some specific cases in our runtests. + ## Therefore, we use the most basic way to do it for now + update_coefficients!(A.data, nothing, p, t) + mul!(ψout.data, A.data, ψin.data) return ψout end diff --git a/src/qobj/superoperators.jl b/src/qobj/superoperators.jl index 6e17c904a..6bc9a71c3 100644 --- a/src/qobj/superoperators.jl +++ b/src/qobj/superoperators.jl @@ -14,6 +14,10 @@ _sprepost(A::AbstractMatrix, B::AbstractMatrix) = kron(transpose(sparse(B)), spa _sprepost(A::AbstractMatrix, B::AbstractSparseMatrix) = kron(transpose(B), sparse(A)) _sprepost(A::AbstractSparseMatrix, B::AbstractMatrix) = kron(transpose(sparse(B)), A) _sprepost(A::AbstractSparseMatrix, B::AbstractSparseMatrix) = kron(transpose(B), A) +function _sprepost(A, B) # for any other input types + Id_cache = I(size(A, 1)) + return _spre(A, Id_cache) * _spost(B, Id_cache) +end ## if input is AbstractSciMLOperator ## some of them are optimized to speed things up @@ -21,7 +25,7 @@ _sprepost(A::AbstractSparseMatrix, B::AbstractSparseMatrix) = kron(transpose(B), _spre(A::MatrixOperator, Id::AbstractMatrix) = MatrixOperator(_spre(A.A, Id)) _spre(A::ScaledOperator, Id::AbstractMatrix) = ScaledOperator(A.λ, _spre(A.L, Id)) _spre(A::AddedOperator, Id::AbstractMatrix) = AddedOperator(map(op -> _spre(op, Id), A.ops)) -function _spre(A::AbstractSciMLOperator, Id::Union{AbstractMatrix,AbstractSciMLOperator}) +function _spre(A::AbstractSciMLOperator, Id::AbstractMatrix) _lazy_tensor_warning(Id, A) return kron(Id, A) end @@ -29,17 +33,12 @@ end _spost(B::MatrixOperator, Id::AbstractMatrix) = MatrixOperator(_spost(B.A, Id)) _spost(B::ScaledOperator, Id::AbstractMatrix) = ScaledOperator(B.λ, _spost(B.L, Id)) _spost(B::AddedOperator, Id::AbstractMatrix) = AddedOperator(map(op -> _spost(op, Id), B.ops)) -function _spost(B::AbstractSciMLOperator, Id::Union{AbstractMatrix,AbstractSciMLOperator}) +function _spost(B::AbstractSciMLOperator, Id::AbstractMatrix) B_T = transpose(B) _lazy_tensor_warning(B_T, Id) return kron(B_T, Id) end -function _sprepost(A::AbstractSciMLOperator, B::AbstractSciMLOperator) - Id_cache = IdentityOperator(size(A, 1)) - return _spre(A, Id_cache) * _spost(B, Id_cache) -end - ## intrinsic liouvillian _liouvillian(H::MT, Id::AbstractMatrix) where {MT<:Union{AbstractMatrix,AbstractSciMLOperator}} = -1im * (_spre(H, Id) - _spost(H, Id)) diff --git a/test/core-test/quantum_objects_evo.jl b/test/core-test/quantum_objects_evo.jl index d726a3252..a417f52ac 100644 --- a/test/core-test/quantum_objects_evo.jl +++ b/test/core-test/quantum_objects_evo.jl @@ -215,7 +215,7 @@ coef2(p, t) * conj(coef3(p, t)) * (spre(a) * spost(X') - 0.5 * spre(X' * a) - 0.5 * spost(X' * a)) + # cross terms conj(coef2(p, t)) * coef3(p, t) * (spre(X) * spost(a') - 0.5 * spre(a' * X) - 0.5 * spost(a' * X)) # cross terms L_ti = liouvillian(H_ti) + D1_ti + D2_ti - L_td = @test_logs (:warn,) (:warn,) (:warn,) (:warn,) liouvillian(H_td, c_ops) # warnings from lazy tensor in `lindblad_dissipator(c_op2)` + L_td = @test_logs (:warn,) (:warn,) liouvillian(H_td, c_ops) # warnings from lazy tensor in `lindblad_dissipator(c_op2)` ρvec = mat2vec(rand_dm(N)) @test L_td(p, t) ≈ L_ti @test iscached(L_td) == false From 95e45d83ef652514e125d7203f00f27255d9be6a Mon Sep 17 00:00:00 2001 From: Yi-Te Huang Date: Tue, 22 Jul 2025 22:58:24 +0800 Subject: [PATCH 08/14] bump version to `0.33.1` --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 52ad06a5a..eb5de7954 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "QuantumToolbox" uuid = "6c2fb7c5-b903-41d2-bc5e-5a7c320b9fab" authors = ["Alberto Mercurio", "Yi-Te Huang"] -version = "0.33.0" +version = "0.33.1" [deps] ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" From 2edaca6f574b99111b85cf982a957c4994649f0a Mon Sep 17 00:00:00 2001 From: Yi-Te Huang Date: Tue, 22 Jul 2025 22:58:32 +0800 Subject: [PATCH 09/14] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71fe85710..153eb036f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://github.com/qutip/QuantumToolbox.jl/tree/main) - Improve efficiency of `bloch_redfield_tensor` by avoiding unnecessary conversions. ([#509]) +- Support `SciMLOperators v1.4+`. ([#470]) ## [v0.33.0] Release date: 2025-07-22 @@ -255,6 +256,7 @@ Release date: 2024-11-13 [#455]: https://github.com/qutip/QuantumToolbox.jl/issues/455 [#456]: https://github.com/qutip/QuantumToolbox.jl/issues/456 [#460]: https://github.com/qutip/QuantumToolbox.jl/issues/460 +[#470]: https://github.com/qutip/QuantumToolbox.jl/issues/470 [#472]: https://github.com/qutip/QuantumToolbox.jl/issues/472 [#473]: https://github.com/qutip/QuantumToolbox.jl/issues/473 [#476]: https://github.com/qutip/QuantumToolbox.jl/issues/476 From 766123c661e7139a4c6bb890b4e7502b00a6fecc Mon Sep 17 00:00:00 2001 From: Alberto Mercurio Date: Wed, 23 Jul 2025 23:32:32 -0400 Subject: [PATCH 10/14] Minor fixes --- Project.toml | 4 ++-- src/qobj/quantum_object_evo.jl | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Project.toml b/Project.toml index eb5de7954..821d18faa 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "QuantumToolbox" uuid = "6c2fb7c5-b903-41d2-bc5e-5a7c320b9fab" authors = ["Alberto Mercurio", "Yi-Te Huang"] -version = "0.33.1" +version = "0.33.0" [deps] ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" @@ -61,7 +61,7 @@ OrdinaryDiffEqTsit5 = "1" Pkg = "1" Random = "1" SciMLBase = "2" -SciMLOperators = "1" +SciMLOperators = "0.3, 0.4, 1" SparseArrays = "1" SpecialFunctions = "2" StaticArraysCore = "1" diff --git a/src/qobj/quantum_object_evo.jl b/src/qobj/quantum_object_evo.jl index 237579c25..b7a165b4f 100644 --- a/src/qobj/quantum_object_evo.jl +++ b/src/qobj/quantum_object_evo.jl @@ -512,12 +512,7 @@ function (A::QuantumObjectEvolution)( ) end - # We put `nothing` in the place of `u` because the time-dependence doesn't depend on the state - ## TODO: should use SciMLOperators v1 API: A.data(ψout.data, ψin.data, nothing, p, t) - ## But somehow that doesn't work for some specific cases in our runtests. - ## Therefore, we use the most basic way to do it for now - update_coefficients!(A.data, nothing, p, t) - mul!(ψout.data, A.data, ψin.data) + A.data(ψout.data, ψin.data, nothing, p, t) return ψout end From de6e60eb402f271ae7e1047355e21be676be54cc Mon Sep 17 00:00:00 2001 From: Alberto Mercurio Date: Thu, 24 Jul 2025 10:03:54 -0400 Subject: [PATCH 11/14] Fix errors on SDEProblems --- Project.toml | 2 +- src/QuantumToolbox.jl | 1 + src/time_evolution/time_evolution.jl | 34 ++++++++++++++-------------- test/core-test/time_evolution.jl | 1 - 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Project.toml b/Project.toml index 821d18faa..52ad06a5a 100644 --- a/Project.toml +++ b/Project.toml @@ -61,7 +61,7 @@ OrdinaryDiffEqTsit5 = "1" Pkg = "1" Random = "1" SciMLBase = "2" -SciMLOperators = "0.3, 0.4, 1" +SciMLOperators = "1" SparseArrays = "1" SpecialFunctions = "2" StaticArraysCore = "1" diff --git a/src/QuantumToolbox.jl b/src/QuantumToolbox.jl index a4d0b7841..afdbad0ed 100644 --- a/src/QuantumToolbox.jl +++ b/src/QuantumToolbox.jl @@ -16,6 +16,7 @@ import SciMLBase: u_modified!, NullParameters, ODEFunction, + SDEFunction, ODEProblem, SDEProblem, EnsembleProblem, diff --git a/src/time_evolution/time_evolution.jl b/src/time_evolution/time_evolution.jl index bfdd6942b..63c382b69 100644 --- a/src/time_evolution/time_evolution.jl +++ b/src/time_evolution/time_evolution.jl @@ -395,7 +395,7 @@ end A struct to represent the diffusion operator. This is used to perform the diffusion process on N different Wiener processes. =# -struct DiffusionOperator{T,OpType<:Tuple{Vararg{AbstractSciMLOperator}}} <: AbstractSciMLOperator{T} +struct DiffusionOperator{T,OpType<:Tuple{Vararg{AbstractSciMLOperator}}} ops::OpType function DiffusionOperator(ops::OpType) where {OpType} T = mapreduce(eltype, promote_type, ops) @@ -403,29 +403,29 @@ struct DiffusionOperator{T,OpType<:Tuple{Vararg{AbstractSciMLOperator}}} <: Abst end end -@generated function update_coefficients!(L::DiffusionOperator, u, p, t) +@generated function (L::DiffusionOperator)(w, v, p, t) ops_types = L.parameters[2].parameters N = length(ops_types) - return quote + quote + M = length(v) + S = (size(w, 1), size(w, 2)) # This supports also `w` as a `Vector` + (S[1] == M && S[2] == $N) || throw(DimensionMismatch("The size of the output vector is incorrect.")) Base.@nexprs $N i -> begin - update_coefficients!(L.ops[i], u, p, t) + # update_coefficients!(L.ops[i], v, p, t) + # mul!(@view(w[:, i]), L.ops[i], v) + op = L.ops[i] + op(@view(w[:, i]), v, v, p, t) end - - nothing + return w end end -@generated function LinearAlgebra.mul!(v::AbstractVecOrMat, L::DiffusionOperator, u::AbstractVecOrMat) - ops_types = L.parameters[2].parameters - N = length(ops_types) - quote - M = length(u) - S = (size(v, 1), size(v, 2)) # This supports also `v` as a `Vector` - (S[1] == M && S[2] == $N) || throw(DimensionMismatch("The size of the output vector is incorrect.")) - Base.@nexprs $N i -> begin - mul!(@view(v[:, i]), L.ops[i], u) - end - return v +#TODO: Remove when https://github.com/SciML/StochasticDiffEq.jl/issues/615 is fixed. +function (f::SDEFunction)(du, u, p, t) + if f.f isa AbstractSciMLOperator + f.f(du, u, u, p, t) + else + f.f(du, u, p, t) end end diff --git a/test/core-test/time_evolution.jl b/test/core-test/time_evolution.jl index e17db89c2..99bbb198c 100644 --- a/test/core-test/time_evolution.jl +++ b/test/core-test/time_evolution.jl @@ -484,7 +484,6 @@ end H = TESetup.H ψ0 = TESetup.ψ0 tlist = TESetup.tlist - c_ops = TESetup.c_ops c_ops_sme = TESetup.c_ops_sme sc_ops_sme = TESetup.sc_ops_sme c_ops_sme2 = TESetup.c_ops_sme2 From 2bd71509e3b5296a67f41676b18f697f68d7e8ad Mon Sep 17 00:00:00 2001 From: Alberto Mercurio Date: Fri, 25 Jul 2025 08:16:57 -0400 Subject: [PATCH 12/14] Set minimum version of SciMLOperators.jl to 1.4 --- Project.toml | 2 +- src/time_evolution/time_evolution.jl | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index 52ad06a5a..f2f7a6a0f 100644 --- a/Project.toml +++ b/Project.toml @@ -61,7 +61,7 @@ OrdinaryDiffEqTsit5 = "1" Pkg = "1" Random = "1" SciMLBase = "2" -SciMLOperators = "1" +SciMLOperators = "1.4" SparseArrays = "1" SpecialFunctions = "2" StaticArraysCore = "1" diff --git a/src/time_evolution/time_evolution.jl b/src/time_evolution/time_evolution.jl index 63c382b69..2e4a815f6 100644 --- a/src/time_evolution/time_evolution.jl +++ b/src/time_evolution/time_evolution.jl @@ -411,8 +411,6 @@ end S = (size(w, 1), size(w, 2)) # This supports also `w` as a `Vector` (S[1] == M && S[2] == $N) || throw(DimensionMismatch("The size of the output vector is incorrect.")) Base.@nexprs $N i -> begin - # update_coefficients!(L.ops[i], v, p, t) - # mul!(@view(w[:, i]), L.ops[i], v) op = L.ops[i] op(@view(w[:, i]), v, v, p, t) end @@ -420,7 +418,7 @@ end end end -#TODO: Remove when https://github.com/SciML/StochasticDiffEq.jl/issues/615 is fixed. +#TODO: Remove when a new release of SciMLBase.jl >2.104.0 is available function (f::SDEFunction)(du, u, p, t) if f.f isa AbstractSciMLOperator f.f(du, u, u, p, t) From ce812b1a24d303eea7100ef2dad3ceb67618b1c6 Mon Sep 17 00:00:00 2001 From: Alberto Mercurio Date: Fri, 25 Jul 2025 09:21:45 -0400 Subject: [PATCH 13/14] Format code --- src/time_evolution/time_evolution.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/time_evolution/time_evolution.jl b/src/time_evolution/time_evolution.jl index 2e4a815f6..aa68cfc00 100644 --- a/src/time_evolution/time_evolution.jl +++ b/src/time_evolution/time_evolution.jl @@ -419,13 +419,12 @@ end end #TODO: Remove when a new release of SciMLBase.jl >2.104.0 is available -function (f::SDEFunction)(du, u, p, t) +(f::SDEFunction)(du, u, p, t) = if f.f isa AbstractSciMLOperator f.f(du, u, u, p, t) else f.f(du, u, p, t) end -end ####################################### From 455b24d5168e072376f1a14e1980af0d5fd1996f Mon Sep 17 00:00:00 2001 From: Alberto Mercurio Date: Fri, 25 Jul 2025 09:55:02 -0400 Subject: [PATCH 14/14] Remove Makie 0.24 from compat --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index f2f7a6a0f..b93326f38 100644 --- a/Project.toml +++ b/Project.toml @@ -55,7 +55,7 @@ KernelAbstractions = "0.9.2" LaTeXStrings = "1.2" LinearAlgebra = "1" LinearSolve = "2, 3" -Makie = "0.20, 0.21, 0.22, 0.23, 0.24" +Makie = "0.20, 0.21, 0.22, 0.23" OrdinaryDiffEqCore = "1" OrdinaryDiffEqTsit5 = "1" Pkg = "1"