Models
PEPSKit implements physical models through the MPSKitModels.jl package as PEPSKit.LocalOperator
structs. Here, we want to explain how users can define their own Hamiltonians and provide a list of already implemented models.
Implementing custom models
In order to define custom Hamiltonians, we leverage several of the useful tools provided in MPSKitModels. In particular, we use many of the pre-defined operators, which is especially useful when defining models with symmetric and fermionic tensors, since most of these operators can take a symmetry as an argument, returning the appropriate symmetric TensorMap
. In order to specify the lattice on which the Hamiltonian is defined, we construct two-dimensional lattices as subtypes of MPSKitModels.AbstractLattice
. Note that so far, all models are defined on infinite square lattices, see InfiniteSquare
, but in the future, we plan to support other lattice geometries as well. In order to specify tensors acting on particular lattice sites, there are a couple of handy methods that we want to point to: see vertices
, nearest_neighbors
and next_nearest_neighbors
defined here.
For a simple example on how to implement a custom model, let's look at the implementation of the MPSKitModels.transverse_field_ising
model:
function MPSKitModels.transverse_field_ising(
T::Type{<:Number},
S::Union{Type{Trivial},Type{Z2Irrep}},
lattice::InfiniteSquare;
J=1.0,
g=1.0,
)
ZZ = rmul!(σᶻᶻ(T, S), -J)
X = rmul!(σˣ(T, S), g * -J)
spaces = fill(domain(X)[1], (lattice.Nrows, lattice.Ncols))
return LocalOperator(
spaces,
(neighbor => ZZ for neighbor in nearest_neighbours(lattice))...,
((idx,) => X for idx in vertices(lattice))...,
)
end
This provides a good recipe for defining a model:
- Define the locally-acting tensors as
TensorMap
s. - Construct a matrix of the physical spaces these
TensorMap
s act on based on the lattice geometry. - Return a
LocalOperator
where we specify on which sites (e.g. on-site, nearest neighbor, etc.) the local tensors act.
For more model implementations, check the PEPSKit repository.
Implemented models
While PEPSKit provides an interface for specifying custom Hamiltonians, it also provides a number of pre-defined models. Some of these are models already defined in MPSKitModels, which are overloaded for two-dimensional lattices and re-exported, but there are new additions as well. The following models are provided:
MPSKitModels.jl models
MPSKitModels.transverse_field_ising
— Functiontransverse_field_ising([elt::Type{<:Number}], [symmetry::Type{<:Sector}],
[lattice::AbstractLattice]; J=1.0, g=1.0)
MPO for the hamiltonian of the one-dimensional Transverse-field Ising model, as defined by
\[H = -J\left(\sum_{\langle i,j \rangle} \sigma^z_i \sigma^z_j + g \sum_{i} \sigma^x_i \right)\]
where the $\sigma^i$ are the spin-1/2 Pauli operators. Possible values for the symmetry
are Trivial
, Z2Irrep
or FermionParity
.
By default, the model is defined on an infinite chain with unit lattice spacing, with Trivial
symmetry and with ComplexF64
entries of the tensors.
MPSKitModels.heisenberg_XYZ
— Functionheisenberg_XYZ([elt::Type{<:Number}], [lattice::AbstractLattice];
Jx=1.0, Jy=1.0, Jz=1.0, spin=1)
MPO for the hamiltonian of the XYZ Heisenberg model, defined by
\[H = \sum_{\langle i,j \rangle} \left( J^x S_i^x S_j^x + J^y S_i^y S_j^y + J^z S_i^z S_j^z \right)\]
By default, the model is defined on an infinite chain with unit lattice spacing and with ComplexF64
entries of the tensors.
MPSKitModels.heisenberg_XXZ
— Functionheisenberg_XXZ([elt::Type{<:Number}], [symmetry::Type{<:Sector}],
[lattice::AbstractLattice]; J=1.0, Delta=1.0, spin=1)
MPO for the hamiltonian of the XXZ Heisenberg model, as defined by
\[H = J \left( \sum_{\langle i,j \rangle} S_i^x S_j^x + S_i^y S_j^y + \Delta S_i^z S_j^z \right)\]
By default, the model is defined on an infinite chain with unit lattice spacing, without any symmetries and with ComplexF64
entries of the tensors.
MPSKitModels.hubbard_model
— Functionhubbard_model([elt::Type{<:Number}], [particle_symmetry::Type{<:Sector}],
[spin_symmetry::Type{<:Sector}], [lattice::AbstractLattice];
t, U, mu, n)
MPO for the hamiltonian of the Hubbard model, as defined by
\[H = -t \sum_{\langle i,j \rangle} \sum_{\sigma} \left( e_{i,\sigma}^+ e_{j,\sigma}^- + c_{i,\sigma}^- c_{j,\sigma}^+ \right) + U \sum_i n_{i,\uparrow}n_{i,\downarrow} - \sum_i \mu n_i\]
where $\sigma$ is a spin index that can take the values $\uparrow$ or $\downarrow$ and $n$ is the fermionic number operator e_number
.
By default, the model is defined on an infinite chain with unit lattice spacing, without any symmetries and with ComplexF64
entries of the tensors. If the particle_symmetry
is not Trivial
, a fixed particle number density n
can be imposed.
MPSKitModels.bose_hubbard_model
— Functionbose_hubbard_model([elt::Type{<:Number}], [symmetry::Type{<:Sector}],
[lattice::AbstractLattice];
cutoff, t, U, mu, n)
MPO for the hamiltonian of the Bose-Hubbard model, as defined by
\[H = -t \sum_{\langle i,j \rangle} \left( a_{i}^+ a_{j}^- + a_{i}^- a_{j}^+ \right) - \mu \sum_i N_i + \frac{U}{2} \sum_i N_i(N_i - 1).\]
where $N$ is the bosonic number operator a_number
.
By default, the model is defined on an infinite chain with unit lattice spacing, without any symmetries and with ComplexF64
entries of the tensors. The Hilbert space is truncated such that at maximum of cutoff
bosons can be at a single site. If the symmetry
is not Trivial
, a fixed (halfinteger) particle number density n
can be imposed.
MPSKitModels.tj_model
— Functiontj_model([elt::Type{<:Number}], [particle_symmetry::Type{<:Sector}],
[spin_symmetry::Type{<:Sector}], [lattice::AbstractLattice];
t, J, mu, slave_fermion::Bool=false)
MPO for the hamiltonian of the t-J model, as defined by
\[H = -t \sum_{\langle i,j \rangle, \sigma} (\tilde{e}^\dagger_{i,\sigma} \tilde{e}_{j,\sigma} + h.c.) + J \sum_{\langle i,j \rangle}(\mathbf{S}_i \cdot \mathbf{S}_j - \frac{1}{4} n_i n_j) - \mu \sum_i n_i\]
where $\tilde{e}_{i,\sigma}$ is the electron operator with spin $\sigma$ restrict to the no-double-occupancy subspace.
PEPSKit.jl models
PEPSKit.j1_j2_model
— Functionj1_j2_model([elt::Type{T}, symm::Type{S},] lattice::InfiniteSquare;
J1=1.0, J2=1.0, spin=1//2, sublattice=true)
Square lattice $J_1\text{-}J_2$ model, defined by the Hamiltonian
\[H = J_1 \sum_{\langle i,j \rangle} \vec{S}_i \cdot \vec{S}_j + J_2 \sum_{\langle\langle i,j \rangle\rangle} \vec{S}_i \cdot \vec{S}_j,\]
where $\vec{S}_i = (S_i^x, S_i^y, S_i^z)$. We denote the nearest and next-nearest neighbor terms using $\langle i,j \rangle$ and $\langle\langle i,j \rangle\rangle$, respectively. The sublattice
kwarg enables a single-site unit cell ground state via a unitary sublattice rotation.
PEPSKit.pwave_superconductor
— Functionpwave_superconductor([T=ComplexF64,] lattice::InfiniteSquare; t=1, μ=2, Δ=1)
Square lattice $p$-wave superconductor model, defined by the Hamiltonian
\[ H = -\sum_{\langle i,j \rangle} \left( t c_i^\dagger c_j + \Delta c_i c_j + \text{h.c.} \right) - \mu \sum_i n_i,\]
where $t$ is the hopping amplitude, $\Delta$ specifies the superconducting gap, $\mu$ is the chemical potential, and $n_i = c_i^\dagger c_i$ is the fermionic number operator.