Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/LocalPreferences.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[SUNRepresentations]
display_mode = "dimension"
8 changes: 6 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ using DocumenterInterLinks

links = InterLinks(
"MatrixAlgebraKit" => "https://quantumkithub.github.io/MatrixAlgebraKit.jl/stable/",
"TensorOperations" => "https://quantumkithub.github.io/TensorOperations.jl/stable/"
"TensorOperations" => "https://quantumkithub.github.io/TensorOperations.jl/stable/",
"TensorKitSectors" => "https://quantumkithub.github.io/TensorKitSectors.jl/dev/"
)

pages = [
"Home" => "index.md",
"Manual" => [
"man/intro.md", "man/tutorial.md",
"man/spaces.md", "man/sectors.md", "man/tensors.md",
"man/spaces.md", "man/symmetries.md",
"man/sectors.md", "man/gradedspaces.md",
"man/fusiontrees.md", "man/tensors.md",
"man/tensormanipulations.md",
],
"Library" => [
"lib/sectors.md", "lib/fusiontrees.md",
Expand Down
1,259 changes: 476 additions & 783 deletions docs/src/appendix/categories.md

Large diffs are not rendered by default.

1,004 changes: 339 additions & 665 deletions docs/src/appendix/symmetric_tutorial.md

Large diffs are not rendered by default.

37 changes: 13 additions & 24 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,23 @@ CurrentModule = TensorKit

## Package summary

TensorKit.jl aims to be a generic package for working with tensors as they appear throughout
the physical sciences. TensorKit implements a parametric type [`Tensor`](@ref) (which is
actually a specific case of the type [`TensorMap`](@ref)) and defines for these types a
number of vector space operations (scalar multiplication, addition, norms and inner
products), index operations (permutations) and linear algebra operations (multiplication,
factorizations). Finally, tensor contractions can be performed using the `@tensor` macro
from [TensorOperations.jl](https://github.com/QuantumKitHub/TensorOperations.jl).

Currently, most effort is oriented towards tensors as they appear in the context of quantum
many-body physics and in particular the field of tensor networks. Such tensors often have
large dimensions and take on a specific structure when symmetries are present. By employing
concepts from category theory, we can represent and manipulate tensors with a large
variety of symmetries, including abelian and non-abelian symmetries, fermionic statistics,
as well as generalized (a.k.a. non-invertible or anyonic) symmetries.

At the same time, TensorKit.jl focusses on computational efficiency and performance. The
underlying storage of a tensor's data can be any `DenseArray`. When the data is stored
in main memory (corresponding to `Array`), multiple CPUs can be leveraged as many
operations come with multithreaded implementations, either by distributing the different
blocks in case of a structured tensor (i.e. with symmetries) or by using multithreading
provided by the package [Strided.jl](https://github.com/Jutho/Strided.jl). Support for
storing and manipulating tensors on NVidia and AMD GPUs is currently being developed,
whereas support for distributed arrays is planned for the future.
TensorKit.jl aims to be a generic package for working with tensors as they appear throughout the physical sciences.
TensorKit implements a parametric type [`Tensor`](@ref) (which is actually a specific case of the type [`TensorMap`](@ref)) and defines for these types a number of vector space operations (scalar multiplication, addition, norms and inner products), index operations (permutations) and linear algebra operations (multiplication, factorizations).
Finally, tensor contractions can be performed using the `@tensor` macro from [TensorOperations.jl](https://github.com/QuantumKitHub/TensorOperations.jl).

Currently, most effort is oriented towards tensors as they appear in the context of quantum many-body physics and in particular the field of tensor networks.
Such tensors often have large dimensions and take on a specific structure when symmetries are present.
By employing concepts from category theory, we can represent and manipulate tensors with a large variety of symmetries, including abelian and non-abelian symmetries, fermionic statistics, as well as generalized (a.k.a. non-invertible or anyonic) symmetries.

At the same time, TensorKit.jl focusses on computational efficiency and performance.
The underlying storage of a tensor's data can be any `DenseArray`.
When the data is stored in main memory (corresponding to `Array`), multiple CPUs can be leveraged as many operations come with multithreaded implementations, either by distributing the different blocks in case of a structured tensor (i.e. with symmetries) or by using multithreading provided by the package [Strided.jl](https://github.com/Jutho/Strided.jl).
Support for storing and manipulating tensors on Nvidia and AMD GPUs is currently being developed, whereas support for distributed arrays is planned for the future.

## Contents of the manual

```@contents
Pages = ["man/intro.md", "man/spaces.md", "man/sectors.md", "man/tensors.md"]
Pages = ["man/intro.md", "man/spaces.md", "man/symmetries.md", "man/sectors.md", "man/gradedspaces.md", "man/fusiontrees.md", "man/tensors.md", "man/tensormanipulations.md"]
Depth = 2
```

Expand Down
8 changes: 3 additions & 5 deletions docs/src/lib/fusiontrees.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ braid(f::FusionTree{I,N}, levels::NTuple{N,Int}, p::NTuple{N,Int}) where {I<:Sec
permute(f::FusionTree{I,N}, p::NTuple{N,Int}) where {I<:Sector,N}
```

These can be composed to implement elementary manipulations of fusion-splitting tree pairs,
according to the following methods
These can be composed to implement elementary manipulations of fusion-splitting tree pairs, according to the following methods

```julia
# TODO: add documentation for the following methods
Expand All @@ -44,9 +43,8 @@ TensorKit.cycleclockwise
TensorKit.cycleanticlockwise
```

Finally, these are used to define large manipulations of fusion-splitting tree pairs, which
are then used in the index manipulation of `AbstractTensorMap` objects. The following methods
defined on fusion splitting tree pairs have an associated definition for tensors.
Finally, these are used to define large manipulations of fusion-splitting tree pairs, which are then used in the index manipulation of `AbstractTensorMap` objects.
The following methods defined on fusion splitting tree pairs have an associated definition for tensors.
```@docs
repartition(::FusionTree{I,N₁}, ::FusionTree{I,N₂}, ::Int) where {I<:Sector,N₁,N₂}
transpose(::FusionTree{I}, ::FusionTree{I}, ::IndexTuple{N₁}, ::IndexTuple{N₂}) where {I<:Sector,N₁,N₂}
Expand Down
31 changes: 14 additions & 17 deletions docs/src/lib/sectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ TimeReversed
ProductSector
```

Several more concrete sector types can be found in other packages such as
[SUNRepresentations.jl](https://github.com/QuantumKitHub/SUNRepresentations.jl),
[CategoryData.jl](https://github.com/QuantumKitHub/CategoryData.jl),
[QWignerSymbols.jl](https://github.com/lkdvos/QWignerSymbols.jl), ...:
Several more concrete sector types can be found in other packages such as [SUNRepresentations.jl](https://github.com/QuantumKitHub/SUNRepresentations.jl), [CategoryData.jl](https://github.com/QuantumKitHub/CategoryData.jl), [QWignerSymbols.jl](https://github.com/lkdvos/QWignerSymbols.jl), ...:

Some of these types are parameterized by a type parameter that represents a group.
We therefore also provide a number of types to represent groups:
Expand All @@ -54,17 +51,15 @@ TensorKitSectors.Dihedral
TensorKitSectors.ProductGroup
```

The following types are used to characterise different properties of the different types
of sectors:
The following types are used to characterize different properties of the different types of sectors:

```@docs
FusionStyle
BraidingStyle
UnitStyle
```

Finally, the following auxiliary types are defined to facilitate the implementation
of some of the methods on sectors:
Finally, the following auxiliary types are defined to facilitate the implementation of some of the methods on sectors:

```@docs
TensorKitSectors.SectorValues
Expand All @@ -73,8 +68,7 @@ TensorKitSectors.SectorProductIterator

## Useful constants

The following constants are defined to facilitate obtaining the type associated
with the group elements or the irreducible representations of a given group:
The following constants are defined to facilitate obtaining the type associated with the group elements or the irreducible representations of a given group:

```@docs
Irrep
Expand All @@ -83,8 +77,7 @@ GroupElement

## Methods for characterizing and manipulating `Sector` objects

The following methods can be used to obtain properties such as topological data
of sector objects, or to manipulate them or create related sectors:
The following methods can be used to obtain properties such as topological data of sector objects, or to manipulate them or create related sectors:

```@docs
unit
Expand All @@ -107,8 +100,7 @@ TensorKitSectors.sectorscalartype
deligneproduct(::Sector, ::Sector)
```

We have also the following methods that are specific to certain types of sectors
and serve as accessors to their fields:
We have also the following methods that are specific to certain types of sectors and serve as accessors to their fields:

```@docs
charge
Expand All @@ -121,8 +113,14 @@ Furthermore, we also have one specific method acting on groups, represented as t
×
```

Because we sometimes want to customize the string representation of our sector types,
we also have the following method:
Mapping between sectors and linear indices is only used for sectors `I` for which `Base.IteratorSize(values(I)) == HasLength()`.
In that case, we map an index `i` to a sector `c` via `c = getindex(values(I), i)`, and provide an inverse mapping

```@docs
TensorKitSectors.findindex
```

Because we sometimes want to customize the string representation of our sector types, we also have the following method:

```@docs
TensorKitSectors.type_repr
Expand All @@ -133,4 +131,3 @@ Finally, we provide functionality to compile all revelant methods for a sector:
```@docs
TensorKitSectors.precompile_sector
```

16 changes: 6 additions & 10 deletions docs/src/lib/spaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,22 @@ ProductSpace
HomSpace
```

together with the following specific type for encoding the inner product structure of
a space:
together with the following specific type for encoding the inner product structure of a space:

```@docs
InnerProductStyle
```

## Useful constants

The following constants are defined to easily create the concrete type of `GradedSpace`
associated with a given type of sector.
The following constants are defined to easily create the concrete type of `GradedSpace` associated with a given type of sector.

```@docs
Vect
Rep
```

In this respect, there are also a number of type aliases for the `GradedSpace` types
associated with the most common sectors, namely
In this respect, there are also a number of type aliases for the `GradedSpace` types associated with the most common sectors, namely

```julia
const ZNSpace{N} = Vect[ZNIrrep{N}]
Expand Down Expand Up @@ -110,16 +107,15 @@ isepimorphic
isisomorphic
```

Inserting trivial space factors or removing such factors for `ProductSpace` instances
can be done with the following methods.
Inserting trivial space factors or removing such factors for `ProductSpace` instances can be done with the following methods.

```@docs
insertleftunit(::ProductSpace, ::Val{i}) where {i}
insertrightunit(::ProductSpace, ::Val{i}) where {i}
removeunit(::ProductSpace, ::Val{i}) where {i}
```

There are also specific methods for `HomSpace` instances, that are used in determining
the resuling `HomSpace` after applying certain tensor operations.
There are also specific methods for `HomSpace` instances, that are used in determining the resulting `HomSpace` after applying certain tensor operations.

```@docs
flip(W::HomSpace{S}, I) where {S}
Expand Down
Loading