0 votes
asked by (120 points)

Hello,
I'm trying to to TEBD on a Hamiltonian that involves six-site terms of spin 1/2's. To accommodate this I first tried defining a new SiteSet that grouped the spins into sets of three, so the onsite Hilbert space is 8-dimensional. But doing this created a segmentation fault in my code; I suspected that it had something to do with the fluxes of the MPO's and the way I defined quantum numbers. I then tried turning the IQTensors and IQIndexes to ITensors and Indexes in the SiteSet definition but it seems the quantum numbers are necessary for some of the code. So I switched my basis from three sets of spin 1/2's to clock variables, which I know don't have the issue with the fluxes. But that also threw a segmentation fault: running the debug gave this error:

terminate called after throwing an instance of 'itensor::ITError'
what(): doTask not defined for task Contract and storage types QMixed QMixed
Aborted (core dumped)

My question is this: is there a way to define a SiteSet that represents three spin 1/2's where the operators have well defined quantum number flux? Also, what's happening with the last error with the clock variables?

Thanks in advance,
Aaron

commented by (70.1k points)
Hi Aaron,
Before answering the question about making a new site set, is there a reason you don't want to use the SpinHalf site set and just create a Hamiltonian with six-site terms? AutoMPO should support the Hamiltonian you are trying to create. Keeping the different spins on separate sites should also make the DMRG much faster, since it would only have to deal with two spins at a time, rather than two 8-dimensional sites at a time.
commented by (120 points)
Hi Miles,
I'm trying to time evolve with respect to a binary drive, so I'm not sure how to use DMRG to handle that situation.  If I could, that would be great.  So I'm using TEBD instead, with the toExpH commands (or the BondGate sample code you've provided) and it seems they aren't compatible for terms that exist on more than two sites.
Thanks,
Aaron
commented by (70.1k points)
Hi Aaron,
I see, that's helpful. Yes unfortunately the toExpH feature of AutoMPO doesn't currently support more that two-site operators though this is something we should be able to support in the future when I have time, or the new programmer joining me this fall has time to work on it and test it. If you're up for it, maybe it's even a feature you'd like to work on? I could answer any questions you may have & I'd feature a photo of you on the ITensor website and write up a news article about it.

But for now I think your approach of working with 8-dimensional sites sounds like the way to go. I think the error you got about QMixed is probably unrelated to the type of sites you are trying to make - I'll post an answer about that below. Even though the question will then be "answered", feel free to ask more questions by commenting if you are still running into problems with your custom site set.

Miles
commented by (70.1k points)
Hi Aaron,
Another approach which I should have mentioned: for time evolving with complicated Hamiltonians, you can use the approach now called "TDVP" but which also is discussed in I think a simpler way in these two papers:

https://arxiv.org/abs/cond-mat/0502475

https://arxiv.org/abs/1706.09537

At some point maybe we'll put this method into ITensor, but for the moment we don't have an implementation readily available.
commented by (120 points)
Hi Miles,
Thanks for the suggestion - I'll definitely look into it.  I got the three sites to work; it was just a mistake in how I defined the quantum numbers.
-Aaron

1 Answer

0 votes
answered by (70.1k points)

Please see the comment discussion above -

Specifically regarding the "QMixed" error, that's an error which occurs when trying to make an IQTensor (usually an operator returned from the .op method of a site set) which would violate the QN symmetry in the sense of not having a well defined QN "flux" (http://itensor.org/docs.cgi?page=book/block_sparse). The purpose of QMixed storage is to "smuggle" an ITensor (non-QN-conserving) out of a function that only returns IQTensors. It's kind of an ugly workaround and we are planning to fix the design issue that led to it a different way in the future.

So then there are probably two things causing the error you're seeing:
1. you are making an IQTensor (operator) which doesn't conserve the quantum numbers it needs to. For example, you are trying to make the operator Sx as an IQTensor in a context where total Sz is conserved (solution: use S+ and S- instead).
2. you are working in a context where you aren't conserving any quantum numbers, in which case you need to convert the IQTensor with QMixed storage to a regular ITensor before using it.

If you're making a custom site set, please follow the pattern used to make operators such as Sz, S+, and S- in spinhalf.h for making most of your (QN conserving) operators, not the pattern for making operators such as Sx or Sy which are special cases.

Miles

Welcome to ITensor Support Q&A, where you can ask questions and receive answers from other members of the community.

Formatting Tips:
  • To format code, indent by four spaces
  • To format inline LaTeX, surround it by @@ on both sides
  • To format LaTeX on its own line, surround it by $$ above and below
  • For LaTeX, it may be necessary to backslash-escape underscore characters to obtain proper formatting. So for example writing \sum\_i to represent a sum over i.
If you cannot register due to firewall issues (e.g. you cannot see the capcha box) please email Miles Stoudenmire to ask for an account.

To report ITensor bugs, please use the issue tracker.

Categories

...