Skip to content

Commit 10944fb

Browse files
committed
more doc fixes
1 parent df6d8a3 commit 10944fb

2 files changed

Lines changed: 26 additions & 22 deletions

File tree

docs/src/man/tensors.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ one specific isometric embedding, such that `adjoint(w)*w == id(V2)` and `w*adjo
396396
some hermitian idempotent (a.k.a. orthogonal projector) acting on `V1`. An error will be
397397
thrown if such a map cannot be constructed for the given domain and codomain.
398398

399-
Let's conclude this section with some examples with `RepresentationSpace`.
399+
Let's conclude this section with some examples with `GradedSpace`.
400400
```@repl tensors
401401
V1 = ℤ₂Space(0=>3,1=>2)
402402
V2 = ℤ₂Space(0=>2,1=>1)
@@ -483,8 +483,8 @@ and `N₂ == numin(t)`, the number of outgoing and incoming indices. There are a
483483
unexported methods `TensorKit.codomainind(t)` and `TensorKit.domainind(t)` which return the
484484
tuples `(1, 2, …, N₁)` and `(N₁+1, …, N₁+N₂)`, and are useful for internal purposes. The
485485
type parameter `S<:ElementarySpace` can be obtained as `spacetype(t)`; the corresponding
486-
sector can directly obtained as `sectortype(t)` and is `Trivial` when `S !=
487-
RepresentationSpace`. The underlying field scalars of `S` can also directly be obtained as
486+
sector can directly obtained as `sectortype(t)` and is `Trivial` when
487+
`S != GradedSpace`. The underlying field scalars of `S` can also directly be obtained as
488488
`field(t)`. This is different from `eltype(t)`, which returns the type of `Number` in the
489489
tensor data, i.e. the type parameter `T` in the (subtype of) `DenseMatrix{T}` in which the
490490
matrix blocks are stored. Note that during construction, a (one-time) warning is printed if
@@ -588,7 +588,7 @@ Furthermore, there is `normalize(t)` and `normalize!(t)` to return a scaled vers
588588
with unit norm. These operations should also exist for `S<:InnerProductSpace`, but requires
589589
an interface for defining a custom inner product in these spaces. Currently, there is no
590590
concrete subtype of `InnerProductSpace` that is not a subtype of `EuclideanSpace`. In
591-
particular, `CartesianSpace`, `ComplexSpace` and `RepresentationSpace` are all subtypes
591+
particular, `CartesianSpace`, `ComplexSpace` and `GradedSpace` are all subtypes
592592
of `EuclideanSpace`.
593593

594594
With instances `t::AbstractEuclideanTensorMap` there is associated an adjoint operation,
@@ -774,8 +774,8 @@ the resulting `TensorMap` to an `Array`, so we have to rely on indirect tests to
774774
results.
775775

