-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/ExtendedHubbardMom1D #286
Conversation
- New model (i.e. ``ExtendedHubbardMom1D`` is added to Rimu
- ``extended_momentum_transfer_diagonal`` is added for the nearest neighbour term in ``ExtendedHubbardMom1D``
- ``ExtendedHubbardMom1D`` is added to all the necessary test sets.
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
Architecture: x86_64
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
Architecture: x86_64
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
Architecture: x86_64
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
Architecture: x86_64
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
Architecture: x86_64
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
Architecture: x86_64 |
Pull Request Test Coverage Report for Build 11536999229Details
💛 - Coveralls |
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.
Looks very good already.
I've mostly got a few pedantic niggles.
Can we make this work with OccupationNumberFS
? It's not a top priority, but it also shouldn't be hard to do, as HubbardMom1D
already works with this address type.
julia> oaddr = OccupationNumberFS(1,2,0,0)
OccupationNumberFS{4, UInt8}(1, 2, 0, 0)
julia> sparse(HubbardMom1D(oaddr))
5×5 SparseArrays.SparseMatrixCSC{Float64, Int64} with 21 stored entries:
-2.75 0.707107 0.5 0.25 ⋅
0.707107 1.5 0.353553 0.707107 0.612372
0.5 0.353553 1.25 0.5 0.433013
0.25 0.707107 0.5 5.25 ⋅
⋅ 0.612372 0.433013 ⋅ 0.75
julia> sparse(ExtendedHubbardMom1D(oaddr))
ERROR: MethodError: no method matching momentum_transfer_diagonal(::ExtendedHubbardMom1D{…}, ::OccupiedModeMap{…})
function momentum_transfer_excitation(add::FermiFS, chosen::Integer, map; fold=true) | ||
return add, 0.0, 0, 0, 0 | ||
end | ||
|
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.
Why was this function removed?
src/Hamiltonians/excitations.jl
Outdated
""" | ||
extended_momentum_transfer_diagonal(map, M) | ||
|
||
The diagonal part of nearest neighbour [`momentum_transfer_excitation`](@ref). | ||
""" | ||
|
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.
Please remove the empty line 144! Otherwise the docstring won't be found.
It would also be nice to have a bit more verbose explanation of what the arguments mean and what is returned.
function offdiagonals(h::ExtendedHubbardMom1D, a::SingleComponentFockAddress) | ||
map = OccupiedModeMap(a) | ||
singlies = length(map) | ||
doublies = count(i -> i.occnum ≥ 2, map) | ||
num = num_offdiagonals(h, a, singlies, doublies) | ||
return OffdiagonalsBoseMom1D(h, a, num, map) | ||
end |
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.
Hmm, this looks a bit like unnecessary duplication as it is identical to the code for HubbardMom1D
and could be eliminated by changing the dispatch rules for the latter. Maybe it is still valuable (for readability) to have the code here?
We should also think about whether it makes sense to only have HubbardMom1D
, where the extended version is chosen if v != 0
.
Co-authored-by: Joachim Brand <joachim.brand@gmail.com>
Co-authored-by: Joachim Brand <joachim.brand@gmail.com>
Co-authored-by: Joachim Brand <joachim.brand@gmail.com>
Co-authored-by: Joachim Brand <joachim.brand@gmail.com>
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.
Some formatting suggestions. Apart from that and some more tests, it looks good!
- Added test for comparison between energies of ``ExtendedHubbardMom1D`` and ``ExtendedHubbardReal1D``
Co-authored-by: mtsch <matijacufar@gmail.com>
Co-authored-by: mtsch <matijacufar@gmail.com>
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.
Only a minor rewording suggestion for a docstring. Otherwise this looks good 😄
Co-authored-by: Joachim Brand <joachim.brand@gmail.com>
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.
Thanks! It looks good now.
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.
Looks good to me!
ExtendedHubbardMom1D
ExtendedHubbardMom1D
) is added to the Rimu.HubbardMom1D
in Rimu.theta
-twisted boundary condition inspired by the "ExtendedHubbardReal1D".