Skip to content

Commit 341000a

Browse files
committed
add warning message in module initialization
1 parent 9b3efc3 commit 341000a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/QuantumToolbox.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,13 @@ include("visualization.jl")
134134
# deprecated functions
135135
include("deprecated.jl")
136136

137+
# module initialization
138+
function __init__()
139+
# this will be called immediately after the module is loaded (e.g., by import or using) at runtime for the first time.
140+
# useful for announcement
141+
@warn "The definition of `liouvillian` L for a given Hamiltonian H is changed to L[⋅] = -i( H[⋅] - [⋅]H' ), with ' representing complex conjugation. " *
142+
"QuantumToolbox.jl no longer expects H to be Hermitian."
143+
return nothing
144+
end
145+
137146
end

0 commit comments

Comments
 (0)