Skip to content

Commit 16d03ed

Browse files
committed
more fixes for docs
1 parent a7bf2ba commit 16d03ed

File tree

5 files changed

+31
-36
lines changed

5 files changed

+31
-36
lines changed

docs/Project.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
34
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
45
TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec"
5-
TensorKitSectors = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f"
66

77
[compat]
88
Documenter = "1"
99
Random = "1"
10-
TensorKitSectors = "0.1"

docs/make.jl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
using Documenter
22
using Random
3-
using TensorKit, TensorKitSectors
3+
using TensorKit
4+
using TensorKit.TensorKitSectors
5+
using TensorKit.MatrixAlgebraKit
6+
using DocumenterInterLinks
7+
8+
links = InterLinks(
9+
"MatrixAlgebraKit" => "https://quantumkithub.github.io/MatrixAlgebraKit.jl/stable/",
10+
"TensorOperations" => "https://quantumkithub.github.io/TensorOperations.jl/stable/",
11+
)
412

513
pages = ["Home" => "index.md",
614
"Manual" => ["man/intro.md", "man/tutorial.md", "man/categories.md",
@@ -15,6 +23,7 @@ makedocs(; modules=[TensorKit, TensorKitSectors],
1523
format=Documenter.HTML(; prettyurls=true, mathengine=MathJax(),
1624
assets=["assets/custom.css"]),
1725
pages=pages,
18-
pagesonly=true)
26+
pagesonly=true,
27+
plugins= [links,])
1928

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

docs/src/lib/tensors.md

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -219,44 +219,16 @@ and all follow the same strategy. The idea is that the `TensorMap` is interprete
219219
map based on the current partition of indices between `domain` and `codomain`, and then the
220220
entire range of MatrixAlgebraKit functions can be called.
221221
You can specify an additional permutation of the domain and codomain indices before the
222-
factorisation is performed by making use of [`permute`](@ref) or [`transpose`](@ref),
222+
factorisation is performed by making use of [`permute`](@ref) or [`transpose`](@ref).
223223

224-
```@docs
225-
left_orth
226-
right_orth
227-
left_null
228-
right_null
229-
svd_compact
230-
svd_full
231-
svd_vals
232-
eig_full
233-
eig_vals
234-
eigh_full
235-
eigh_vals
236-
isposdef
237-
```
224+
For the full list of factorizations, see [Decompositions](@extref MatrixAlgebraKit).
238225

239226
Additionally, it is possible to obtain truncated versions of some of these factorizations
240227
through the [`MatrixAlgebraKit.TruncationStrategy`](@ref) objects.
241228

242-
```@docs
243-
svd_trunc
244-
eig_trunc
245-
eigh_trunc
246-
```
247-
248-
The exact truncation strategy can be controlled through one of the following strategies:
229+
The exact truncation strategy can be controlled through the strategies defined in [Truncations](@extref MatrixAlgebraKit),
230+
but for `TensorMap`s there is also the special-purpose scheme:
249231

250232
```@docs
251-
notrunc
252-
trunctol
253-
truncrank
254-
truncerr
255233
truncspace
256234
```
257-
258-
It is additionally possible to combine multiple strategies through `&`, e.g.
259-
260-
```julia
261-
combined_truncation = trunctol(; atol=1e-2) & truncrank(3)
262-
```

src/TensorKit.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export left_orth, right_orth, left_null, right_null,
8181
eig_trunc,
8282
eigh_vals!, eigh_vals, eig_vals!, eig_vals,
8383
isposdef, isposdef!, ishermitian, isisometry, isunitary, sylvester, rank, cond
84+
8485
# deprecate:
8586
export eig, eig!, eigh, eigh!, eigen, eigen!, tsvd, tsvd!, leftorth, leftorth!, rightorth,
8687
rightorth!, leftnull, leftnull!, rightnull, rightnull!

src/tensors/factorizations/truncation.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Strategies
22
# ----------
3+
"""
4+
notrunc()
5+
"""
36
notrunc() = NoTruncation()
47

58
# deprecate
@@ -10,11 +13,22 @@ struct TruncationError{T<:Real} <: TruncationStrategy
1013
ϵ::T
1114
p::Real
1215
end
16+
17+
"""
18+
truncerr(epsilon, p)
19+
"""
1320
truncerr(epsilon::Real, p::Real=2) = TruncationError(epsilon, p)
1421

1522
struct TruncationSpace{S<:ElementarySpace} <: TruncationStrategy
1623
space::S
1724
end
25+
26+
"""
27+
truncspace(space::ElementarySpace)
28+
29+
Truncation strategy to keep the first values such that the resulting space is the infimum of
30+
the total space and the provided space.
31+
"""
1832
truncspace(space::ElementarySpace) = TruncationSpace(space)
1933

2034
# Truncation

0 commit comments

Comments
 (0)