Unit cell with different types of sites

How do I use this algorithm? What does that parameter do?
Post Reply
daniel
Posts: 6
Joined: 21 Nov 2018, 16:14

Unit cell with different types of sites

Post by daniel »

Hi all,

I am building a Hamiltonian model with two different types of sites: one type is located on the vertices of a one-dimensional lattice and the other one is located on the links, similarly to lattice gauge theory models. To do this, I implement a lattice with a unit cell formed by two sites, containing one vertex and one link:

Code: Select all

boson_site = BosonSite(Nmax=n_max, conserve='N', filling=filling)
spin_site = SpinHalfSite(None)
lat = Lattice([L], [boson_site, spin_site], bc=bc, bc_MPS=bc_MPS)
After that I use MultiCouplingModel to build all the interactions. The problem comes when I try calling MPOModel. If I choose not to conserve the total particle number for bosons the code works fine. However, if I try to conserve it I get an error related to the charges of the tensor. This does not occur if both sites are of the same type, so the problem comes from the fact that I have two different sites that conserve different quantities. I know that if you want to use GroupedSite in a similar situation, I can impose charge conservation independently on each site. Is there anything similar I could do here?

Thank you in advance,
Daniel
User avatar
Johannes
Site Admin
Posts: 413
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: Unit cell with different types of sites

Post by Johannes »

That's a very good question, thanks for asking!

Each of the different Site classes get their own instance of the ChargeInfo class, but all the sites involved into one tensor network (e.g. a MPS or MPO) need to have the same ChargeInfo.
When you don't conserve the boson number, both sites agree by saying "don't conserve anything" in their ChargeInfo class, so everything is fine.
As soon as you put some non-trivial conserve to one of the sites, they suddenly disagree by producing different ChargeInfo Instances.
In your case, one is saying "preserve the Boson number" and the other says "don't preserve anything".

The function you need is tenpy.networks.site.multi_sites_combine_charges, in your case with the default second argument. Call this function right before initializing the lattice.

Even if you don't need the second argument, let me quickly comment on it. It's needed if you have charges which add up.
For example, say you have a SpinHalfFermionSite and a SpinSite, and the total spin is preserved, then you need to specify that the Spin of the SpinHalfFermionSite and the Spin of the SpinSite together are one charge (=the total spin), and possible the particle number of the SpinHalfFermionSite another charge.
daniel
Posts: 6
Joined: 21 Nov 2018, 16:14

Re: Unit cell with different types of sites

Post by daniel »

Hi,

I have a different but related issue with the implementation of the mentioned model. When I run dmrg I get stuck in the initial state I started with, which I get back as a solution (which is clearly wrong). I realized that this problem does not occur if, instead of starting with a product state where every boson site has a well defined particle number, each is a superposition of two different occupations. The problem is that this state has not a well defined total particle number, so I can not use this solution if I want to impose the symmetry. Is there a way, either buy starting with a different initial state or by other means, of avoiding this problem?

I checked and something similar happen even in a simpler model: consider the Bose-Hubbard Hamiltonian with next-nearest neighbor hopping (normal chain with single-site unit cell, only one type of site). If the nearest-neighbor hopping is set to zero, I also get stuck in the initial state. However, as soon as the latter is not zero, even if is very small, there is no problem at all. I wonder what might be the reason behind this and how one can solve it in general.

Thanks you in advance!

Best,
Daniel
User avatar
Johannes
Site Admin
Posts: 413
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: Unit cell with different types of sites

Post by Johannes »

This is actually a common problem that makes very much sense is comes from the fact that DMRG optimizes locally (just two sites at once) and the special initial state - product states are very special, having no entanglement at all...
People often say that DMRG is "stuck in a local minima"

You can understand what's going on analytically by considering the effective Hamiltonian, which is diagonalized:
Say you initalize the product state |0101010101> with half filling and want to optimize two sites in the center.
The effective Hamiltonian is the Hamiltonian projected on the current state except on the two sites to be optimized.
If \( H = \sum_{i} (a^\dagger_i a_{i+2} + h.c) + diagonal terms \), you can see the projection makes the off-diagonal terms disappear, because
each offdiagonal term of the Hamiltonian contains a site in the projected region (not being optimized), and there \(<0|a|0> = 0 = <1|a|1>\).
This means the effective Hamiltonian does not contain any of the offdiagonal terms and is already diagonalized, so your state does not get updated - it stays a product state.
As soon as you start from a state which has nonzero expectation value of \(a,a^\dagger\), this problem is avoided.
If you have a non-zero nearest-neighbor hopping, the hopping on the two optimized sites leads to a ground state there with a nonzero expectation value of \(a,a^\dagger\), so you also avoid the problem.

The general solution to this problem is to use the ominous "Mixer" in the DMRG, in the simplest case just by setting mixer=True in the DMRG parameters. The mixer "perturbs" the state you have by applying (parts of) the offdiagonal terms in the Hamlitonian to the state, helps to get out of the local minima and is switched off after a few sweeps. It was introduced by Steve White in arXiv:1805.00055.
Even when you have the nearest neighbor interaction, the mixer might help to get a better final ground state Energy, especially in models with long-range interactions.
daniel
Posts: 6
Joined: 21 Nov 2018, 16:14

Re: Unit cell with different types of sites

Post by daniel »

Thank you very much for the detailed answer. Everything works perfectly if I use the Mixer.
Post Reply