Skip to content

QuantumKitHub/TiledArrays.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LatticeArrays

LatticeArrays.jl is a Julia package designed to provide efficient and easy-to-use data structures for storing and manipulating arrays that live on a lattice. This package is ideal for applications that require spatially structured data storage and operations, such as simulations in physics.

Build Status

Installation

You can install LatticeArrays.jl using Julia's built-in package manager. Open the Julia REPL and type ] to enter the Pkg prompt. Then run the command:

pkg> add LatticeArrays

Or you can install it from the Julia REPL directly through the following command:

import Pkg
Pkg.add("LatticeArrays")

Features

  • Customizable lattices: Wide range of supported lattices in 1, 2, and 3 dimensions.
  • Easy access: Access elements using linear, Cartesian or hexagonal coordinates.
  • Iterators: Iterators for all sites, neighbors, and more.
  • Customizable boundary conditions: Periodic, open, or custom boundary conditions.

Basic Usage

To create a lattice array, simply specify the lattice type and the size of the lattice:

using LatticeArrays

# Create a 2D square lattice
lat_array = fill!(1.0, SquareArray{Float64}(8, 8))

Elements can be accessed and modified using standard indexing conventions.

# Access an element
value = lat_array[1, 1]

# Modify an element
lat_array[2, 3] = 2.0

Documentation

For more details on usage and APIs, please refer to the full documentation.

License

LatticeArrays.jl is MIT licensed. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages