diff --git a/docs/source/hubbard_1d.md b/docs/source/hubbard_1d.md index 48cd9773edf7b4bd3a8a3403b1712bbde19f91a6..3508a894496334d761894c78c8968b38b33b1490 100644 --- a/docs/source/hubbard_1d.md +++ b/docs/source/hubbard_1d.md @@ -42,7 +42,7 @@ We verify this tight-binding model by plotting the band structure and observing # Set number of k-points nk = 100 ks = np.linspace(0, 2*np.pi, nk, endpoint=False) -hamiltonians_0 = pymf.tb_to_khamvector(h_0, nk, 1, ks=ks) +hamiltonians_0 = pymf.tb_to_khamvector(h_0, nk, ks=ks) vals, vecs = np.linalg.eigh(hamiltonians_0) plt.plot(ks, vals, c="k") @@ -69,12 +69,14 @@ $$ This is simply constructed by writing: ```{code-cell} ipython3 +U=0.5 h_int = {(0,): U * np.kron(np.ones((2, 2)), np.eye(2)),} ``` In order to find a meanfield solution, we combine the non interacting Hamiltonian with the interaction Hamiltonian and the relevant filling into a `Model` object. We then generate a starting guess for the meanfield solution and solve the model using the `solver` function. It is important to note that the guess will influence the possible solutions which the `solver` can find in the meanfield procedure. The `generate_guess` function generates a random Hermitian tight-binding dictionary, with the keys provided as hopping vectors and the values of the size as specified. ```{code-cell} ipython3 +filling = 2 full_model = pymf.Model(h_0, h_int, filling) guess = pymf.generate_guess(frozenset(h_int), ndof=4) mf_sol = pymf.solver(full_model, guess, nk=nk) diff --git a/docs/source/index.md b/docs/source/index.md index 19853c7ac49277dc216a0401ce3d77cb2bf6febe..7a6ab196e0673d384b3baf072e6a77521ce54687 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -20,6 +20,7 @@ kernelspec: mf_notes.md graphene_example.md +hubbard_1d.md ``` ## What is pymf?