How to set a cutoff to the maximum occupancy of bose site type in ITensor.jl

Dear all,
Recently I switched my ITensor from C++ version to Julia version. In C++ version I defined the SiteType as sites = Boson(L, {"MaxOcc=", n, "ConserveQNs", true, "ConserveNb", false}) to make a cutoff on the maximum occupation to reduce the dimension.
In Julia version I haven’t found such a setting for the cutoff from the guidance. I am wondering if there is a similar embedded commands for the maximum occupancy setting in Julia version? Or how could I set such a cutoff?
Think you so much for your nice work and support.

1 Like

I believe the equivalent of

sites = Boson(L, {"MaxOcc=", n, "ConserveQNs", true, "ConserveNb", false})

is

sites = siteinds("Boson",L; dim=n, conserve_qns=true, conserve_number=false)

with dim being the maximum occupation.
Note that there are no conserved QNs with conserve_qns=true, conserve_number=false

1 Like

Dear ryanlevy,
Thank you so much for your reply. I try it and it works.
I used to think that dim is the maximum bond dimension… Sorry for my misunderstand…

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.