Skip to content

Instantly share code, notes, and snippets.

@maartenvd
Last active August 30, 2021 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maartenvd/4c429d5cf11ad9d12dd66e6bc8317074 to your computer and use it in GitHub Desktop.
Save maartenvd/4c429d5cf11ad9d12dd66e6bc8317074 to your computer and use it in GitHub Desktop.
using MPSKit,TensorKit,SUNRepresentations
let
#another labeling scheme
su3_irrep(m, n) = SUNRepresentations.SUNIrrep((m + n, n, 0))
function su3_heis_ham(m::Int, n::Int, J::Number = 1.0, E₀::Number = 0.0)
# Hamiltonian for the SU(3) Heisenberg model
# H = J ∑ (Sᵢ•Sⱼ) + E₀
# where the S are the SU(3) generators, normalised such that tr(SᵃSᵇ) = 15//2 δᵃᵇ.
physical_space = RepresentationSpace(su3_irrep(m, n) => 1)
adjoint_space = RepresentationSpace(su3_irrep(1, 1) => 1)
trivial_space = RepresentationSpace(su3_irrep(0, 0) => 1)
Sᵢ = TensorMap(ones, ComplexF64, trivial_space * physical_space, adjoint_space * physical_space) * sqrt(6)
Sⱼ = TensorMap(ones, ComplexF64, adjoint_space * physical_space, trivial_space * physical_space) * sqrt(6)
mpo_data = Array{Any, 3}(missing, 1, 3, 3)
mpo_data[1,1,1] = 1.0
mpo_data[1,3,3] = 1.0
mpo_data[1,1,2] = J * permute(Sᵢ,(1,2),(4,3))
mpo_data[1,2,3] = permute(Sⱼ,(1,2),(4,3));
mpo_data[1,1,3] = E₀
return MPOHamiltonian(mpo_data)
end
H = su3_heis_ham(3,0,2,3);
gs = InfiniteMPS([RepresentationSpace(su3_irrep(3,0) => 1)],
[Rep[SU{3}]((0, 0, 0)=>1, (2, 1, 0)=>3, (3, 0, 0)=>2, (3, 3, 0)=>2, (4, 2, 0)=>5, (5, 1, 0)=>1, (5, 4, 0)=>1, (6, 3, 0)=>2)]);
(gs,env) = find_groundstate(gs,H,Vumps(maxiter=1));
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment