Skip to content

Commit

Permalink
Add/expand docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
leburgel committed Jan 21, 2025
1 parent 68f72b4 commit 3a1534f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
10 changes: 9 additions & 1 deletion src/algorithms/ED.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
"""
Use krylovkit to perform exact diagonalization
exact_diagonalization(opp::FiniteMPOHamiltonian;
sector=first(sectors(oneunit(physicalspace(opp, 1)))),
len::Int=length(opp), num::Int=1, which::Symbol=:SR,
alg=Defaults.alg_eigsolve(; dynamic_tols=false))
-> vals, state_vecs, convhist
Use [`KrylovKit.eigsolve`](@extref) to perform exact diagonalization on a
`FiniteMPOHamiltonian` to find its eigenvectors as `FiniteMPS` of maximal rank, essentially
equivalent to dense eigenvectors.
"""
function exact_diagonalization(opp::FiniteMPOHamiltonian;
sector=first(sectors(oneunit(physicalspace(opp, 1)))),
Expand Down
17 changes: 14 additions & 3 deletions src/algorithms/fidelity_susceptibility.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
#=
I don't know if I should rescale by system size / unit cell
=#
"""
fidelity_susceptibility(state::Union{FiniteMPS,InfiniteMPS}, H₀::T,
Vs::AbstractVector{T}, [henvs=environments(state, H₀)];
maxiter=Defaults.maxiter,
tol=Defaults.tol) where {T<:MPOHamiltonian}
Computes the fidelity susceptibility of a the ground state `state` of a base Hamiltonian
`H₀` with respect to a set of perturbing Hamiltonians `Vs`. Each of the perturbing
Hamiltonians can be interpreted as corresponding to a tuning parameter ``aᵢ`` in a 'total'
Hamiltonian ``H = H₀ + ∑ᵢ aᵢ Vᵢ``.
Returns a matrix containing the overlaps of the elementary excitations on top of `state`
corresponding to each of the perturbing Hamiltonians.
"""
function fidelity_susceptibility(state::Union{FiniteMPS,InfiniteMPS}, H₀::T,
Vs::AbstractVector{T}, henvs=environments(state, H₀);
maxiter=Defaults.maxiter,
Expand Down

0 comments on commit 3a1534f

Please sign in to comment.