-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more general catdomain and catcodomain? #54
Comments
I am certainly open to suggestions, but how would you like this to work or look like, even for the case of a tensor without symmetries (i.e. an object of type |
In case of dense array, it simply goes to the function cat(a, b; dims). For example size(a) = (2,2,3) and size(b) = (2,3,2), then c = cat(a, b; dims=(2,3)) will put the 2 and 3-th dimensions in a block-diagonal way, as a result size(c) = (2,5,5). This function is in need if one wants to implement MPS additions, for example, in which case one would "cat" the two auxiliary. However the current implementation in TensorKit assumes that the only axes been concatenated. |
The way I used to implement mps+mps (apparantly I removed this method, I
don't know why), was to explicitly construct the embedding maps (new_space
<- old_space_1) and (new_space <- old_space_2). These maps will be site
dependent, and your code would then look a bit like:
```
embedders1 = [...];
embedders2 = [...];
for i in 1:len
@tensor new_tensor[i][-1 -2;-3] := embedders1[i][-1,1]
*mps_tensor_1[i][1,-2,2]*conj(embedders1[i+1][-3,2]) + embedders2[i][-1,1]
*mps_tensor_2[i][1,-2,2]*conj(embedders2[i+1][-3,2])
end
```
|
This seems to be an equivalent way around. Thanks for you kind reply! (I used to follow the approach as Eqs.(6,7,8) of this work.) |
Maybe the construction with the embedding is actually the easiest way also to provide an actual implementation. I often find the most difficult question to be the name and interface for a given functionality (not the actual implementation). |
Is it possible to support more general catdomain and catcodomain? Current only one axes and be concatenated, however to support MPS/MPO addition one has to concatenate two axes..
The text was updated successfully, but these errors were encountered: