Page 1 of 1

### Superposition of MPS with different total charge

Posted: 16 Jun 2020, 14:30
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

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

Posted: 16 Jun 2020, 17:49
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.

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

Posted: 16 Jun 2020, 17:53
(I took the freedom to slightly edit your suggested code.)

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

Posted: 17 Jun 2020, 12:59
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.

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

Posted: 17 Jun 2020, 20:03
To detect whether you have cat state, you should look at the eigenvalues of the transfermatrix, whether you get two eigenvalues exactly 1.

If the ground state is a stripe, charge conservation can force it into superpositions.

For that reason, I would also highly recommend to try using a larger (doubled/tripled) MPS unit cell with charge conservation in that case.
In other words, increase L (or for 2D lattice, Lx) by a factor of 2, 3, or even more, and just rerun DMRG.