Skip to content

Commit 9311fb0

Browse files
committed
some docs fixes
1 parent 8b2a15d commit 9311fb0

File tree

6 files changed

+18
-20
lines changed

6 files changed

+18
-20
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
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
4+
TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec"
45
TensorKitSectors = "13a9c161-d5da-41f0-bcbd-e1a08ae0647f"
56

67
[compat]

docs/make.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Documenter
22
using Random
33
using TensorKit, TensorKitSectors
4+
using TensorKit: FusionTreePair, Index2Tuple
45

56
pages = ["Home" => "index.md",
67
"Manual" => ["man/intro.md", "man/tutorial.md", "man/categories.md",

docs/src/lib/sectors.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ insertat
9090
split
9191
merge
9292
elementary_trace
93-
planar_trace(f::FusionTree{I,N}, q1::IndexTuple{N₃}, q2::IndexTuple{N₃}) where {I<:Sector,N,N₃}
93+
planar_trace(f::FusionTree{I,N}, q::Index2Tuple{N₃,N₃}) where {I<:Sector,N,N₃}
9494
artin_braid
9595
braid(f::FusionTree{I,N}, levels::NTuple{N,Int}, p::NTuple{N,Int}) where {I<:Sector,N}
9696
permute(f::FusionTree{I,N}, p::NTuple{N,Int}) where {I<:Sector,N}
@@ -113,8 +113,8 @@ Finally, these are used to define large manipulations of fusion-splitting tree p
113113
are then used in the index manipulation of `AbstractTensorMap` objects. The following methods
114114
defined on fusion splitting tree pairs have an associated definition for tensors.
115115
```@docs
116-
repartition(::FusionTree{I,N₁}, ::FusionTree{I,N₂}, ::Int) where {I<:Sector,N₁,N₂}
117-
transpose(::FusionTree{I}, ::FusionTree{I}, ::IndexTuple{N₁}, ::IndexTuple{N₂}) where {I<:Sector,N₁,N₂}
118-
braid(::FusionTree{I}, ::FusionTree{I}, ::IndexTuple, ::IndexTuple, ::IndexTuple{N₁}, ::IndexTuple{N₂}) where {I<:Sector,N₁,N₂}
119-
permute(::FusionTree{I}, ::FusionTree{I}, ::IndexTuple{N₁}, ::IndexTuple{N₂}) where {I<:Sector,N₁,N₂}
116+
repartition(::FusionTreePair, ::Int)
117+
transpose(::FusionTreePair{I}, ::Index2Tuple{N₁,N₂}) where {I,N₁,N₂}
118+
braid(::FusionTreePair, ::Index2Tuple, ::Index2Tuple)
119+
permute(::FusionTreePair, ::Index2Tuple)
120120
```

docs/src/man/sectors.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ the splitting tree.
11551155

11561156
The `FusionTree` interface to duality and line bending is given by
11571157

1158-
[`repartition(f1::FusionTree{I,N₁}, f2::FusionTree{I,N₂}, N::Int)`](@ref repartition)
1158+
[`repartition(f1::FusionTreePair{I,N₁,N₂}, N::Int)`](@ref repartition)
11591159

11601160
which takes a splitting tree `f1` with `N₁` outgoing sectors, a fusion tree `f2` with `N₂`
11611161
incoming sectors, and applies line bending such that the resulting splitting and fusion
@@ -1180,7 +1180,7 @@ With this basic function, we can now perform arbitrary combinations of braids or
11801180
permutations with line bendings, to completely reshuffle where sectors appear. The
11811181
interface provided for this is given by
11821182

1183-
[`braid(f1::FusionTree{I,N₁}, f2::FusionTree{I,N₂}, levels1::NTuple{N₁,Int}, levels2::NTuple{N₂,Int}, p1::NTuple{N₁′,Int}, p2::NTuple{N₂′,Int})`](@ref braid(::FusionTree{I}, ::FusionTree{I}, ::IndexTuple, ::IndexTuple, ::IndexTuple{N₁}, ::IndexTuple{N₂}) where {I<:Sector,N₁,N₂})
1183+
[`braid((f₁, f₂)::FusionTreePair, (p1, p2)::Index2Tuple, (levels1, levels2)::Index2Tuple)`](@ref braid(::TensorKit.FusionTreePair, ::Index2Tuple, ::Index2Tuple))
11841184

11851185
where we now have splitting tree `f1` with `N₁` outgoing sectors, a fusion tree `f2` with
11861186
`N₂` incoming sectors, `levels1` and `levels2` assign a level or depth to the corresponding
@@ -1206,7 +1206,7 @@ As before, there is a simplified interface for the case where
12061206
`BraidingStyle(I) isa SymmetricBraiding` and the levels are not needed. This is simply
12071207
given by
12081208

1209-
[`permute(f1::FusionTree{I,N₁}, f2::FusionTree{I,N₂}, p1::NTuple{N₁′,Int}, p2::NTuple{N₂′,Int})`](@ref permute(::FusionTree{I}, ::FusionTree{I}, ::IndexTuple{N₁}, ::IndexTuple{N₂}) where {I<:Sector,N₁,N₂})
1209+
[`permute((f₁, f₂)::FusionTreePair, (p1, p2)::Index2Tuple)`](@ref permute(::FusionTreePair, ::Index2Tuple))
12101210

12111211
The `braid` and `permute` routines for double fusion trees will be the main access point for
12121212
corresponding manipulations on tensors. As a consequence, results from this routine are

src/fusiontrees/manipulations.jl

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,9 @@ outgoing (`f₁`) and incoming sectors (`f₂`) respectively (with identical cou
487487
repartitioning the tree by bending incoming to outgoing sectors (or vice versa) in order to
488488
have `N` outgoing sectors.
489489
"""
490-
@inline function repartition((f₁, f₂)::FusionTreePair{I,N₁,N₂}, N::Int) where {I,N₁,N₂}
490+
@inline function repartition((f₁, f₂)::FusionTreePair, N::Int)
491491
f₁.coupled == f₂.coupled || throw(SectorMismatch())
492-
@assert 0 <= N <= N₁ + N₂
492+
@assert 0 <= N <= length(f₁) + length(f₂)
493493
return _recursive_repartition((f₁, f₂), Val(N))
494494
end
495495

@@ -1002,8 +1002,7 @@ end
10021002

10031003
# braid double fusion tree
10041004
"""
1005-
braid((f₁, f₂)::FusionTreePair{I}, (p1, p2)::Index2Tuple{N₁,N₂},
1006-
(levels1, levels2)::Index2Tuple) where {I,N₁,N₂}
1005+
braid((f₁, f₂)::FusionTreePair, (p1, p2)::Index2Tuple, (levels1, levels2)::Index2Tuple)
10071006
-> <:AbstractDict{<:FusionTreePair{I, N₁, N₂}}, <:Number}
10081007
10091008
Input is a fusion-splitting tree pair that describes the fusion of a set of incoming
@@ -1018,9 +1017,8 @@ respectively, which determines how indices braid. In particular, if `i` and `j`
10181017
levels[j]`. This does not allow to encode the most general braid, but a general braid can
10191018
be obtained by combining such operations.
10201019
"""
1021-
function braid((f₁, f₂)::FusionTreePair{I}, (p1, p2)::Index2Tuple{N₁,N₂},
1022-
(levels1, levels2)::Index2Tuple) where {I,N₁,N₂}
1023-
@assert length(f₁) + length(f₂) == N₁ + N₂
1020+
function braid((f₁, f₂)::FusionTreePair, (p1, p2)::Index2Tuple, (levels1, levels2)::Index2Tuple)
1021+
@assert length(f₁) + length(f₂) == length(p1) + length(p2)
10241022
@assert length(f₁) == length(levels1) && length(f₂) == length(levels2)
10251023
@assert TupleTools.isperm((p1..., p2...))
10261024
return fsbraid(((f₁, f₂), (p1, p2), (levels1, levels2)))
@@ -1056,7 +1054,7 @@ function CacheStyle(::typeof(fsbraid), k::FSBraidKey{I}) where {I<:Sector}
10561054
end
10571055

10581056
"""
1059-
permute((f₁, f₂)::FusionTreePair{I}, (p1, p2)::Index2Tuple{N₁, N₂}) where {I, N₁, N₂}
1057+
permute((f₁, f₂)::FusionTreePair, (p1, p2)::Index2Tuple)
10601058
-> <:AbstractDict{<:FusionTreePair{I, N₁, N₂}}, <:Number}
10611059
10621060
Input is a double fusion tree that describes the fusion of a set of incoming uncoupled
@@ -1066,8 +1064,8 @@ outgoing (`t1`) and incoming sectors (`t2`) respectively (with identical coupled
10661064
repartitioning and permuting the tree such that sectors `p1` become outgoing and sectors
10671065
`p2` become incoming.
10681066
"""
1069-
function permute((f₁, f₂)::FusionTreePair{I}, (p1, p2)::Index2Tuple{N₁,N₂}) where {I,N₁,N₂}
1070-
@assert BraidingStyle(I) isa SymmetricBraiding
1067+
function permute((f₁, f₂)::FusionTreePair, (p1, p2)::Index2Tuple)
1068+
@assert BraidingStyle(sectortype(f₁)) isa SymmetricBraiding
10711069
levels1 = ntuple(identity, length(f₁))
10721070
levels2 = length(f₁) .+ ntuple(identity, length(f₂))
10731071
return braid((f₁, f₂), (p1, p2), (levels1, levels2))

src/tensors/linalg.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ end
7171
Construct the identity endomorphism on space `V`, i.e. return a `t::TensorMap` with
7272
`domain(t) == codomain(t) == V`, where either `scalartype(t) = T` if `T` is a `Number` type
7373
or `storagetype(t) = T` if `T` is a `DenseVector` type.
74-
75-
See also [`one!`](@ref).
7674
""" id, id!
7775

7876
id(V::TensorSpace) = id(Float64, V)

0 commit comments

Comments
 (0)