perm parameter in compute_K function

How do I use this algorithm? What does that parameter do?
Post Reply
bart
Posts: 26
Joined: 23 Jan 2019, 09:35

perm parameter in compute_K function

Post by bart »

What is the correct way to define perm in the compute_K function?

I know that the wave function should be invariant under the rotation/permutation and so I need to check that the ov returned by compute_K is close to one. However, I am not sure how to define the correct permutation.

e.g. for an initial 3x3 Neel product state unit cell in the 2D iDMRG, with a default ordering
Does this correspond to the identity?

Code: Select all

psi.compute_K(perm=[0, 1, 2, 3, 4, 5, 6, 7, 8])
The documentation states that "If a lattice is given, we use it to read out the lattice structure and shift each site by one lattice-vector in y-direction".

Can you give a lattice like this?

Code: Select all

model_params = dict(cons_N='N', cons_Sz='Sz', t=t, U=U, mu=mu, V=V, lattice="Square",
                bc_MPS='infinite', order='default', Lx=3, Ly=3, bc_y='cylinder', verbose=0)
M = FermionicHubbardModel(model_params)
psi.compute_K(perm=M.lat)
Does the documentation mean shifting the chain by one site, like this...

Code: Select all

psi.compute_K(perm=[8, 0, 1, 2, 3, 4, 5, 6, 7])
...or literally shifting the labels in the unit cell by one in the y-direction...

Code: Select all

psi.compute_K(perm=[2, 0, 1, 5, 3, 4, 8, 6, 7])
...or something else entirely? Occasionally the wave function is invariant under the permutations that I choose, but I can't see any pattern to it yet. Any clarifications would be greatly appreciated :)
User avatar
Johannes
Site Admin
Posts: 413
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: perm parameter in compute_K function

Post by Johannes »

The correct permutation depends on the lattice you choose, and possibly on the "order" argument of that lattice.
Yes, you should simply call it like

Code: Select all

psi.compute_K(perm=M.lat)  # where M is your model
to automatically figure out the "correct" permuation. This permutation will correspond to applying a "translation operator in y-direction" to the lattice,
e.g. on a square lattice with 3x3 sites, the permuation will be [1 2 0 4 5 3 7 8 6] (enable verbose=2 in compute_K to print it)

Your last suggestion is equivalent to this, but shifted in the other direction (which is a matter of convention, I guess).

The permuation [8, 0, 1, 2, 3, 4, 5, 6, 7] does not make sense because you don't expect the state to be invariant under it - it's not a symmetry of the hamiltonian!
bart
Posts: 26
Joined: 23 Jan 2019, 09:35

Re: perm parameter in compute_K function

Post by bart »

Thank you for the clarification! :) In that case, I will use the following:

Code: Select all

psi.compute_K(perm=M.lat)  # where M is your model
Thank you for explaining how this works, and for the "verbose=2" tip to check that everything is being permuted as it should.
Post Reply