Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

5.2 Testing against ED - Hubbard on a ring

In this example we use the pyALF interface to run ALF with the Mz choice of Hubbard-Stratonovich transformation on a four site ring, at U/t=4U/t=4 and inverse temperature βt=2\beta t = 2. For this set of parameters, the exact internal energy reads:

⟨−t∑⟨i,j⟩,σc^i,σ†c^j,σ†+U∑i=1Nn^i,↑n^j,↓⟩=−1.47261997t\left\langle -t \sum_{\langle i,j\rangle, \sigma} \hat{c}_{i,\sigma}^{\dagger} \hat{c}_{j,\sigma}^{\phantom\dagger} + U \sum_{i=1}^{N} \hat{n}_{i,\uparrow}\hat{n}_{j,\downarrow} \right\rangle = -1.47261997 t

To reproduce this result we will have to carry out a systematic Δτt\Delta \tau t extrapolation keeping ΔτtLTrotter=2\Delta \tau t L_\text{Trotter} = 2 constant. Recall that the formulation of the auxiliary field QMC approach is based on the Trotter decomposition

e−Δτ(A^+B^)=e−ΔτA^/2e−ΔτB^e−ΔτA^/2+O(Δτ3)e^{ -\Delta \tau \left( \hat{A} + \hat{B} \right) } = e^{ -\Delta \tau \hat{A}/2} e^{ -\Delta \tau \hat{B} } e^{ -\Delta \tau \hat{A}/2} + \mathcal{O} \left (\Delta \tau^3\right)

The overall error produced by this approximation is of the order Δτ2\Delta \tau^2.

Bellow we go through the steps for performing this extrapolation: setting the simulation parameters, running it and analyzing the data.


1. Import Simulation class from the py_alf python module, which provides the interface with ALF, as well as mathematics and plotting packages:

Output
Checking out branch master
Your branch is up to date with 'origin/master'.
Already on 'master'

2. Create instances of Simulation, specifying the necessary parameters, in particular the different Δτ\Delta \tau values:

Output
dtau values used:
0.05
0.1
0.2

3. Compile ALF, downloading it first if not found locally. This may take a few minutes:

Output
Checking out branch master
Your branch is up to date with 'origin/master'.
Already on 'master'
Compiling ALF... 
Cleaning up Prog/
Cleaning up Libraries/
Cleaning up Analysis/
Compiling Libraries
entanglement_mod.F90:35:2:

   35 | #warning "You are compiling entanglement without MPI. No Renyi entropy results possible, all other observables still work!"
      |  1~~~~~~
Warning: #warning "You are compiling entanglement without MPI. No Renyi entropy results possible, all other observables still work!" [-Wcpp]
ar: creating archive modules_90.a
ar: creating archive libqrref.a
Compiling Analysis
Compiling Program
Compiling program modules
Parsing Hamiltonian parameters
filenames: Hamiltonians/Hamiltonian_Kondo_smod.F90 Hamiltonians/Hamiltonian_Kondo_read_write_parameters.F90
filenames: Hamiltonians/Hamiltonian_Hubbard_smod.F90 Hamiltonians/Hamiltonian_Hubbard_read_write_parameters.F90
filenames: Hamiltonians/Hamiltonian_Hubbard_Plain_Vanilla_smod.F90 Hamiltonians/Hamiltonian_Hubbard_Plain_Vanilla_read_write_parameters.F90
filenames: Hamiltonians/Hamiltonian_tV_smod.F90 Hamiltonians/Hamiltonian_tV_read_write_parameters.F90
filenames: Hamiltonians/Hamiltonian_LRC_smod.F90 Hamiltonians/Hamiltonian_LRC_read_write_parameters.F90
filenames: Hamiltonians/Hamiltonian_Z2_Matter_smod.F90 Hamiltonians/Hamiltonian_Z2_Matter_read_write_parameters.F90
filenames: Hamiltonians/Hamiltonian_Spin_Peierls_smod.F90 Hamiltonians/Hamiltonian_Spin_Peierls_read_write_parameters.F90
Link program
Done.

4. Perform the simulations, as specified in each element of sim:

Output
Prepare directory "/Users/fassaad/Programs/ALF/ALF_Tutorial/jupyterbook/source/05-caveats/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_T=1.0_U=4.0_Tperp=0.0_beta=2.0_Dtau=0.05_Mz=True" for Monte Carlo run.
Create new directory.
Run /Users/fassaad/Programs/ALF/ALF/Prog/ALF.out
 ALF Copyright (C) 2016 - 2022 The ALF project contributors
 This Program comes with ABSOLUTELY NO WARRANTY; for details see license.GPL
 This is free software, and you are welcome to redistribute it under certain conditions.
 No initial configuration
 Setting N_FL = 2 since this is mandatory for Mz-Hubbard model
