-
Notifications
You must be signed in to change notification settings - Fork 15
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
Introduce show
for TimeEvolutionSol
and TimeEvolutionMCSol
, also, adjust return states
and expect
from sesolve
, mesolve
, and mcsolve
#166
Conversation
show
for TimeEvolutionSol
and adjust return states
and expect
from sesolver
and mesolve
show
for TimeEvolutionSol
and adjust return states
and expect
from sesolve
and mesolve
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #166 +/- ##
==========================================
+ Coverage 93.10% 93.22% +0.11%
==========================================
Files 28 28
Lines 2017 2051 +34
==========================================
+ Hits 1878 1912 +34
Misses 139 139 ☔ View full report in Codecov by Sentry. |
Ok, yes. It makes sense that, when |
Does it also work for |
The default of sol = mesolve(H, ψ0, tlist, c_ops, e_ops = e_ops, saveat = tlist) Yes, I understand that we should avoid But I think no one will do this if we don't talk about it lol. |
show
for TimeEvolutionSol
and adjust return states
and expect
from sesolve
and mesolve
show
for TimeEvolutionSol
and TimeEvolutionMCSol
, also, adjust return states
and expect
from sesolve
, mesolve
, and mcsolve
some outputs of (again, take Brief example in README as demonstration): (without specifying sol = mcsolve(H, ψ0, tlist, c_ops, n_traj = 2)
(specify sol = mcsolve(H, ψ0, tlist, c_ops, n_traj = 2, e_ops = e_ops)
(specify both sol = mcsolve(H, ψ0, tlist, c_ops, n_traj = 2, e_ops = e_ops, saveat = tlist)
|
I've added the handling for unsupported keyword argument |
close #143
Summary of this PR:
@doc raw
, LaTeX formula, and some minor changes)show
forTimeEvolutionSol
andTimeEvolutionMCSol
: take the brief example in README, here is the output if weshow
(orprint
)sol
directly:sesolve
,mesolve
, andmcsolve
For the current implementation, the users will only get a final state if they doesn't specify
e_ops
, which cause some ambiguity about the argumentt_l
. In this PR, theexpect
will be decide by the argumente_ops
, and thestates
will be decide by the argumentsaveat
:e_ops
:saveat = [t_l[end]]
, thus, return expectation values and the final state (which is same as current implementation)e_ops
:saveat = t_l
, thus, return all the states corresponding tot_l
e_ops
andsaveat
at the same time:expect
will depend one_ops
, andstates
will depend onsaveat
.Again, take the brief example in README:
if user doesn't specify
e_ops
:if user specifies both
e_ops
andsaveat
: