## Superposition of MPS with different total charge

How do I use this algorithm? What does that parameter do?
Qottmann
Posts: 13
Joined: 27 Mar 2019, 09:11
Location: ICFO Barcelona

### Superposition of MPS with different total charge

Hi,
is there a way to use

Code: Select all

MPS.add(other,alpha,beta)
for two MPS that have different total charge?
I guess a brute force workaround would be to obtain the full matrices via get_B() (with all unnecessary 0s) and then create a new "empty" state and set_B(). Is there a direct way?

I actually have no idea how superpositions of MPS are constructed in the first place. Can somebody give a hand-waving explanation or refer me to the literature? I didnt get it directly from the source code of MPS.add().

Best regards,
Korbinian

edit:
For anyone else looking for a workaround in the meantime, this should work:
This is for a Bosonic chain, psis is a list [psi0, psi1] of two MPS with different total charge.
There is probably an easier way without constructing a model just to get its site structure.

Code: Select all

model_params = dict(
conserve = None)
M = BoseHubbardChain(model_params)  # depending on what model you want put respective parameters, just important to put the following,

for j,psi in enumerate(psis):
Bs = [psi.get_B(i=i).transpose(['p', 'vL', 'vR']).to_ndarray() for i in range(psi.L)]
psi_t = MPS.from_Bflat(M.lat.mps_sites(), Bs) # expects shape (physical, vL, vR), hence the transpose in the previous line
psi_t.canonical_form() # re-calculate bonds
psis[j] = psi_t
Now you can

Code: Select all

psis[0].add(other = psis[1], alpha=1, beta=1)
EDIT 2 by Johannes:
transpose using labels before converting to numpy array

Johannes
Posts: 177
Joined: 21 Jul 2018, 12:52
Location: UC Berkeley

### Re: Superposition of MPS with different total charge

May I ask why you want to create a superposition in the first place?
Just for measurements? I don't really see a point for that.
Or continuing some algorithm with another model which doesn't have the charge conservation? That would be more reasonable.

Schollwoeck's 2011 review ("DMRG in the age of MPS", arXiv:1008.3477 has a very short section (4.3) on it.
It talks about periodic MPS (where the trace of the matrices is taken), but the idea is generic:
use the matrices of the individual MPS as blocks on the diagonal for the summed MPS.
For finite MPS, you need to take special care of the very left and right tensors, and you can absorb the prefactors there.

For infinite MPS, you generically want to avoid it, because it results in the transfer matrix having two eigenvectors with eigenvalue 1; that's the very definition of a "cat" state.

Dropping charges (if you have multiple conserved quantities, possibly only one of them) is indeed a bit awkward right now.
You can drop_charge for an Array, and also for sites change_charge,
but it's a bit complicated to make everything work. Your "hack" is the easiest solution right now.

Johannes
Posts: 177
Joined: 21 Jul 2018, 12:52
Location: UC Berkeley

### Re: Superposition of MPS with different total charge

(I took the freedom to slightly edit your suggested code.)

Qottmann
Posts: 13
Joined: 27 Mar 2019, 09:11
Location: ICFO Barcelona

### Re: Superposition of MPS with different total charge

Thanks for the answer, that helped a lot (as always!)

Concerning your question why one would want to do that:
I'm trying to compare ground states for a certain filling via chemical potential and via symmetry. In the case of fixing the symmetry we obtained a funny pattern in the entanglement spectrum, but that does not appear when approaching that filling via chemical potential. I wanted to check if that can be explained by the fact that the state from chemical potential is a superposition of several total charges. So I want to take some of the fixed charge states and superpose them and see what happens. This is super hand-wavy and heuristic but already from simple equal superpositions I can see that the patterns palm off.

Johannes