Documentation for index-manipulation and contraction API rework#438
Conversation
cae3748 to
26c844a
Compare
c76bbc3 to
01552fb
Compare
|
After the build completes, the updated documentation will be available here |
|
The additional text to contractions is a lifesaver, I actually finally understand why some of my planar diagrams weren't considered to be planar! 😄 |
|
I'll had a first quick look and this looks very well written indeed. This will be extremely useful (and is definitely long overdue). The only comment that is maybe missing is that the |
26c844a to
35f4d65
Compare
ff8cf8e to
ea24798
Compare
ea24798 to
0b0cb9a
Compare
|
Can I also go through this if that's alright? I can make time for this tomorrow! |
cdd9a7d to
508a0ef
Compare
|
Sure, I can leave this open if you like. I still have some typos etc that I'd like to push this evening, otherwise for me it would be easiest if you just apply your suggestions tomorrow (or the day after 🤷) and merge. |
|
|
||
| `AbstractTensorMap` instances `t` represent linear maps, i.e. homomorphisms in a `𝕜`-linear category, just like matrices. | ||
| To a large extent, they follow the interface of `Matrix` in Julia's `LinearAlgebra` standard library. | ||
| Many methods from `LinearAlgebra` are (re)exported by TensorKit.jl, and can then us be used without `using LinearAlgebra` explicitly. |
There was a problem hiding this comment.
| Many methods from `LinearAlgebra` are (re)exported by TensorKit.jl, and can then us be used without `using LinearAlgebra` explicitly. | |
| Many methods from `LinearAlgebra` are (re)exported by TensorKit.jl, and can thus be used without `using LinearAlgebra` explicitly. |
| The tensor product of two `TensorMap` instances `t1` and `t2` is obtained as `t1 ⊗ t2` and results in a new `TensorMap` with `codomain(t1 ⊗ t2) = codomain(t1) ⊗ codomain(t2)` and `domain(t1 ⊗ t2) = domain(t1) ⊗ domain(t2)`. | ||
| If we have two `TensorMap{T, S, N, 1}` instances `t1` and `t2` with the same codomain, we can combine them in a way that is analogous to `hcat`, i.e. we stack them such that the new tensor `catdomain(t1, t2)` has also the same codomain, but has a domain which is `domain(t1) ⊕ domain(t2)`. | ||
| Similarly, if `t1` and `t2` are of type `TensorMap{T, S, 1, N}` and have the same domain, the operation `catcodomain(t1, t2)` results in a new tensor with the same domain and a codomain given by `codomain(t1) ⊕ codomain(t2)`, which is the analogy of `vcat`. | ||
| Note that direct sum only makes sense between `ElementarySpace` objects, i.e. there is no way to give a tensor product meaning to a direct sum of tensor product spaces. |
There was a problem hiding this comment.
| Note that direct sum only makes sense between `ElementarySpace` objects, i.e. there is no way to give a tensor product meaning to a direct sum of tensor product spaces. | |
| Note that the direct sum only makes sense between `ElementarySpace` objects, i.e. there is no way to give a tensor product meaning to a direct sum of tensor product spaces. |
| using LinearAlgebra | ||
| ``` | ||
|
|
||
| As tensors are linear maps, they suport various kinds of factorizations. |
There was a problem hiding this comment.
| As tensors are linear maps, they suport various kinds of factorizations. | |
| As tensors are linear maps, they support various kinds of factorizations. |
Split the consolidated tensormanipulations.md page into dedicated indexmanipulations, contractions, factorizations, and linearalgebra pages, and wire them into the docs navigation.
Document contraction behavior for fermionic and anyonic sectors, including a note on @planar for Fermionic, with an accompanying illustration.
Co-authored-by: Jutho <Jutho@users.noreply.github.com>
37ecc0c to
2d58baa
Compare
|
If there are no further comments, happy to merge this! |
Stacked on top of #416. Contains the documentation portion of that PR:
indexmanipulations.md,contractions.md,linearalgebra.md,factorizations.mdimg/tensor-fermioniccontraction.svgtensormanipulations.mddocs/make.jl(new "Tensors" group)CollapsedDocStrings = trueadded tolib/{fusiontrees,sectors,spaces}.mdman/tensors.mdAdditionally, I finally got around to putting in some information in the documentation section of the fermionic/anyonic contractions pages, let me know what you think.
Ultimately the dream would be to be able to (finally) submit this version to SciPost codebases.
Merge order: #416 first, then this PR. Once #416 lands, the base of this PR will fast-forward to
main.