From 0ad65a74e4d6b9ecb25572f07c5d1fbc3e1e6bb0 Mon Sep 17 00:00:00 2001 From: Orjan Ameye Date: Thu, 23 Jul 2026 18:53:46 +0200 Subject: [PATCH 1/3] fix: make SLH scattering field concretely typed SMatrix carries a hidden length parameter L, so declaring the field as SMatrix{N,N,ST} left L free and rendered the field abstract. Add L to the struct and an inner constructor that infers it, preserving the existing SLH{N,ST,LT,HT}(...) calling convention. --- src/SLH.jl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/SLH.jl b/src/SLH.jl index 210c4fd..c5b4e77 100644 --- a/src/SLH.jl +++ b/src/SLH.jl @@ -95,10 +95,15 @@ SLH triple with scattering matrix `S`, Lindblad vector `L`, and Hamiltonian `H`. See also [`▷`](@ref), [`⊞`](@ref), [`feedback`](@ref) """ -struct SLH{N,ST,LT,HT} - scattering::SMatrix{N,N,ST} +struct SLH{N,ST,LT,HT,L} + scattering::SMatrix{N,N,ST,L} lindblad::SVector{N,LT} hamiltonian::HT + function SLH{N,ST,LT,HT}( + S::SMatrix{N,N,ST,L}, lindblad::SVector{N,LT}, H::HT + ) where {N,ST,LT,HT,L} + return new{N,ST,LT,HT,L}(S, lindblad, H) + end end """ From 5b01bb54d429964c6aefc4f1d07e7a7d543b3f3e Mon Sep 17 00:00:00 2001 From: Orjan Ameye Date: Thu, 23 Jul 2026 18:54:29 +0200 Subject: [PATCH 2/3] bump to 0.4.1 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 8bb11f2..7f35f22 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "QuantumInputOutput" uuid = "18f9eda6-924c-47c7-a881-996695cfd7c6" -version = "0.4.0" +version = "0.4.1" [deps] DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0" From 7bdde5fb540c21af3441f25cd3cbb968e8318b92 Mon Sep 17 00:00:00 2001 From: Orjan Ameye Date: Thu, 23 Jul 2026 21:08:25 +0200 Subject: [PATCH 3/3] format --- src/SLH.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SLH.jl b/src/SLH.jl index c5b4e77..34bc2d0 100644 --- a/src/SLH.jl +++ b/src/SLH.jl @@ -100,7 +100,9 @@ struct SLH{N,ST,LT,HT,L} lindblad::SVector{N,LT} hamiltonian::HT function SLH{N,ST,LT,HT}( - S::SMatrix{N,N,ST,L}, lindblad::SVector{N,LT}, H::HT + S::SMatrix{N,N,ST,L}, + lindblad::SVector{N,LT}, + H::HT, ) where {N,ST,LT,HT,L} return new{N,ST,LT,HT,L}(S, lindblad, H) end