You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/sumspaces.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,22 +6,21 @@ These spaces are a natural extension of the `TensorKit` vector spaces, and you c
6
6
### `SumSpace`
7
7
8
8
In `BlockTensorKit`, we provide a type `SumSpace` that allows you to define such direct sums.
9
-
They can be defined either directly via the constructor, or by using the `⊕` operator.
9
+
They can be defined either directly via the constructor, or by using the `⊞` (`\boxplus<TAB>`) operator.
10
10
In order for the direct sum to be wll-defined, all components must have the same value of `isdual`.
11
11
12
12
Essentially, that is all there is to it, and you can now use these `SumSpace` objects much in the same way as you would use an `IndexSpace` object in `TensorKit`.
13
13
In particular, it adheres to the interface of `ElementarySpace`, which means that you can query the properties as you would expect.
14
14
15
15
!!! note
16
16
17
-
The operator `⊕` is used in both TensorKit and BlockTensorKit, and therefore it must be explicitly imported to avoid name clashes.
18
-
Both functions achieve almost the same thing, as `BlockTensorKit.⊕` can be thought of as a _lazy_ version of `TensorKit.⊕`.
17
+
The notion of a direct sum of vector spaces is used in both TensorKit (`⊕` or `oplus`) and BlockTensorKit (`⊞` or `boxplus`).
18
+
Both functions achieve almost the same thing, and `BlockTensorKit.⊞` can be thought of as a _lazy_ version of `TensorKit.⊕`.
19
19
20
20
```@repl sumspaces
21
21
using TensorKit, BlockTensorKit
22
-
using BlockTensorKit: ⊕
23
-
V = ℂ^1 ⊕ ℂ^2 ⊕ ℂ^3
24
-
ℂ^2 ⊕ (ℂ^2)' ⊕ ℂ^2 # error
22
+
V = ℂ^1 ⊞ ℂ^2 ⊞ ℂ^3
23
+
ℂ^2 ⊞ (ℂ^2)' ⊞ ℂ^2 # error
25
24
dim(V)
26
25
isdual(V)
27
26
isdual(V')
@@ -43,7 +42,7 @@ Because these objects are naturally `ElementarySpace` objects, they can be used
43
42
Additionally, when mixing spaces and their sumspaces, all components are promoted to `SumSpace` instances.
0 commit comments