Skip to content

Commit d7ec075

Browse files
committed
Expand exact_diagonalization and FiniteMPS docstrings
1 parent 750ec89 commit d7ec075

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

src/algorithms/ED.jl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@
88
Use [`KrylovKit.eigsolve`](@extref) to perform exact diagonalization on a
99
`FiniteMPOHamiltonian` to find its eigenvectors as `FiniteMPS` of maximal rank, essentially
1010
equivalent to dense eigenvectors.
11+
12+
### Arguments
13+
- `opp::FiniteMPOHamiltonian`: the Hamiltonian to diagonalize.
14+
15+
### Keyword arguments
16+
- `sector=first(sectors(oneunit(physicalspace(opp, 1))))`: the total charge of the
17+
eigenvectors, which is chosen trivial by default.
18+
- `len::Int=length(opp)`: the length of the system.
19+
- `num::Int=1`: the number of eigenvectors to find.
20+
- `which::Symbol=:SR`: the kind eigenvalues to find, see [`KrylovKit.eigsolve`](@extref).
21+
- `alg=Defaults.alg_eigsolve(; dynamic_tols=false)`: the diagonalization algorithm to use,
22+
see [`KrylovKit.eigsolve`](@extref).
23+
24+
!!! note "Valid `sector` values"
25+
The total charge of the eigenvectors is imposed by adding a charged auxiliary space as
26+
the leftmost virtualspace of each eigenvector. Specifically, this is achieved by passing
27+
`left=Vect[typeof(sector)](sector => 1)` to the [`FiniteMPS`](@ref) constructor. As
28+
such, the only valid `sector` values (i.e. a `sector` value for which the corresponding
29+
eigenstate has valid fusion channels) are those that occur in the dual of the fusion of
30+
all the physical spaces in the system.
31+
1132
"""
1233
function exact_diagonalization(opp::FiniteMPOHamiltonian;
1334
sector=first(sectors(oneunit(physicalspace(opp, 1)))),

src/states/finitemps.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ By convention, we have that:
3434
FiniteMPS(As::Vector{<:GenericMPSTensor}; normalize=false, overwrite=false)
3535
3636
Construct an MPS via a specification of physical and virtual spaces, or from a list of
37-
tensors `As`. All cases reduce to the latter.
37+
tensors `As`. All cases reduce to the latter. In particular, a state with a non-trivial
38+
total charge can be constructed by passing a non-trivially charged vector space as the
39+
`left` or `right` virtual spaces.
3840
3941
### Arguments
4042
- `As::Vector{<:GenericMPSTensor}`: vector of site tensors
@@ -50,7 +52,7 @@ tensors `As`. All cases reduce to the latter.
5052
- `maxvirtualspace::S`: maximum virtual space
5153
5254
### Keywords
53-
- `normalize`: normalize the constructed state
55+
- `normalize=true`: normalize the constructed state
5456
- `overwrite=false`: overwrite the given input tensors
5557
- `left=oneunit(S)`: left-most virtual space
5658
- `right=oneunit(S)`: right-most virtual space

0 commit comments

Comments
 (0)