I would like to change the Bose-Hubbard Model such that in the first sum in can add \(\exp{(j*\pi*n_{i})}\), where ni is the number operator acting on the i site. How can I do this?
I was thinking about working on this part of the classe:
Python: Select all
def init_terms(self, model_params):
# 0) Read and set parameters.
t = model_params.get('t', 1., 'real_or_array')
U = model_params.get('U', 0., 'real_or_array')
V = model_params.get('V', 0., 'real_or_array')
mu = model_params.get('mu', 0, 'real_or_array')
phi_ext = model_params.get('phi_ext', None, 'real')
for u in range(len(self.lat.unit_cell)):
self.add_onsite(-mu - U / 2., u, 'N')
self.add_onsite(U / 2., u, 'NN')
for u1, u2, dx in self.lat.pairs['nearest_neighbors']:
if phi_ext is None:
hop =self.add_coupling(-t,dx,[0,expm(1j*np.pi*'N')])
else:
hop = self.coupling_strength_add_ext_flux(-t, dx, [0, 2 * np.pi * phi_ext])
self.add_coupling(hop, u1, 'Bd', u2, 'B', dx, plus_hc=True)
self.add_coupling(V, u1, 'N', u2, 'N', dx)