Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed Adjoint
  • Loading branch information
BBhattacharyya1729 committed Mar 22, 2025
commit 5d46bcb5afbfe647e7337a3039306307182d68b1
8 changes: 8 additions & 0 deletions src/quantum_systems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,14 @@ struct ParameterizedQuantumSystem <: AbstractQuantumSystem
params
)
end


function ParameterizedQuantumSystem(H_drives::Vector{<:AbstractMatrix{ℂ}},Hₐ_drives::Vector{<:AbstractMatrix{ℂ}}; kwargs...) where ℂ <: Number
@assert !isempty(H_drives) "At least one drive is required"
@assert length(Hₐ_drives) == length(H_drives) "Size has to be the same"
return ParameterizedQuantumSystem(spzeros(ℂ, size(H_drives[1])), H_drives, Hₐ_drives; kwargs...)
end

end

#***********************************************************************************************#
Expand Down