Prepare directory "/Users/fassaad/Programs/ALF/ALF_Tutorial/jupyterbook/source/05-caveats/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_T=1.0_U=4.0_Tperp=0.0_beta=2.0_Dtau=0.1_Mz=True" for Monte Carlo run.
Create new directory.
Run /Users/fassaad/Programs/ALF/ALF/Prog/ALF.out
 ALF Copyright (C) 2016 - 2022 The ALF project contributors
 This Program comes with ABSOLUTELY NO WARRANTY; for details see license.GPL
 This is free software, and you are welcome to redistribute it under certain conditions.
 No initial configuration
 Setting N_FL = 2 since this is mandatory for Mz-Hubbard model
Prepare directory "/Users/fassaad/Programs/ALF/ALF_Tutorial/jupyterbook/source/05-caveats/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_T=1.0_U=4.0_Tperp=0.0_beta=2.0_Dtau=0.2_Mz=True" for Monte Carlo run.
Create new directory.
Run /Users/fassaad/Programs/ALF/ALF/Prog/ALF.out
 ALF Copyright (C) 2016 - 2022 The ALF project contributors
 This Program comes with ABSOLUTELY NO WARRANTY; for details see license.GPL
 This is free software, and you are welcome to redistribute it under certain conditions.
 No initial configuration
 Setting N_FL = 2 since this is mandatory for Mz-Hubbard model

5. Calculate the internal energies:

Output
/Users/fassaad/Programs/ALF/ALF_Tutorial/jupyterbook/source/05-caveats/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_T=1.0_U=4.0_Tperp=0.0_beta=2.0_Dtau=0.05_Mz=True
### Analyzing /Users/fassaad/Programs/ALF/ALF_Tutorial/jupyterbook/source/05-caveats/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_T=1.0_U=4.0_Tperp=0.0_beta=2.0_Dtau=0.05_Mz=True ###
/Users/fassaad/Programs/ALF/ALF_Tutorial/jupyterbook/source/05-caveats
Scalar observables:
Ener_scal
Kin_scal
Part_scal
Pot_scal
Histogram observables:
Equal time observables:
Den_eq
Green_eq
SpinT_eq
SpinXY_eq
SpinZ_eq
Time displaced observables:
/Users/fassaad/Programs/ALF/ALF_Tutorial/jupyterbook/source/05-caveats/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_T=1.0_U=4.0_Tperp=0.0_beta=2.0_Dtau=0.05_Mz=True
No orbital locations saved.
/Users/fassaad/Programs/ALF/ALF_Tutorial/jupyterbook/source/05-caveats/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_T=1.0_U=4.0_Tperp=0.0_beta=2.0_Dtau=0.1_Mz=True
### Analyzing /Users/fassaad/Programs/ALF/ALF_Tutorial/jupyterbook/source/05-caveats/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_T=1.0_U=4.0_Tperp=0.0_beta=2.0_Dtau=0.1_Mz=True ###
/Users/fassaad/Programs/ALF/ALF_Tutorial/jupyterbook/source/05-caveats
Scalar observables:
Ener_scal
Kin_scal
Part_scal
Pot_scal
Histogram observables:
Equal time observables:
Den_eq
Green_eq
SpinT_eq
SpinXY_eq
SpinZ_eq
Time displaced observables:
/Users/fassaad/Programs/ALF/ALF_Tutorial/jupyterbook/source/05-caveats/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_T=1.0_U=4.0_Tperp=0.0_beta=2.0_Dtau=0.1_Mz=True
No orbital locations saved.
/Users/fassaad/Programs/ALF/ALF_Tutorial/jupyterbook/source/05-caveats/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_T=1.0_U=4.0_Tperp=0.0_beta=2.0_Dtau=0.2_Mz=True
### Analyzing /Users/fassaad/Programs/ALF/ALF_Tutorial/jupyterbook/source/05-caveats/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_T=1.0_U=4.0_Tperp=0.0_beta=2.0_Dtau=0.2_Mz=True ###
/Users/fassaad/Programs/ALF/ALF_Tutorial/jupyterbook/source/05-caveats
Scalar observables:
Ener_scal
Kin_scal
Part_scal
Pot_scal
Histogram observables:
Equal time observables:
Den_eq
Green_eq
SpinT_eq
SpinXY_eq
SpinZ_eq
Time displaced observables:
/Users/fassaad/Programs/ALF/ALF_Tutorial/jupyterbook/source/05-caveats/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_T=1.0_U=4.0_Tperp=0.0_beta=2.0_Dtau=0.2_Mz=True
No orbital locations saved.
Output
For Dtau values [0.05 0.1  0.2 ] the measured energies are:
 [[-1.47188895  0.00256759]
 [-1.47953032  0.00227281]
 [-1.49098233  0.00250822]]
Output
<Figure size 640x480 with 1 Axes>

5.2.1Exercises

  1. Redo the extrapolation for different values of βt\beta t (e.g., for βt=1\beta t = 1, the internal energy is −0.62186692t-0.62186692t, and for βt=4\beta t = 4, it is −1.90837196t-1.90837196t).

  2. Experiment with different settings for Checkerboard and Symm.