Skip to content
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

Open
guochu opened this issue Aug 9, 2021 · 5 comments
Open

more general catdomain and catcodomain? #54

guochu opened this issue Aug 9, 2021 · 5 comments

Comments

@guochu
Copy link

guochu commented Aug 9, 2021

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..

@Jutho
Copy link
Owner

Jutho commented Aug 10, 2021

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 TensorMap{ComplexSpace})? The current definition corresponds to taking the direct sum of the vector space on the domain / codomain. I think I understand what you want, but I am not sure and there might be different possibilities.

@guochu
Copy link
Author

guochu commented Aug 11, 2021

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 TensorMap{ComplexSpace})? The current definition corresponds to taking the direct sum of the vector space on the domain / codomain. I think I understand what you want, but I am not sure and there might be different possibilities.

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.
If you are too busy I could also try to implemented this function myself some time later, then I have to understand much deeper about the internal logic of TensorMap:), I guess this would take me quite a while:)
Anyway this package is so nice and thanks a lot for your effort!

@maartenvd
Copy link
Contributor

maartenvd commented Aug 11, 2021 via email

@guochu
Copy link
Author

guochu commented Aug 11, 2021

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).

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.)

@Jutho
Copy link
Owner

Jutho commented Aug 12, 2021

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). Catdomain and catcodomain are already not really scoring great on naming and clarity with respect to what they do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants