Preparing state with specified particle filling

How do I use this algorithm? What does that parameter do?
Post Reply
rdilip
Posts: 4
Joined: 03 Dec 2019, 12:42

Preparing state with specified particle filling

Post by rdilip »

Hi all,

I'm interested in properties of a state in the Bose Hubbard model at different values of the chemical potential. To speed up the computation, my thought was to set the chemical potential, run dmrg and find the ground state, read out the expected filling, then construct a new state with that filling and turn on particle number conservation. This only works if conserve = None, though. If conserve = "N", then the expectation value of the particle number is always 0.0 at each site (the below code replicates what I'm talking about; if you change conserve = None on the first line, then the filling is 0.5. Is there a way to, once I know the particle number corresponding to a certain chemical potential, shift to particle number conservation to speed up programs?

Code: Select all

M = BoseHubbardModel(dict(n_max=1, L = 4, conserve = "N"))
localwf = np.array([1.0,1.0])
localwf = localwf / np.linalg.norm(localwf)
pstate = [localwf] * 4
psi = MPS.from_product_state(M.lat.mps_sites(), pstate, M.lat.bc_MPS)
print(psi.expectation_value("N"))

User avatar
Johannes
Site Admin
Posts: 135
Joined: 21 Jul 2018, 12:52
Location: UC Berkeley

Re: Preparing state with specified particle filling

Post by Johannes »

If you run the code with conserve='N', you should get a UserWarning

Code: Select all

tenpy/networks/mps.py:396: UserWarning: flat array has non-zero entries in blocks incompatible with charge
  B = npc.Array.from_ndarray(B, legs, dtype)
The reason is that for conserve='N', each tensor needs to have a well defined charge.
You write down an initial state which is a superposition of 0, 1, 2,3, or 4 particles! The code doesn't know which sector you want and just projects into the first one it finds (which is the one with 0 particles).

Try to write down a product state with a well-defined particle number instead, e.g.

Code: Select all

unit_filling = ['1'] * 4
psi = MPS.from_product_state(M.lat.mps_sites(), unit_filling, M.lat.bc_MPS)
For "half filling" you could write e.g.

Code: Select all

half_filling = ['1', '0', '1', '0']
psi = MPS.from_product_state(M.lat.mps_sites(), unit_filling, M.lat.bc_MPS)
As a side note: you cannot write down an initial state with a non-integer filling in the total system and at the same time use charge conservation!

Does that answer your question?

rdilip
Posts: 4
Joined: 03 Dec 2019, 12:42

Re: Preparing state with specified particle filling

Post by rdilip »

That makes complete sense, thanks!

Post Reply