ITensor / ITensors.jl

A Julia library for efficient tensor computations and tensor network calculations
https://itensor.org
Apache License 2.0
539 stars 123 forks source link

Add QNs to site sets #177

Closed emstoudenmire closed 4 years ago

emstoudenmire commented 4 years ago

Analogous to the C++ version, we need to upgrade the siteinds function to return site sets with QNs by default. Perhaps best to do this after QN factorizations (e.g. SVD) and AutoMPO are implemented.

mtfishman commented 4 years ago

I was thinking that maybe when we add this feature, we could change the functionality so that no QNs are used by default. I found that it wasn't always obvious when it made sense to have QNs on by default (for example, for SpinHalf, sometimes it can be useful to conserve the parity of Sz but sometimes not, like for the transverse field Ising model). Also, it is not always obvious which QNs should be the default ones. Having them off by default avoids this issue, and it is not so much work to be explicit about it.

emstoudenmire commented 4 years ago

I’ve been going back and forth about this in the past, and I think it’s good you’ve identified a clear rationale for why we should make this change, which is that in many cases there isn’t such a clear default set of QNs. And there are other reasons too, such as not pushing advanced features on users just starting out with the library.

emstoudenmire commented 4 years ago

Finished implementing this in 74c22d00d0bb52f253104471fc8a47278c9d9dbd recently