Maybe `time_dep_op(t)` should not mutate
Closed this issue · 0 comments
amilsted commented
For time-dependent operators we have set_time!(op, t)
to set clocks in place (and return the updated operator).
Currently op(t)
is equivalent to set_time!(op, t)
, which could easily be a bit unexpected. For example op(0.0) == op(1.0)
will return true always, since the LHS and RHS are refer to the same struct.
Instead, consider having op(t)
return a copy (and make sure we are using set_time!
in time evolution code.