Hi folks,
I’m wondering if I’m doing something wrong because I’m getting different results from the Fermi-Hubbard Dataset and the qml.spin.fermi_hubbard() function for what I thought was the same model. I am trying to compare the 1D Fermi-Hubbard model with 4 sites (1x4) and open boundary conditions (and standard first nearest-neighbour and JW transform). The Hamiltonians I end up with seem different. I am comparing the plots of the gs energies vs repulsions values.
Code/plot from from the Dataset (same result if you diagonalize data.hamiltonians or use data.ground_energies directly)
FH_datasets= qml.data.load("qspin", sysname = "FermiHubbard", periodicity = "open", lattice = "chain", layout = "1x4")
data = FH_datasets[0]
hopping = data.parameters['t']
repulsion_values = data.parameters['U']
plt.plot(repulsion_values, data.ground_energies, '-o')
plt.xlabel('U/t')
plt.ylabel('GS energy')
Code/plot from from the qml.spin.fermi_hubbard() hamiltonian (using the same repulsion values U as above )
gs_arr = []
n_sites = 4
for u in repulsion_values:
spin_ham = qml.spin.fermi_hubbard("chain", [n_sites], hopping = 1.0, coulomb = u)
spectrum = spin_ham.eigvals()
gs_energy = spectrum[0]
gs_arr.append(gs_energy)
plt.plot(repulsion_values, gs_arr, '-o')
plt.xlabel('U/t')
plt.ylabel('GS energy')
Any subtleties I’m missing in how the models are defined?
Thanks!