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
I'd like to be able to create a MPS that groups together multiple physical indices onto one site. For example, say I have 3 spin 1/2 systems that I'd like to group together on a single site. Currently, I can group them together onto a single MPS site by letting the physical dimension of the site be = 8. Each site tensor looks like Tijk where the physical index j has dimension 8. I'd like to be able have each spin 1/2 be associated its own index so that each site tensor is Ti(lmn)k where l,m and n are each dimension 2. This would provide a significant computational speed up for my use case by letting me do a reduce-split type decomposition on each tensor where a site tensor under QR decompositon goes to Ti(lmn)k -> Qilm Rnk when I have operations that only act on index n of that tensor.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Yes this is very possible, though one might have to use slightly lower level methods - its not encapsulated in a particular class or algorithm etc. Here's an example for apply some pairwise gates:
importquimb.tensorasqtn# start with an MPSpsi=qtn.MPS_rand_state(21, 7, seed=0)
# define some groupsgroups= [range(i, i+3)foriinrange(0, psi.L, 3)]
# contract the groups into single tensorsforgroupingroups:
tags= [psi.site_tag(site) forsiteingroup]
psi ^= tagspsi.draw(psi.site_tags, show_inds=True)
# do an even and odd layer of pairwise gatesforlayerin [range(0, psi.L-1, 2), range(1, psi.L-1, 2)]:
foriinlayer:
# canonical gauge (lazily) around target sitessites= (i, i+1)
tags= [psi.site_tag(site) forsiteinsites]
psi.canonize_around_(tags, "any")
# apply a random unitaryG=qu.rand_uni(4)
psi.gate_(G, sites, contract="reduce-split")
psi.draw(psi.site_tags)
Other than contracting the initial tensors there's no specific grouped logic here, its all handled automatically by default.
Is your feature request related to a problem?
Cannot tell if this possible or not.
Describe the solution you'd like
I'd like to be able to create a MPS that groups together multiple physical indices onto one site. For example, say I have 3 spin 1/2 systems that I'd like to group together on a single site. Currently, I can group them together onto a single MPS site by letting the physical dimension of the site be = 8. Each site tensor looks like Tijk where the physical index j has dimension 8. I'd like to be able have each spin 1/2 be associated its own index so that each site tensor is Ti(lmn)k where l,m and n are each dimension 2. This would provide a significant computational speed up for my use case by letting me do a reduce-split type decomposition on each tensor where a site tensor under QR decompositon goes to Ti(lmn)k -> Qilm Rnk when I have operations that only act on index n of that tensor.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: