-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time dependent TDVP #52
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #52 +/- ##
==========================================
- Coverage 84.72% 82.35% -2.38%
==========================================
Files 61 67 +6
Lines 3784 3989 +205
==========================================
+ Hits 3206 3285 +79
- Misses 578 704 +126 ☔ View full report in Codecov by Sentry. |
In principle we should add some tests that cover the new functionality (and maybe explore interplay with blockade.jl) - but I don't particularly mind merging already and sorting that out later? @DaanMaertens @lkdvos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had some general comments, but in principle I am okay with merging this
This reverts commit d3feb92.
we probably do not want the left and right infinite parts to refer to each other, or to refer to another infinitemps, hence the copies.
I agree with that the syntax of |
src/operators/multipliedoperator.jl
Outdated
@@ -23,6 +23,8 @@ const TimedOperator{O} = MultipliedOperator{O,<:Function} | |||
const UntimedOperator{O} = MultipliedOperator{O,<:Union{Real,Nothing}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This honestly seems to be getting a bit out of hand, a MultipliedOperator{O,<:Nothing}
should probably never exist, and just be a O
, thus alleviating the need of the const TimedUnion
, which is a also not a great name for timed + untimed operators, which are just any MultipliedOperators
... If nothing else, you could create a trivially multiplied operator by using the hard One()
from VectorInterface, which should in principle not actually execute multiplications?
src/operators/sumofoperators.jl
Outdated
(x::SumOfOperators{UntimedOperator})() = sum(ConvertOperator,x) | ||
Base.sum(x::SumOfOperators{UntimedOperator}) = x() | ||
Base.sum(x::SumOfOperators{TimedUnion},t::Number) = sum(y->ConvertOperator(y,t),x) | ||
Base.sum(x::SumOfOperators{TimedUnion}) = throw(MethodError(sum,(x,))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also a bit weird, calling sum
on this, I would expect it to explicitly carry out the sum, and return a single operator. Throwing a method error as an overload for a base also prevents anyone from overloading Base.sum
for SumOfOperators
, which might not be something to enforce
A TDVP implementation for time dependent Hamiltonians (see file in examples).