Mixed site set with U(1) symmetry

Hi,

Thanks for your support so far! I have a question about creating a mixed site set involving qubit and bosons. My Hamiltonian satisfies the excitation number conservation (or U(1) symmetry), e.g.,

H = a^\dagger\sigma + \sigma^\dagger a.

I am confused about how to construct the mixed site with the corresponding quantum number conservation. And I am not sure whether the code below could achieve the effect I want,

s = [ n==1 ? Index([QN()=>10]; tags="Qudit,Site,n=$n") : Index([QN()=>2]; tags="S=1/2,Site,n=$n")  for n in 1:N]

If there is an effective way, could it reduce the time evolution time compared to the condition without quantum number conservation?

Please let me know if you would like to see code for the full Hamiltonian. Thanks again for everything! I really appreciate it.

1 Like

Hi @ZhiguangLu,
Here is a recipe you can use to make the kind of sites you are asking for:

dim = 4
sites = [isodd(n) ? siteind("Boson"; dim, addtags="n=$n", conserve_qns=true) : Index([QN()=>2];tags="Qubit,Site,n=$n") for n=1:N]

Inside that code, if the site n is odd, I put a “Boson” site of dimension dim. I also turn on QN conservation and add the tag “n=$n” which lets us see which number site it is when printing it.

Then if the site n is even, I put a “Qubit” site, but here instead of calling siteind I do sort of a trick which is to put an empty QN() as you were trying, which lets this index work correctly with other QN Indices but not actually carry any real quantum numbers.

Please let me know if that works for you. Also, yes, I would guess it could speed up your calculations, but it depends on many details so you’d have to just try it and see.

1 Like

@miles Thanks for your reply. However, it does not work when I construct a gate. The code is

hj = op("a",s1) * op("S+",sj) + op("a†",s1) * op("S-",sj);
Gj = exp(-1.0im * 0.01/2 * hj);

and the error reason is

ERROR: exp currently supports only block-diagonal matrices

That error message is not so helpful, but here is what is going on. The exp function only works for QN-conserving ITensors which conserve the quantum numbers, meaning in your case they have to keep the particle number the same.

But your hj operator has one term that lowers the number of particles and a second that raises it. So actually, apart from not being something our system can exponentiate, it is actually not a “valid” QN ITensor. For our system to work, we require each QN ITensor to have a well-defined QN “flux”, meaning that it changes the quantum numbers by a well defined value when contracted with other tensors. But your hj has a kind of “mixed flux” i.e. not a well-defined flux since it is a sum of two operators with a different flux.

If you are evolving by this operator, then it might mean that the dynamics of your system actually does not conserve particle number. Is that the case? If that is the case, then you will not be able to use the quantum number system.

Actually, the Hamiltonian is the excitation number conservation, so the dynamics of my system as a
whole conserve the excitation number. This point is very apparent, and the conservative quantity is

$$N=a^\dagger a+\sigma^\dagger \sigma $$

So, does ITensors cannot deal with this conservative quantity?

If your Hamiltonian does conserve a certain quantum number (in your case, excitation number) then yes ITensor can deal with this conserved quantity.

So then my question back to you is: what is the operator hj? It cannot be a term in your Hamiltonian since it does not conserve excitation number. So where did that operator come from and what is your goal or purpose in exponentiating it?