Predefined models
This part of the documentation is about the predefined implementations of the model interface that are included with StochasticSeriesExpansion.jl. At the moment there is one such implementation.
MagnetModel
The MagnetModel
implementation allows the simulation of Heisenberg-type magnets on arbitrary lattices.
StochasticSeriesExpansion.MagnetModel
— TypeMagnetModel <: AbstractModel
Describes an arbitrary-spin quantum magnet with the Hamiltonian
\[H = \sum_{⟨i,j⟩} J_{ij} (S_i \cdot S_j + (1+d_{ij}) S_i^z S_j^z) + \sum_i h_i S^z_i + D^z_i (S^z_i)^2 + D^x_i (S^x_i)^2\]
Task parameters
lattice
: sets theLattice
S
: spin magnitude (default:1//2
)J
: exchange coupling $J_{ij}$d
: exchange anisotrozy $d_{ij}$ (default:0
)h
: magnetic field in $z$-direction $h_i$ (default:0
)D_z
: single-ion anisotropy in $z$-direction $D^z_i$ (default:0
)D_x
: single-ion anisotropy in $x$-direction $D^x_i$ (default:0
)
By default, these are the same for each site or bond. However, they (including :S
)can be adjusted to be different across the unit cell using
parameter_map
: parameter map that assigns different parameters to different bonds/sites of the unit cell.
Further parameters:
measure
: control what observables should be measured. Vector containing a combination of:magnetization
: measures uniform magnetization:staggered_magnetization
: measures bipartite staggered (antiferromagnetic) magnetization- any
Type{<:AbstractOpstringEstimator}
for an implementation of the operator string estimator interface
ClusterModel
This feature is experimental. It is tested and should work, but its API and parameters may change significantly in a future release.
StochasticSeriesExpansion.ClusterModel
— TypeClusterModel <: AbstractModel
This model wraps another model, allowing to simulate that model in a cluster basis. For example, given a MagnetModel
, ClusterModel
can be used to reformulate it in the eigenbasis of local dimers, which allows performing SSE simulations for some frustrated models without a sign problem.
For now, the interface for this is experimental and makes some assumptions on the underlying model, such as having a lattice
field. By default, the cluster basis contains all the spins in that lattices unitcell.
Task parameters
inner_model
: The underlyingAbstractModel
that should be simulatedcluster_bases
: Tuple ofClusterBasis
to use for the different clustersmeasure_quantum_numbers
: Vector of named tuples(;name::Symbol, quantum_number::Int)
that allows measuring the quantum numbers defined in theClusterBasis
.
StochasticSeriesExpansion.ClusterBasis
— TypeClusterBasis(quantum_numbers::Vector{NTuple{N,T}}, transformation::AbstractMatrix{T})
Sets up a cluster basis with a set of quantum_numbers
and a unitary transformation
that contains the basis states expressed in the original basis as columns. Each state can be associated with a tuple of quantum numbers (e.g. magnetization or total spin). The length of quantum_numbers
has to equal the number of columns in transformation
.
For examples, see the ClusterBases
submodule.
StochasticSeriesExpansion.ClusterBases
— ModuleThis submodule contains some useful predefined cluster bases.
Common ingredients
Lattice
This is a simple lattice structure that may be shared across different models. Practitioners only need to know how to create lattices from the task parameters.
StochasticSeriesExpansion.Lattice
— TypeLattice{D}
This is a model-agnostic implementation of a D
-dimensional lattice. It allows generating translation symmetric bond graph based on minimal information derived from a unit cell object.
Task parameters
From the job file, lattices are specified using a lattice
parameter.
tm.lattice = (
unitcell = StochasticSeriesExpansion.UnitCells.honeycomb,
size = (10,10),
)
The unitcell
should be an instance of UnitCell
and size
specifies how many copies of the unit cell in each dimension make up the supercell. The above example creates a honeycomb lattice with $2\times 10\times 10$ sites.
Public fields
uc
: underlyingUnitCell
objectLs
: tuple of lattice lengthsbonds
: array ofLatticeBond
.site
: array ofLatticeSite
, useful for quickly converting linear site indices to spatial ones.
StochasticSeriesExpansion.UnitCell
— TypeUnitCell{D}
The unit cell used to build a D
-dimensional lattice. It can be specified
UnitCell(
lattice_vectors::SMatrix{D,D,Float64},
sites::AbstractVector{UCSite{D}},
bonds::AbstractVector{UCBond{D}}
)
The columns of lattice_vector
are the lattice vectors. sites
and bonds
define the connections within and out of the unit cell.
Example
One of the predefined unitcells in UnitCells
is defined as
const honeycomb = UnitCell(
[[sqrt(3) / 2, -0.5] [sqrt(3 / 2), 0.5]],
[UCSite((0.0, 0.0)), UCSite((1 / 3, 1 / 3))],
[UCBond(1, (0, 0), 2), UCBond(2, (0, 1), 1), UCBond(2, (1, 0), 1)],
)
Refer the the documentation of UCSite
and UCBond
for more information.
StochasticSeriesExpansion.UCSite
— TypeUCSite{D}
Defines a site within the unit cell. Construct it using
UCSite(pos::Tuple)
pos
contains the position of the site inside the unit cell in the lattice vector basis.
Public fields:
pos
: see abovecoordination
: coordination number of the site
StochasticSeriesExpansion.UCBond
— TypeUCBond{D}
Defines a unit cell bond between site i
and j
. Construct it using
UCBond(iuc, jd, juc)
iuc
is the intra-unit-cell index of i
. jd = (jdx, jdy, ...)
are the D
(nonnegative) offsets of the unit cell containing j
with respect to the one containing i
. juc
is the intra-unit-cell index of j
. For examples, see UnitCells
.
These parameters are accessible as public fields as well.
StochasticSeriesExpansion.UnitCells
— ModuleThe UnitCells
submodule provides some predefined unitcells that can be used to construct lattices.
Currently there are:
square
: square latticecolumnar_dimer
: square lattice of dimershoneycomb
: honeycomb latticetriangle
: triangle lattice
The source code of these is a great starting point if you want to define your own.
The following are internal pieces of the lattice structure that are useful for model implementers.
StochasticSeriesExpansion.LatticeSite
— TypeLatticeSite{D}
Information about a lattice site, locating its position inside the lattice.
Public fields
iuc
: index within the unit cellix
:D
-tuple of indices of the unit cell along the lattice dimensions
StochasticSeriesExpansion.LatticeBond
— TypeLatticeBond
Information about a lattice bond.
Public fields
type
: translation symmetry equivalence class of the bond (does not take other symmetries into account!)i
,j
: sites connected by the bond
In contrast to SSEBond
, LatticeBond
only supports 2-site bonds at this point.
Parameter maps
By default, model parameters like the exchange coupling J
of the MagnetModel
are equal for all bonds in the unit cell. Parameter maps are a way to override this behavior and assign different parameters to different unit cell positions.
The following example sets different values for the parameter J
in the $x$ and $y$ direction.
using Carlo.JobTools
using StochasticSeriesExpansion
tm = TaskMaker()
tm.model = MagnetModel
tm.lattice = (;
UnitCells.square,
)
tm.parameter_map = (;
J = (:Jx, :Jy)
)
tm.Jx = 1.0
tm.Jy = 0.5
0.5
The length and order of the tuple (:Jx, :Jy)
is tied to the way the bonds are specified in the unitcell structure UnitCells.square
. In a similar way, one can change site-properties such as h
or S
by referring to the different sites in the unit cell.
using Carlo.JobTools
using StochasticSeriesExpansion
tm = TaskMaker()
tm.model = MagnetModel
tm.lattice = (;
UnitCells.honeycomb,
)
tm.parameter_map = (;
J = (:J1, :J2, :J3),
S = (:Sa, :Sb),
)
tm.J1 = 1.0
tm.J2 = 0.5
tm.J3 = 1.5
tm.Sa = 1//2
tm.Sb = 1
1
The above example specifies a honeycomb lattice with spin-1/2 on one sublattice and spin-1 on the other. The three directions of nearest-neighbor exchange interactions have different strengths.