776776
```@repl tensors
777-
V1 = RepresentationSpace{FibonacciAnyon}(:I=>3,:τ=>2)
778-
V2 = RepresentationSpace{FibonacciAnyon}(:I=>2,:τ=>1)
777+
V1 = GradedSpace{FibonacciAnyon}(:I=>3,:τ=>2)
778+
V2 = GradedSpace{FibonacciAnyon}(:I=>2,:τ=>1)
779779
m = TensorMap(randn, Float32, V1, V2)
780780
transpose(m)
781781
twist(braid(m, (1,2), (2,), (1,)), 1)

docs/src/man/tutorial.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,10 @@ is some symmetry action defined on every vector space associated with each of th
248248
of a `TensorMap`, and the `TensorMap` is then required to be equivariant, i.e. it acts as
249249
an intertwiner between the tensor product representation on the domain and that on the
250250
codomain. By Schur's lemma, this means that the tensor is block diagonal in some basis
251-
corresponding to the so-called irreducible representations that can be coupled to by
252-
combining the different representations on the different spaces in the domain or codomain.
253-
For Abelian symmetries, this does not require a basis change and it just imposes that the
254-
tensor has some block sparsity. Let's clarify all of this with some examples.
251+
corresponding to the irreducible representations that can be coupled to by combining the
252+
different representations on the different spaces in the domain or codomain. For Abelian
253+
symmetries, this does not require a basis change and it just imposes that the tensor has
254+
some block sparsity. Let's clarify all of this with some examples.
255255

256256
We start with a simple ``ℤ₂`` symmetry:
257257
```@repl tutorial
@@ -290,7 +290,7 @@ A = TensorMap(randn, V*V, V)
290290
dim(A)
291291
convert(Array, A)
292292
293-
V = RepresentationSpace{U₁×ℤ₂}((0,0)=>2,(1,1)=>1,(-1,0)=>1)
293+
V = GradedSpace[Irrep[U₁×ℤ₂]]((0,0)=>2,(1,1)=>1,(-1,0)=>1)
294294
dim(V)
295295
A = TensorMap(randn, V*V, V)
296296
dim(A)
@@ -299,38 +299,42 @@ convert(Array, A)
299299
Here, the `dim` of a `TensorMap` returns the number of linearly independent components,
300300
i.e. the number of non-zero entries in the case of an abelian symmetry. Also note that we
301301
can use `×` (obtained as `\times+TAB`) to combine different symmetries. The general space
302-
associated with symmetries is a `RepresentationSpace`. Although this is actually an
302+
associated with symmetries is a `GradedSpace`. Although this is actually an
303303
abstract type, it is the access point for users to construct spaces with arbitrary
304304
symmetries, and `ℤ₂Space` (also `Z2Space` as non-Unicode alternative) and `U₁Space` (or
305305
`U1Space`) are just convenient synonyms, e.g.
306306
```@repl tutorial
307-
RepresentationSpace{U₁}(0=>3,1=>2,-1=>1) == U1Space(-1=>1,1=>2,0=>3)
307+
GradedSpace[Irrep[U₁]](0=>3,1=>2,-1=>1) == U1Space(-1=>1,1=>2,0=>3)
308308
V = U₁Space(1=>2,0=>3,-1=>1)
309309
for s in sectors(V)
310310
@show s, dim(V, s)
311311
end
312-
U₁Space(-1=>1,0=>3,1=>2) == RepresentationSpace(U₁(1)=>2, U₁(0)=>3, U₁(-1)=>1)
313-
supertype(RepresentationSpace)
312+
U₁Space(-1=>1,0=>3,1=>2) == GradedSpace(Irrep[U₁](1)=>2, Irrep[U₁](0)=>3, Irrep[U₁](-1)=>1)
313+
supertype(GradedSpace)
314314
```
315-
Note also that the order in which the charges and their corresponding subspace
315+
Note that `GradedSpace` is not immediately parameterized by some group `G`, but actually by
316+
the set of irreducible representations of `G`, denoted as `Irrep[G]`. Indeed, `GradedSpace`
317+
also supports a grading that is derived from the fusion ring of a (unitary) pre-fusion
318+
category. Also note that the order in which the charges and their corresponding subspace
316319
dimensionality are specified is irrelevant, and that the charges, henceforth called sectors
317320
(which is a more general name for charges or quantum numbers) are of a specific type, in
318-
this case `U₁`. However, the `RepresentationSpace{G}` constructor automatically converts
319-
the keys in the list of `Pair`s it receives to the correct type. Alternatively, we can
320-
directly create the sectors of the correct type and use the generic `RepresentationSpace`
321+
this case `Irrep[U₁] == U1Irrep`. However, the `GradedSpace[I]` constructor automatically
322+
converts the keys in the list of `Pair`s it receives to the correct type. Alternatively, we
323+
can directly create the sectors of the correct type and use the generic `GradedSpace`
324+
321325
constructor. We can probe the subspace dimension of a certain sector `s` in a space `V`
322-
with `dim(V, s)`. Finally, note that `RepresentationSpace` is also a subtype of
326+
with `dim(V, s)`. Finally, note that `GradedSpace` is also a subtype of
323327
`EuclideanSpace{ℂ}`, which implies that it still has the standard Euclidean inner product
324328
and we assume all representations to be unitary.
325329

326330
TensorKit.jl also allows for non-abelian symmetries such as `SU₂`. In this case, the vector
327331
space is characterized via the spin quantum number (i.e. the irrep label of `SU₂`) for each
328332
of its subspaces, and is created using `SU₂Space` (or `SU2Space` or
329-
`RepresentationSpace{SU₂}`)
333+
`GradedSpace[Irrep[SU₂]]`)
330334
```@repl tutorial
331335
V = SU₂Space(0=>2,1/2=>1,1=>1)
332336
dim(V)
333-
V == RepresentationSpace{SU₂}(0=>2, 1=>1, 1//2=>1)
337+
V == GradedSpace[Irrep[SU₂]](0=>2, 1=>1, 1//2=>1)
334338
```
335339
Note that now `V` has a two-dimensional subspace with spin zero, and two one-dimensional
336340
subspaces with spin 1/2 and spin 1. However, a subspace with spin `j` has an additional

0 commit comments

Comments
 (0)