Skip to content
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

v0.6 #3

Merged
merged 14 commits into from
Apr 18, 2021
Merged

v0.6 #3

merged 14 commits into from
Apr 18, 2021

Conversation

fmeirinhos
Copy link
Collaborator

@fmeirinhos fmeirinhos commented Apr 14, 2021

There are a couple of key goals for this version:

- [ ] Reformulate the VCABM functions to operate in-place in the Green functions (see branch v0.5 ideas)
- [ ] Remove the dependency on RecursiveArrayTools

  • Have GreenFunction be a subtype of AbstractArray and ultimately create the appropriate broadcasting rules (namely copy!)
  • Update the test suite
  • Remove the notebooks from the repo (will later be reinstated but this will help us achieve 100% Julia purity)

GreenFunction is now a subtype of AbstractArray. The Base broadcasting machinery appears to have been updated and now proper broadcasting (with custom setindex!es ) simply works off the self
@fmeirinhos
Copy link
Collaborator Author

Would it make sense to completely get rid of GreenFunction objects and substitute them for, e.g., SkewHermitian data structures (for Greater / Lesser) or Symmetric data structures (for Classical)?
These data structures would be what implements the "special indexing" or, if wanted, optimised data storage (see current SkewHermitianArray).

That would mean that then a GreenFunction would be a "higher-order" object, that uses these data structures to access correctly the data but then could also have more traits such as the underlying time-grid, quantum number information, etc.

@fmeirinhos
Copy link
Collaborator Author

It's very strange that the solver doesn't achieve the precision levels we want ever for a very simple "integrable" model.
extend_cache must be reviewed (for the millionth time).

Also: why manually running the tests works but through the package manager it throws some weird errors?

@fmeirinhos
Copy link
Collaborator Author

It's very strange that the solver doesn't achieve the precision levels we want ever for a very simple "integrable" model.
extend_cache must be reviewed (for the millionth time).

Also: why manually running the tests works but through the package manager it throws some weird errors?

It appears the problem was in the test suite 😄

@fmeirinhos
Copy link
Collaborator Author

To be able to remove both the dependancy on RecursiveArrayTools and do VCABM in-place, we would need to use an unzip function (possibly on Julia 1.7 - JuliaLang/julia#33515) or completely change the way the user supplies the vector functions f_vert and f_diag. The latter is undesirable since the current f_vert and f_diag are what makes sense from a mathematical POV.

Given that the solver is essentially a 1-time ODE stepper that each step calculates
rhs := [f_vert(t_1, t_N); f_vert(t_2, t_N); ...; f_vert(t_N, t_N); f_diag(t_N, t_N)]

unzip would basically allows us to work with the transpose of this nested-array
rhs := [[f_vert(t_1, t_N)[1], f_vert(t_2, t_N)[1], ...], [f_vert(t_1, t_N)[2], f_vert(t_2, t_N)[2], ...], ...]

This rhs form is what needed to operate in-place
u[1](t_N + dt) = u[1](t_N) + dt * rhs[1]
u[2](t_N + dt) = u[2](t_N) + dt * rhs[2]
...

This hopefully would make the solver even more general (notation-wise) but, who knows, possibly even faster due to more in-place operations.

@fmeirinhos fmeirinhos merged commit a5239b2 into master Apr 18, 2021
fmeirinhos added a commit that referenced this pull request Apr 18, 2021
This reverts commit a5239b2.
@fmeirinhos fmeirinhos deleted the v0.6 branch May 25, 2021 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant