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.

6.2 Projective algorithm

In this example we use the pyALF interface to run ALF’s projective algorithm with the Mz choice of Hubbard Stratonovich transformation on a 4-site ring.

The projective approach is the method of choice if one is interested in ground-state properties. The starting point is a pair of trial wave functions, ∣ΨT,L/R⟩|\Psi_{T,L/R} \rangle, that are not orthogonal to the ground state ∣Ψ0⟩|\Psi_0 \rangle:

⟨ΨT,L/R∣Ψ0⟩≠0.\langle \Psi_{T,L/R} | \Psi_0 \rangle \neq 0.

The ground-state expectation value of any observable O^\hat{O} can then be computed by propagation along the imaginary time axis:

⟨Ψ0∣O^∣Ψ0⟩⟨Ψ0∣Ψ0⟩=lim⁡θ→∞⟨ΨT,L∣e−θH^e−(β−τ)H^O^e−τH^e−θH^∣ΨT,R⟩⟨ΨT,L∣e−(2θ+β)H^∣ΨT,R⟩,\frac{ \langle \Psi_0 | \hat{O} | \Psi_0 \rangle }{ \langle \Psi_0 | \Psi_0 \rangle} = \lim_{\theta \rightarrow \infty} \frac{ \langle \Psi_{T,L} | e^{-\theta \hat{H}} e^{-(\beta - \tau)\hat{H} }\hat{O} e^{- \tau \hat{H} } e^{-\theta \hat{H}} | \Psi_{T,R} \rangle } { \langle \Psi_{T,L} | e^{-(2 \theta + \beta) \hat{H} } | \Psi_{T,R} \rangle } ,

where β\beta defines the imaginary time range where observables (time displaced and equal time) are measured and τ\tau varies from 0 to β\beta in the calculation of time-displace observables. For further details, see Sec. 3 of ALF documentation.


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

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

2. Create instances of Simulation, specifying the necessary parameters, in particular the Projector to True:

Output
Theta values used:
0.1
0.25
0.5
1.0
2.0
3.0

3. Compile ALF, this may take a few minutes:

Output
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 results possible"
      |  1~~~~~~
Warning: #warning "You are compiling entanglement without MPI. No results possible" [-Wcpp]
ar: creating modules_90.a
ar: creating libqrref.a
Compiling Analysis
Compiling Program
Parsing Hamiltonian parameters
filename: Hamiltonians/Hamiltonian_Kondo_smod.F90
filename: Hamiltonians/Hamiltonian_Hubbard_smod.F90
filename: Hamiltonians/Hamiltonian_Hubbard_Plain_Vanilla_smod.F90
filename: Hamiltonians/Hamiltonian_tV_smod.F90
filename: Hamiltonians/Hamiltonian_LRC_smod.F90
filename: Hamiltonians/Hamiltonian_Z2_Matter_smod.F90
Compiling program modules
Link program
Done.

4. Perform the simulations and display info file, as specified in each element of sim:

Output
Prepare directory "/Users/indra/Downloads/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_Projector=True_Theta=0.1_T=1.0_U=4.0_Tperp=0.0_beta=0.5_Dtau=0.05_Mz=True" for Monte Carlo run.
Create new directory.
Run /Users/indra/Documents/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
===== /Users/indra/Downloads/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_Projector=True_Theta=0.1_T=1.0_U=4.0_Tperp=0.0_beta=0.5_Dtau=0.05_Mz=True/info =====
 START TIME: 2026-10-06T17:17:14.113+02:00
 =====================================
 Model is      : Hubbard                                                         
 Lattice is    : N_leg_ladder                                                    
 # unit cells  :            4
 # of orbitals :            1
 Flux_1        :    0.0000000000000000     
 Flux_2        :    0.0000000000000000     
 Twist as phase factor in bulk
 HS  couples to z-component of spin
 Checkerboard  :  F
 Symm. decomp  :  T
 Projective version
 Theta         :   0.10000000000000001     
 Tau_max       :   0.50000000000000000     
 dtau,Ltrot_eff:    5.0000000000000003E-002          14
 N_SUN         :            2
 N_FL          :            2
 t             :    1.0000000000000000     
 Ham_U         :    4.0000000000000000     
 Ham_chem      :    0.0000000000000000     
 Degen of right trial wave function:    6.2829267843054593E-002
 Degen of left  trial wave function:    6.2829267843054593E-002
 Degen of right trial wave function:    6.2829267843054593E-002
 Degen of left  trial wave function:    6.2829267843054593E-002
 No initial configuration, Seed_in      790789
 Sweeps                              :          600
 Bins                                :           50
 No CPU-time limitation 
 Measure Int.                        :            3          12
 Stabilization,Wrap                  :           10
 Nstm                                :            2
 Ltau                                :            0
 # of interacting Ops per time slice :            4
 Default sequential updating 
 Number of mpi-processes :            1
 This executable represents commit 1a56b7fa of branch main.
 LOG is defined 
  Precision Green  Mean, Max :    8.2554829183931598E-015   4.3182278151632659E-011
  Precision Phase, Max       :    7.1892044519119127E-012
  Acceptance                 :   0.41402648809523812     
  Effective Acceptance       :   0.41402648809523812     
  CPU Time                   :    5.6831610000000001     
 FIN TIME: 2026-10-06T17:17:19.813+02:00

Prepare directory "/Users/indra/Downloads/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_Projector=True_Theta=0.25_T=1.0_U=4.0_Tperp=0.0_beta=0.5_Dtau=0.05_Mz=True" for Monte Carlo run.
Create new directory.
Run /Users/indra/Documents/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
===== /Users/indra/Downloads/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_Projector=True_Theta=0.25_T=1.0_U=4.0_Tperp=0.0_beta=0.5_Dtau=0.05_Mz=True/info =====
 START TIME: 2026-10-06T17:17:20.716+02:00
 =====================================
 Model is      : Hubbard                                                         
 Lattice is    : N_leg_ladder                                                    
 # unit cells  :            4
 # of orbitals :            1
 Flux_1        :    0.0000000000000000     
 Flux_2        :    0.0000000000000000     
 Twist as phase factor in bulk
 HS  couples to z-component of spin
 Checkerboard  :  F
 Symm. decomp  :  T
 Projective version
 Theta         :   0.25000000000000000     
 Tau_max       :   0.50000000000000000     
 dtau,Ltrot_eff:    5.0000000000000003E-002          20
 N_SUN         :            2
 N_FL          :            2
 t             :    1.0000000000000000     
 Ham_U         :    4.0000000000000000     
 Ham_chem      :    0.0000000000000000     
 Degen of right trial wave function:    6.2829267843054593E-002
 Degen of left  trial wave function:    6.2829267843054593E-002
 Degen of right trial wave function:    6.2829267843054593E-002
 Degen of left  trial wave function:    6.2829267843054593E-002
 No initial configuration, Seed_in      790789
 Sweeps                              :          600
 Bins                                :           50
 No CPU-time limitation 
 Measure Int.                        :            6          15
 Stabilization,Wrap                  :           10
 Nstm                                :            2
 Ltau                                :            0
 # of interacting Ops per time slice :            4
 Default sequential updating 
 Number of mpi-processes :            1
 This executable represents commit 1a56b7fa of branch main.
 LOG is defined 
  Precision Green  Mean, Max :    1.5460118396158495E-014   6.5902281377882927E-011
  Precision Phase, Max       :    8.8638940726461805E-012
  Acceptance                 :   0.40869812500000002     
  Effective Acceptance       :   0.40869812500000002     
  CPU Time                   :    7.6205559999999997     
 FIN TIME: 2026-10-06T17:17:28.338+02:00

Prepare directory "/Users/indra/Downloads/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_Projector=True_Theta=0.5_T=1.0_U=4.0_Tperp=0.0_beta=0.5_Dtau=0.05_Mz=True" for Monte Carlo run.
Create new directory.
Run /Users/indra/Documents/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
===== /Users/indra/Downloads/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_Projector=True_Theta=0.5_T=1.0_U=4.0_Tperp=0.0_beta=0.5_Dtau=0.05_Mz=True/info =====
 START TIME: 2026-10-06T17:17:29.266+02:00
 =====================================
 Model is      : Hubbard                                                         
 Lattice is    : N_leg_ladder                                                    
 # unit cells  :            4
 # of orbitals :            1
 Flux_1        :    0.0000000000000000     
 Flux_2        :    0.0000000000000000     
 Twist as phase factor in bulk
 HS  couples to z-component of spin
 Checkerboard  :  F
 Symm. decomp  :  T
 Projective version
 Theta         :   0.50000000000000000     
 Tau_max       :   0.50000000000000000     
 dtau,Ltrot_eff:    5.0000000000000003E-002          30
 N_SUN         :            2
 N_FL          :            2
 t             :    1.0000000000000000     
 Ham_U         :    4.0000000000000000     
 Ham_chem      :    0.0000000000000000     
 Degen of right trial wave function:    6.2829267843054593E-002
 Degen of left  trial wave function:    6.2829267843054593E-002
 Degen of right trial wave function:    6.2829267843054593E-002
 Degen of left  trial wave function:    6.2829267843054593E-002
 No initial configuration, Seed_in      790789
 Sweeps                              :          600
 Bins                                :           50
 No CPU-time limitation 
 Measure Int.                        :           11          20
 Stabilization,Wrap                  :           10
 Nstm                                :            3
 Ltau                                :            0
 # of interacting Ops per time slice :            4
 Default sequential updating 
 Number of mpi-processes :            1
 This executable represents commit 1a56b7fa of branch main.
 LOG is defined 
  Precision Green  Mean, Max :    1.5816939382935608E-014   1.9593877388031069E-010
  Precision Phase, Max       :    2.7918339445608183E-011
  Acceptance                 :   0.40501916666666665     
  Effective Acceptance       :   0.40501916666666665     
  CPU Time                   :    10.711501999999999     
 FIN TIME: 2026-10-06T17:17:39.979+02:00

Prepare directory "/Users/indra/Downloads/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_Projector=True_Theta=1.0_T=1.0_U=4.0_Tperp=0.0_beta=0.5_Dtau=0.05_Mz=True" for Monte Carlo run.
Create new directory.
Run /Users/indra/Documents/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
===== /Users/indra/Downloads/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_Projector=True_Theta=1.0_T=1.0_U=4.0_Tperp=0.0_beta=0.5_Dtau=0.05_Mz=True/info =====
 START TIME: 2026-10-06T17:17:40.923+02:00
 =====================================
 Model is      : Hubbard                                                         
 Lattice is    : N_leg_ladder                                                    
 # unit cells  :            4
 # of orbitals :            1
 Flux_1        :    0.0000000000000000     
 Flux_2        :    0.0000000000000000     
 Twist as phase factor in bulk
 HS  couples to z-component of spin
 Checkerboard  :  F
 Symm. decomp  :  T
 Projective version
 Theta         :    1.0000000000000000     
 Tau_max       :   0.50000000000000000     
 dtau,Ltrot_eff:    5.0000000000000003E-002          50
 N_SUN         :            2
 N_FL          :            2
 t             :    1.0000000000000000     
 Ham_U         :    4.0000000000000000     
 Ham_chem      :    0.0000000000000000     
 Degen of right trial wave function:    6.2829267843054593E-002
 Degen of left  trial wave function:    6.2829267843054593E-002
 Degen of right trial wave function:    6.2829267843054593E-002
 Degen of left  trial wave function:    6.2829267843054593E-002
 No initial configuration, Seed_in      790789
 Sweeps                              :          600
 Bins                                :           50
 No CPU-time limitation 
 Measure Int.                        :           21          30
 Stabilization,Wrap                  :           10
 Nstm                                :            5
 Ltau                                :            0
 # of interacting Ops per time slice :            4
 Default sequential updating 
 Number of mpi-processes :            1
 This executable represents commit 1a56b7fa of branch main.
 LOG is defined 
  Precision Green  Mean, Max :    1.5509364294465238E-014   1.9403913808464471E-010
  Precision Phase, Max       :    2.6544694611729281E-011
  Acceptance                 :   0.40201433333333331     
  Effective Acceptance       :   0.40201433333333331     
  CPU Time                   :    17.392689000000001     
 FIN TIME: 2026-10-06T17:17:58.318+02:00

Prepare directory "/Users/indra/Downloads/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_Projector=True_Theta=2.0_T=1.0_U=4.0_Tperp=0.0_beta=0.5_Dtau=0.05_Mz=True" for Monte Carlo run.
Create new directory.
Run /Users/indra/Documents/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
===== /Users/indra/Downloads/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_Projector=True_Theta=2.0_T=1.0_U=4.0_Tperp=0.0_beta=0.5_Dtau=0.05_Mz=True/info =====
 START TIME: 2026-10-06T17:17:59.222+02:00
 =====================================
 Model is      : Hubbard                                                         
 Lattice is    : N_leg_ladder                                                    
 # unit cells  :            4
 # of orbitals :            1
 Flux_1        :    0.0000000000000000     
 Flux_2        :    0.0000000000000000     
 Twist as phase factor in bulk
 HS  couples to z-component of spin
 Checkerboard  :  F
 Symm. decomp  :  T
 Projective version
 Theta         :    2.0000000000000000     
 Tau_max       :   0.50000000000000000     
 dtau,Ltrot_eff:    5.0000000000000003E-002          90
 N_SUN         :            2
 N_FL          :            2
 t             :    1.0000000000000000     
 Ham_U         :    4.0000000000000000     
 Ham_chem      :    0.0000000000000000     
 Degen of right trial wave function:    6.2829267843054593E-002
 Degen of left  trial wave function:    6.2829267843054593E-002
 Degen of right trial wave function:    6.2829267843054593E-002
 Degen of left  trial wave function:    6.2829267843054593E-002
 No initial configuration, Seed_in      790789
 Sweeps                              :          600
 Bins                                :           50
 No CPU-time limitation 
 Measure Int.                        :           41          50
 Stabilization,Wrap                  :           10
 Nstm                                :            9
 Ltau                                :            0
 # of interacting Ops per time slice :            4
 Default sequential updating 
 Number of mpi-processes :            1
 This executable represents commit 1a56b7fa of branch main.
 LOG is defined 
  Precision Green  Mean, Max :    1.5392618368986997E-014   2.7152033244131391E-010
  Precision Phase, Max       :    3.8987144696327908E-011
  Acceptance                 :   0.40105546296296296     
  Effective Acceptance       :   0.40105546296296296     
  CPU Time                   :    30.692913999999998     
 FIN TIME: 2026-10-06T17:18:29.917+02:00

Prepare directory "/Users/indra/Downloads/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_Projector=True_Theta=3.0_T=1.0_U=4.0_Tperp=0.0_beta=0.5_Dtau=0.05_Mz=True" for Monte Carlo run.
Create new directory.
Run /Users/indra/Documents/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
===== /Users/indra/Downloads/ALF_data/Hubbard_N_leg_ladder_L1=4_L2=1_Checkerboard=False_Symm=True_Projector=True_Theta=3.0_T=1.0_U=4.0_Tperp=0.0_beta=0.5_Dtau=0.05_Mz=True/info =====
 START TIME: 2026-10-06T17:18:30.886+02:00
 =====================================
 Model is      : Hubbard                                                         
 Lattice is    : N_leg_ladder                                                    
 # unit cells  :            4
 # of orbitals :            1
 Flux_1        :    0.0000000000000000     
 Flux_2        :    0.0000000000000000     
 Twist as phase factor in bulk
 HS  couples to z-component of spin
 Checkerboard  :  F
 Symm. decomp  :  T
 Projective version
 Theta         :    3.0000000000000000     
 Tau_max       :   0.50000000000000000     
 dtau,Ltrot_eff:    5.0000000000000003E-002         130
 N_SUN         :            2
 N_FL          :            2
 t             :    1.0000000000000000     
 Ham_U         :    4.0000000000000000     
 Ham_chem      :    0.0000000000000000     
 Degen of right trial wave function:    6.2829267843054593E-002
 Degen of left  trial wave function:    6.2829267843054593E-002
 Degen of right trial wave function:    6.2829267843054593E-002
 Degen of left  trial wave function:    6.2829267843054593E-002
 No initial configuration, Seed_in      790789
 Sweeps                              :          600
 Bins                                :           50
 No CPU-time limitation 
 Measure Int.                        :           61          70
 Stabilization,Wrap                  :           10
 Nstm                                :           13
 Ltau                                :            0
 # of interacting Ops per time slice :            4
 Default sequential updating 
 Number of mpi-processes :            1
 This executable represents commit 1a56b7fa of branch main.
 LOG is defined 
  Precision Green  Mean, Max :    1.5437358186552447E-014   1.5340505746601957E-009
  Precision Phase, Max       :    5.5526181084456847E-011
  Acceptance                 :   0.40079660256410254     
  Effective Acceptance       :   0.40079660256410254     
  CPU Time                   :    45.519432999999999     
 FIN TIME: 2026-10-06T17:19:16.408+02:00

5. Calculate the internal energies:

Output

Where the cell magic %%capture suppresses the output of sim.analysis(), which lists the data directories and observables.

Output
For Theta values [0.1  0.25 0.5  1.   2.   3.  ] the measured energies are:
 [[-1.7036705   0.00333066]
 [-1.90927291  0.00304812]
 [-2.05352132  0.00463096]
 [-2.1085726   0.00680212]
 [-2.10894491  0.00828483]
 [-2.12211566  0.0074775 ]]

6. Plot the internal energies:

<ErrorbarContainer object of 3 artists>
<Figure size 640x480 with 1 Axes>

6.2.1Exercises

  1. A ladder system consists of chains assembled one next to the other, for instance, setting L1=14, L2=3 defines a 3-leg ladder. It is a well-known result (Dagotto and Rice, Science 271, 5249, (1996) pp. 618) that spin correlations in ladder systems decay as power laws (apart from logarithmic corrections) for odd-leg ladders, and exponentially for even-leg ladders. The paper presents numerical results for the Heisenberg model. How do these correlations behave for the Hubbard model at half-filling?

References
  1. Dagotto, E., & Rice, T. M. (1996). Surprises on the Way from One- to Two-Dimensional Quantum Magnets: The Ladder Materials. Science, 271(5249), 618–623. 10.1126/science.271.5249.618