Hi there,
I'm new at using openMPS, and I'm trying to run a simulation for the Bose Hubbard model in the presence of a harmonic trap (that is, a site dependent potential combined with the number operator acting on all sites).
I've seen that the MPOTerm FiniteFunction has a similar purpose, but it seems to accept only a pair of operators as entry, and acts on more than one site simultaneously. Is there a specific operator function I could use, or a way to work around this problem with the options found in the instructions page?
Cheers,
Rafael
Hello Rafael,
The trapping potential is a local term acting on each site of the potential; thus, its implementation in openMPS is similar to the on-site interaction:
1) Add an additional 'site' term in the Hamiltonian. The operator is nbtotal (assuming you have a single species of bosons.)
2) Remember the hparam string of this term, let's say it is hparam='trap'.
3) We have to define the value of the trapping potential for each site in the optical lattice. We define the xgrid (xgrid = np.linspace(- ll / 2.0, ll / 2.0, ll), where ll is the number of sites. Then, you can calculate the values of your trapping potentials as trappot = 0.05 * xgrid * xgrid for an harmonic trapping potential. 0.05 is just an example.
4) At some point of the example files, you add an additional key to the simulation dictionary, i.e., 'trap' : trappot. openMPS detects automatically that you pass an array of values and creates a site-dependent Hamiltonian.
Let me know if you need more detailed instruction for the trapping potential.
Best regards,
Daniel
P.S. The FiniteFunction term would help you to encode a tunneling of bosons beyond the nearest-neighbor in the Bose-Hubbard model.
Hello Daniel,
Thank you again for the answer. It works very nicely!
Best regards,
Rafael