12. Adding Rashba SOC to the Hamiltonian#
This example covers adding Rashba SOC to the Hamiltonian. Currently, this is only supported when working directly with the Hamiltonian Builder in Python without using an inputfile.
from afqmctools.systems.lattice import get_lattice
from afqmctools.hamiltonian.model.builder import HamiltonianBuilder
from afqmctools.hamiltonian.model.ham_class import SpinSymm
import afqmctools.utils.io as io
from afqmctools.wavefunction.free_electron import free_electron
lattice = get_lattice(
params=dict(
L1 = 3,
L2 = 3,
boundary1 = "PBC",
boundary2 = "PBC"
)
)
nelec = (5,5)
# list of hopping parameters is interpreted as follows:
# hopping[0] is 't'
# hopping[1] is 't^{prime}'
# ....
# hopping[n-1] is 't^{n}'
hopping = [1.0,0.5]
builder = HamiltonianBuilder(
lattice=lattice,
spin_symm=SpinSymm.NONCOLLINEAR
)
# add standard Hubbard terms
builder.nth_neighbor_hopping(t=hopping)
builder.onsite_hubbard(U=8.0)
# add Rashba SOC consistent with the hopping
builder.rashba_soc(rashba_lambda=0.3, t=hopping)
builder.finalize()
hamiltonian = builder.hamiltonian
io.write_model_hamiltonian(
hamiltonian=hamiltonian,
fname="afqmc.h5",
nelec=nelec
)
free_electron(
source=hamiltonian,
nelec=nelec,
output="afqmc.h5",
lattice=lattice
)
If the sample Python script is run above with the sample input file, the following should be present at the end of the output.
computing and storing 1th-nearest neighbors
Computing distance matrix of lattice
Reading lattice site positions from Lattice
computing and storing 1th-nearest image neighbors
computing and storing 2th-nearest neighbors
computing and storing 2th-nearest image neighbors
Building Hubbard U term with U=8.0
Building onsite hubbard with positive U values: 8.0
Combining terms of the same type
Combining tij terms
Combining Hubbard U, U1, and U2 terms where possible
Max spin symmetry is SpinSymm.NONCOLLINEAR
Generating free-electron trial wavefunction with twist = [4.10803005e-06 4.58334805e-04]
using dense representation of 1-body Hamiltonian to find eigenvalues and orbitals
Eigenvalues of the non-interacting Hamiltonian: [-6. -6. -1.03923048 -1.03923048 -1.03923048 -1.03923048
0.98038476 0.98038476 1.03923048 1.03923048 1.03923048 1.03923048
1.5 1.5 1.5 1.5 2.01961524 2.01961524]
-----------------------
- ╔═╗ ------- ╖ ╓╔═╕ --
- ╠═╣ ╖╖╒╦╕╔╗ ╠═╣╠╕ ---
- ╜ ╙ ╚╝ ╜ ╚╝ ╜ ╙╨ ----
-----------------------
[WARNING] cli_args for lattice_hf is deprecated and will be removed!
===== AutoHF Settings =====
inputfile input.toml
noncollinear True
gpu False
approx_expm False
force_complex False
ansatz SD
opt_method lbfgs
seed 1724699116
eta 0.1
numSteps -1
numTrials 1
plot False
verbose True
output afqmc.h5
dumpTrials
adding flags
[CpuDevice(id=0)]
default dtype: float64
Reading hopping from spin sector 0
Running in Slater Detemrinant Mode
energyCall: Etotal=(14.316801240279224+5.568385245188104e-16j) with EK=(-7.481088608411751-8.326672684688674e-17j) EU=(21.797889848690975+6.401052513656971e-16j) EU1=0 EU2=0 EJ=0 Eheisenber=0
Reference HF Energy = 14.316801240279224
energyCall: Etotal=(14.316801240279224+5.568385245188104e-16j) with EK=(-7.481088608411751-8.326672684688674e-17j) EU=(21.797889848690975+6.401052513656971e-16j) EU1=0 EU2=0 EJ=0 Eheisenber=0
See the examples in Running SAFIRE for how to run AFQMC.