Lattice2D.jl
A Julia package for constructing and visualizing 2D lattices for quantum many-body physics simulations.
Installation
using Pkg
Pkg.add("Lattice2D")Models
The models implemented in this module is below.
Lattice2D.AbstractBoundaryCondition — Type
AbstractBoundaryCondition格子の境界条件の抽象型。
- PBC: 周期境界条件
- OBC: 開境界条件
- SSD: Sine-Square Deformation 境界条件
Lattice2D.AbstractLattice — Type
AbstractLattice{D}格子の抽象型。Dは空間次元。 ising model などの格子モデルはこの型を継承して実装する。
Lattice2D.AbstractLatticeConnection — Type
AbstractLatticeConnection格子の接続(辺、ボンド)を表す抽象型。
Lattice2D.AbstractTopology — Type
AbstractTopology格子のトポロジーの抽象型。
- Square: 正方格子
- Triangular: 三角格子
- Honeycomb: ハニカム格子
- Kagome: カゴメ格子
Lattice2D.Bond — Type
Bond格子の辺を表す型。
src::Int: 辺の始点サイトのインデックスdst::Int: 辺の終点サイトのインデックスtype::Int: 辺の種類(異なる結合定数を持つ辺を区別するため)vector::Vector{Float64}: 辺のベクトル表現
Lattice2D.Connection — Type
Connection単位胞内または単位胞間の接続ルール。
src_sub: 始点のサブ格子インデックス (1, 2, ...)dst_sub: 終点のサブ格子インデックスdx,dy: 終点がどの相対セルにあるか (0,0 なら同じ単位胞内)type: 結合の種類
Lattice2D.Honeycomb — Type
Honeycomb <: AbstractTopology{2}struct which represents Honeycomb lattice
Lattice2D.Kagome — Type
Kagome <: AbstractTopology{2}struct which represents Kagome lattice
Lattice2D.Lattice2D — Type
Lattice2D{Topology<:AbstractTopology, T, B<:AbstractBoundaryCondition} 2次元格子を表す型。
Lx::Int: x方向の格子サイズLy::Int: y方向の格子サイズN::Int: サイト総数positions::Vector{Vector{T}}: 各サイトの位置ベクトルnearest_neighbors::Vector{Vector{Int}}: 各サイトの最近接サイトのインデックスリストbonds::Vector{Bond}: 格子の辺のリストbasis_vectors::Vector{Vector{T}}: 格子の基底ベクトルreciprocal_vectors::Union{Vector{Vector{T}}, Nothing}: 逆格子ベクトルsublattice_ids::Vector{Int}: 各サイトのサブ格子IDis_bipartite::Bool: 格子が二部グラフかどうかsite_map::Union{Matrix{Int}, Nothing}: 格子上のサイトインデックスのマッピングtranslation_x::Vector{Int}: x方向の平行移動ベクトルtranslation_y::Vector{Int}: y方向の平行移動ベクトルboundary::B: 境界条件
Lattice2D.Lieb — Type
Lieb <: AbstractTopology{2}struct which represents Lieb lattice
Lattice2D.ShastrySutherland — Type
ShastrySutherland <: AbstractTopology{2}struct which represents Shastry-Sutherland lattice
Lattice2D.Square — Type
Square <: AbstractTopology{2}struct which represents Square lattice
Lattice2D.Triangular — Type
Triangular <: AbstractTopology{2}struct which represents Triangular lattice
Lattice2D.UnitCell — Type
UnitCell{D, T}格子の幾何学的定義データ。基本的に、この情報をもとに格子を構築する。 get_unit_cell(::Type{T}) 関数で各トポロジーに対応する単位胞データを取得する。
Lattice2D.build_lattice — Method
build_lattice(Topology::Type{<:AbstractTopology}, Lx::Int, Ly::Int; boundary::AbstractBoundaryCondition=PBC())Construct a lattice with the specified topology, size, and boundary conditions. this function is available if unitcell information is defined.
Lattice2D.calc_reciprocal_vectors — Method
calc_reciprocal_vectors(basis)Calculate reciprocal lattice vectors from the given basis vectors.
Lattice2D.check_bipartite_bfs — Method
check_bipartite_bfs(N, neighbors)check whether the given lattice is bipartite using BFS.
Lattice2D.get_unit_cell — Method
get_unit_cell(::Type{T}) where T <: AbstractTopologythis function returns the UnitCell associated with the given Topology type. If the Topology type is not recognized, it throws an error.