Skip to content

Commit

Permalink
Remove mentions of OperatorMulPropagator
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsch committed Jul 30, 2023
1 parent bc73b1d commit 713c8e6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/DictVectors/DictVectors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,5 @@ include("initiatordvec.jl")

include("pdvec.jl")
include("pdworkingmemory.jl")
#include("propagators.jl")

end # module
15 changes: 5 additions & 10 deletions src/DictVectors/pdvec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,10 @@ use [`localpart`](@ref) when explicit iteration is required.
## Use with KrylovKit
`PDVec` can be used with [KrylovKit.jl](https://github.com/Jutho/KrylovKit.jl) to find
the eigenpairs of an operator in a matrix-free manner. For best performance, wrap the
operator in `DictVectors.OperatorMulPropagator` first (see example below).
Performing the `eigsolve` this way allow it to be run in a threaded and distributed manner.
Using multiple MPI ranks with this method does not distribute the memory load effectively,
but does result in significant speedups.
`PDVec` is compatible with `eigsolve` from
[KrylovKit.jl](https://github.com/Jutho/KrylovKit.jl). When used, the diagonalisation is
performed in a threaded and distributed manner. Using multiple MPI ranks with this method
does not distribute the memory load effectively, but does result in significant speedups.
### Example
Expand All @@ -132,9 +129,7 @@ julia> op = HubbardMom1D(add; u=6.0);
julia> pv = PDVec(add => 1.0);
julia> propagator = DictVectors.OperatorMulPropagator(op, pv);
julia> results = eigsolve(propagator, pv, 4, :SR; issymmetric=true);
julia> results = eigsolve(op, pv, 4, :SR);
julia> results[1][1:4]
4-element Vector{Float64}:
Expand Down
10 changes: 3 additions & 7 deletions test/mpi_runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,12 @@ end
dv = DVec(add => 1.0)
pv = PDVec(add => 1.0)

res_dv = eigsolve(ham, dv, 1, :SR; issymmetric=true)
res_pv = eigsolve(ham, pv, 1, :SR; issymmetric=true)

prop = Rimu.DictVectors.OperatorMulPropagator(ham, pv)
res_prop = eigsolve(prop, pv, 1, :SR; issymmetric=true)
res_dv = eigsolve(ham, dv, 1, :SR)
res_pv = eigsolve(ham, pv, 1, :SR)

@test res_dv[1][1] res_pv[1][1]
@test res_dv[1][1] res_prop[1][1]

dv = res_dv[2][1]
dv = copy(res_dv[2][1])
pv = copy(res_pv[2][1])
@test norm(pv) 1
@test length(pv) == length(dv)
Expand Down

0 comments on commit 713c8e6

Please sign in to comment.