Skip to content

Commit 1afa886

Browse files
committed
update docstring
1 parent 6c6f8df commit 1afa886

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/algorithms/toolbox.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
entropy(state, [site::Int])
33
4-
Calculate the Von Neumann entanglement entropy of a given MPS. If an integer `site` is
4+
Calculate the von Neumann entanglement entropy of a given MPS. If an integer `site` is
55
given, the entropy is across the entanglement cut to the right of site `site`. Otherwise, a
66
vector of entropies is returned, one for each site.
77
"""
@@ -85,7 +85,7 @@ overlap of a given `above` state and a `below` state. The `sector` keyword argum
8585
used to specify a non-trivial total charge for the transfer matrix eigenvectors.
8686
Specifically, an auxiliary space `ℂ[typeof(sector)](sector => 1)'` will be added to the
8787
domain of each eigenvector. The `tol` and `num_vals` keyword arguments are passed to
88-
`KrylovKit.eigolve`
88+
`KrylovKit.eigsolve`
8989
"""
9090
function transfer_spectrum(
9191
above::InfiniteMPS; below = above, tol = Defaults.tol, num_vals = 20,
@@ -110,15 +110,16 @@ function transfer_spectrum(
110110
end
111111

112112
"""
113-
entanglement_spectrum(ψ, site::Int) -> SectorDict{sectortype(ψ),Vector{<:Real}}
113+
entanglement_spectrum(ψ, site::Int) -> SectorVector{T, sectortype(ψ), AbstractVector{T}}
114114
115115
Compute the entanglement spectrum at a given site, i.e. the singular values of the gauge
116-
matrix to the right of a given site. This is a dictionary mapping the charge to the singular
117-
values.
116+
matrix to the right of a given site. This is a vector containing the singular
117+
values. The contributions from specific sectors can be viewed by indexing accordingly, i.e.
118+
`entanglement_spectrum(ψ, site)[sector]`.
118119
119120
For `InfiniteMPS` and `WindowMPS` the default value for `site` is 0.
120121
121-
For `FiniteMPS` no default value for `site` is given, it is up to the user to specify.
122+
For `FiniteMPS` no default value for `site` is given; it is up to the user to specify.
122123
"""
123124
function entanglement_spectrum(st::Union{InfiniteMPS, WindowMPS}, site::Int = 0)
124125
checkbounds(st, site)

0 commit comments

Comments
 (0)