ITensor / ITensor

A C++ library for efficient tensor network calculations
http://itensor.org
Apache License 2.0
366 stars 161 forks source link

Z3 IQTensor with AutoMPO #157

Open valbert4 opened 6 years ago

valbert4 commented 6 years ago

Hi Miles,

Thanks for maintaining such a useful program and, judging by the other forum entries, being so responsive!

We have been trying to re-implement a Z3 Potts chain and run into trouble when initializing the MPO the naive way, i.e., running AutoMPO using the Z3 SiteSet. Namely, running the simple script below crashes at the last step with the error IQIndex does not contain given QN block.:

#include "itensor/all.h" using namespace itensor; int main() { int N = 6; auto sites = Z3(N); //make a chain of N spin 1's auto ampo = AutoMPO(sites); //for(int j = 1; j < N; ++j) { // ampo += -1.0,"TauDag",j,"Tau",j+1; // ampo += -1.0,"Tau",j,"TauDag",j+1; // } for(int j = 1; j < N+1; ++j) { ampo += -1.0,"Sig",j; ampo += -1.0,"SigDag",j; } auto H = IQMPO(ampo); }

Note that if I uncomment the TauDag*Tau part, which is diagonal, and comment out the Sig part, it works. Since Sig is only flux-preserving if its QN is calculated modulo 3, I suspect the issue is that the modulo 3 behavior is not happening in AutoMPO. (If there is no mod 3 evaluation, the three nonzero entries of Sig have fluxes -1, -1, and 2.) We are currently working on manually putting in the Hamiltonian and I think that should be a workaround (since it was done earlier by Adam Jermyn), but we are not yet done with that.

Best, Victor

emstoudenmire commented 6 years ago

Hi Victor, So if I'm thinking about this right, the operators you are summing don't conserve "triality" (quantum number mod 3) even when you do correctly account for the mod 3 arithmetic. But I see that you are summing "Sig" and "SigDag" both together, which would conserve triality.

So this may be a bug (sort of) in AutoMPO where it is looking at each operator separately, and not considering that they will be summed. So I'll leave it open as a bug report, but for now as a workaround can you modify your local copy of Z3 to define a new operator which just has the matrix elements that would result from adding Sig+SigDag on a single site? That ought to work and give you the Hamiltonian you need -

valbert4 commented 6 years ago

Hi Miles, Thank you for the reply. Sorry for not being clear: triality is an e-value of an operator consisting of a product of Sig matrices over the whole 1D lattice. So Sig and SigDag both preserve it. The product Tau*TauDag also preserves it. So everything should work out of box as I see it.

emstoudenmire commented 6 years ago

Hi Victor, I don’t have the code in front of me right now but I think that the definition of Sig and Tau in ITensor may be different from the one you are thinking of. Please check, but I believe the ITensor operators are defined in the basis in which Tau is diagonal. So then perhaps if you just exchange Sig and Tau then things may work like you expect.

On Sun, Jun 17, 2018 at 12:29 PM Victor V. Albert notifications@github.com wrote:

Hi Miles, Thank you for the reply. Sorry for not being clear: triality is an e-value of an operator consisting of a product of Sig matrices over the whole 1D lattice. So Sig and SigDag both preserve it. The product Tau*TauDag also preserves it. So everything should work out of box as I see it.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/ITensor/ITensor/issues/157#issuecomment-397890299, or mute the thread https://github.com/notifications/unsubscribe-auth/AA6dxaXMRo_Y1JvvhfJSgu5fTyPW9T2Sks5t9oP0gaJpZM4UjhIx .

-- -=Miles Stoudenmire=- miles.stoudenmire@gmail.com mstoudenmire@flatironinstitute.org http://itensor.org/miles/

valbert4 commented 6 years ago

Thanks! This worked.