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

Blocking and Polar Decomposition using quimb's builtin function #234

Open
ACE07-Sev opened this issue May 26, 2024 · 3 comments
Open

Blocking and Polar Decomposition using quimb's builtin function #234

ACE07-Sev opened this issue May 26, 2024 · 3 comments
Labels

Comments

@ACE07-Sev
Copy link

What is your issue?

Greetings Johnnie!

Hope you are doing well sir. I am dropping by to ask three questions:

  1. How to block q sites together?
  2. How to implement polar decomposition which would return the list of isometries V and positive semidefinite matrix P?
  3. How to find the fixed-point from P from (2)?

So first we start with an MPS in canonical form and block q sites together like so
image

And then perform a polar decomposition on each blocked site (so I imagine this would have to be an iterative process on qtn.MatrixProductState?), and then from there we find the fixed-point
image

Here is the pipeline:

  1. Block q sites in the MPS A together using the Einsum function of tensors to get MPS B.
  2. Perform a polar decomposition on the blocked up MPS B to retrieve the isometries V and positive semidefinite matrix P.
  3. Use variational algorithm to find a unitary matrix that approximates the total P.
  4. Put V and unitary approximation of P back together to get the overall unitary.

I highly doubt (3) is available through a variational approach, so any available approaches which are used in practice are appreciated.

Are any of these currently available through quimb?

@jcmgray
Copy link
Owner

jcmgray commented May 26, 2024

Hi @ACE07-Sev,

Here is the code to do the first two things to get you started:

import quimb.tensor as qtn

mps = qtn.MPS_rand_state(10, 7)

block = [4, 5, 6, 7]

# contract those tensors
mps ^= (mps.site_tag(i) for i in block)
mps.draw(mps.site_tags)

image

# split the new block tensor
mps.split_tensor(
    tags=mps.site_tag(block[0]), 
    left_inds=[mps.site_ind(i) for i in block],
    method="polar_right",
    ltags="V",
    rtags="P",
)

mps.draw(['V', 'P'])

image

But I don't really understand what the task is for point 3 sorry. If its something that can't be done by direct decomposition a la polar, then you could look at this example https://quimb.readthedocs.io/en/latest/tensor-optimization.html#optimizing-ptensor-objects for an gradient optimization constrained to isometric / unitary form.

@ACE07-Sev
Copy link
Author

Greetings dear Johnnie,

Hope you are well. Immense thanks for the prompt response!

I imagined so. It seems like a rather specialized function. I can send the paper reference here; however, I understand it will be too time-consuming to review. It's explained in Appendix 4.
https://arxiv.org/pdf/2307.01696

So, the way I understand it is that given the Ps for each block, we get the state $\ket {\phi}$, which is the overall red boxes
image

This $\ket{\phi}$ is then passed to the variational algorithm to generate the blue connectors, which are referred to as fixed points. We then apply the fixed points between the isometries, giving the overall form
image

@ACE07-Sev
Copy link
Author

Also, thank you so so much for the kind guidance!

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

No branches or pull requests

2 participants