Skip to content

Commit 5a337f7

Browse files
committed
Various docfixes
1 parent 4f26612 commit 5a337f7

File tree

10 files changed

+56
-31
lines changed

10 files changed

+56
-31
lines changed

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
4+
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
45
KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77"
56
MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502"
67
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

docs/make.jl

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ end
1010
using MPSKit
1111
using Documenter
1212
using DocumenterCitations
13+
using DocumenterInterLinks
1314

1415
# examples
1516
example_dir = joinpath(@__DIR__, "src", "examples")
@@ -24,32 +25,37 @@ end
2425
bibpath = joinpath(@__DIR__, "src", "assets", "mpskit.bib")
2526
bib = CitationBibliography(bibpath; style=:authoryear)
2627

28+
# interlinks
29+
links = InterLinks(
30+
"TensorKit" => "https://jutho.github.io/TensorKit.jl/stable/",
31+
"TensorOperations" => "https://jutho.github.io/TensorOperations.jl/stable/"
32+
)
33+
2734
# include MPSKit in all doctests
2835
DocMeta.setdocmeta!(MPSKit, :DocTestSetup, :(using MPSKit, TensorKit); recursive=true)
2936

3037
mathengine = MathJax3(Dict(:loader => Dict("load" => ["[tex]/physics"]),
31-
:tex => Dict("inlineMath" => [["\$", "\$"], ["\\(", "\\)"]],
32-
"tags" => "ams",
33-
"packages" => ["base", "ams", "autoload", "physics"])))
38+
:tex => Dict("inlineMath" => [["\$", "\$"], ["\\(", "\\)"]],
39+
"tags" => "ams",
40+
"packages" => ["base", "ams", "autoload", "physics"])))
3441
makedocs(;
35-
modules=[MPSKit],
36-
sitename="MPSKit.jl",
37-
format=Documenter.HTML(;
38-
prettyurls=get(ENV, "CI", nothing) == "true",
39-
mathengine,
40-
size_threshold=512000),
41-
pages=["Home" => "index.md",
42-
"Manual" => ["man/intro.md",
43-
"man/states.md",
44-
"man/operators.md",
45-
"man/algorithms.md",
46-
"man/environments.md",
47-
"man/parallelism.md",
48-
"man/lattices.md"],
49-
"Examples" => "examples/index.md",
50-
"Library" => "lib/lib.md",
51-
"References" => "references.md"],
52-
warnonly=true,
53-
plugins=[bib])
42+
sitename="MPSKit.jl",
43+
format=Documenter.HTML(;
44+
prettyurls=get(ENV, "CI", nothing) == "true",
45+
mathengine,
46+
size_threshold=512000),
47+
pages=["Home" => "index.md",
48+
"Manual" => ["man/intro.md",
49+
"man/states.md",
50+
"man/operators.md",
51+
"man/algorithms.md",
52+
"man/environments.md",
53+
"man/parallelism.md",
54+
"man/lattices.md"],
55+
"Examples" => "examples/index.md",
56+
"Library" => "lib/lib.md",
57+
"References" => "references.md"],
58+
checkdocs=:exports,
59+
plugins=[bib, links])
5460

5561
deploydocs(; repo="github.com/QuantumKitHub/MPSKit.jl.git", push_preview=true)

docs/src/man/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Prerequisites
22

33
The following sections describe the prerequisites for using MPSKit. If you are already
4-
familiar with the concepts of MPSKit and TensorKit, you can skip to the [Overview](@ref)
5-
section.
4+
familiar with the concepts of MPSKit and TensorKit, you can skip to the [Conventions](@ref)
5+
sections.
66

77
## TensorKit
88

docs/src/man/operators.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
In analogy to how we can define matrix product states as a contraction of local tensors, a
44
similar construction exist for operators. To that end, a Matrix Product Operator (MPO) is
5-
nothing more than a collection of local [`MPOTensor`](@ref) objects, contracted along a
5+
nothing more than a collection of local [`MPOTensor`](@ref MPSKit.MPOTensor) objects, contracted along a
66
line. Again, we can distinguish between finite and infinite operators, with the latter being
77
represented by a periodic array of MPO tensors.
88

@@ -13,7 +13,7 @@ These objects can be created either directly from a vector of `MPOTensor`s, or s
1313
a dense operator (a subtype of `AbstractTensorMap{S,N,N}`), which is then decomposed into a
1414
product of local tensors.
1515

16-
![](mpo.svg)
16+
![](../assets/mpo.svg)
1717

1818
```@setup operators
1919
using TensorKit, MPSKit

src/algorithms/groundstate/idmrg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ $(TYPEDFIELDS)
8888
- `eigalg::A`: eigensolver algorithm
8989
- `maxiter::Int`: maximum number of outer iterations
9090
- `verbosity::Int`: display progress information
91-
- `trscheme::TruncationScheme`: truncation algorithm for [tsvd][TensorKit.tsvd](@ref)
91+
- `trscheme::TruncationScheme`: truncation algorithm for [`tsvd`][TensorKit.tsvd](@extref)
9292
"""
9393
struct IDMRG2{A} <: Algorithm
9494
"tolerance for convergence criterium"

src/operators/mpohamiltonian.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
MPOHamiltonian(lattice::AbstractArray{<:VectorSpace})
44
MPOHamiltonian(x::AbstractArray{<:Any,3})
55
6-
MPO representation of a hamiltonian. This is a specific form of a [`SparseMPO`](@ref), where
6+
MPO representation of a hamiltonian. This is a specific form of an [`AbstractMPO`](@ref), where
77
all the sites are represented by an upper triangular block matrix of the following form:
88
99
```math

src/operators/multilinempo.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# MultilineMPO
22
# ------------
33
"""
4-
const MultilineMPO = Multiline{<:Union{SparseMPO,DenseMPO}}
4+
const MultilineMPO = Multiline{<:AbstractMPO}
55
66
Type that represents multiple lines of `MPO` objects.
77
88
# Constructors
99
MultilineMPO(mpos::AbstractVector{<:Union{SparseMPO,DenseMPO}})
1010
MultilineMPO(Os::AbstractMatrix{<:MPOTensor})
1111
12-
See also: [`Multiline`](@ref), [`SparseMPO`](@ref), [`DenseMPO`](@ref)
12+
See also: [`Multiline`](@ref), [`AbstractMPO`](@ref)
1313
"""
1414
const MultilineMPO = Multiline{<:AbstractMPO}
1515

src/states/abstractmps.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Tensor types
33
===========================================================================================#
44

5+
"""
6+
MPOTensor{S}
7+
8+
Tensor type for representing local MPO tensors, with the index convention `W ⊗ S ← N ⊗ E`.
9+
"""
510
const MPOTensor{S} = AbstractTensorMap{T,S,2,2} where {T}
611
const MPSBondTensor{S} = AbstractTensorMap{T,S,1,1} where {T}
712
const GenericMPSTensor{S,N} = AbstractTensorMap{T,S,N,1} where {T} # some functions are also defined for "general mps tensors" (used in peps code)

src/utility/periodicarray.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,21 @@ function PeriodicArray{T,N}(initializer, args...) where {T,N}
3838
return PeriodicArray(Array{T,N}(initializer, args...))
3939
end
4040

41+
"""
42+
PeriodicVector{T}
43+
44+
One-dimensional dense array with elements of type `T` and periodic boundary conditions.
45+
Alias for [`PeriodicArray{T,1}`](@ref).
46+
"""
4147
const PeriodicVector{T} = PeriodicArray{T,1}
4248
PeriodicVector(data::AbstractVector{T}) where {T} = PeriodicVector{T}(data)
49+
50+
"""
51+
PeriodicMatrix{T}
52+
53+
Two-dimensional dense array with elements of type `T` and periodic boundary conditions.
54+
Alias for [`PeriodicArray{T,2}`](@ref).
55+
"""
4356
const PeriodicMatrix{T} = PeriodicArray{T,2}
4457
PeriodicMatrix(data::AbstractMatrix{T}) where {T} = PeriodicMatrix{T}(data)
4558

src/utility/utility.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ end
151151
"""
152152
tensorexpr(name::Symbol, ind_out, [ind_in])
153153
154-
Generates expressions for use within [`@tensor`](@ref TensorOperations.@tensor) environments
154+
Generates expressions for use within [`@tensor`](@extref TensorOperations.@tensor) environments
155155
of the form `name[ind_out...; ind_in]`.
156156
"""
157157
tensorexpr(name::Symbol, inds) = Expr(:ref, name, inds...)

0 commit comments

Comments
 (0)