|
Hello all, I am currently implementing an optimization procedure for an MPS, where the loss function is written as `def loss(psi): works works for an individual calculation of the loss, but when running the optimizer
I could not find the problematic function but it's related to the application of .gate_split, since the rest of the loss function does not raise errors. Any way I can solve this issue? Thanks, Rafael |
Replies: 3 comments 5 replies
|
Hi @rafaeleb, you might be able to fix this by using a fixed |
|
Hi Johnnie, Thanks for the reply. The addition of the compression options did not fix the problem, but it looks like it can be avoided in my particular case by not using gate_split at all (the gates can be decomposed from the start). But it would be nice to know if the gate_split function can be modified is some way to agree with the jax optimizer backend. BR |
|
Hi! I am having a somewhat similar problem where I am trying to calculate the In my case, since I am not trying to JIT anything, it seems like there is a problem when calculating the gradient, as this returns all in I tried setting the Any leads would be very appreciated @jcmgray. I can also open a new issue if you reckon this is too different. |
Hi @rafaeleb, you might be able to fix this by using a fixed
max_bondandcutoff=0.0in the gate_split function. The problem currently is that the shape of the traced computational graph depends on the cutoff. Also, you should be able to usetorchwhich doesn't require a fixed computational graph.