From 2005e53ac2ada1b628a460a17e092e959e635fc5 Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Mon, 27 Nov 2023 13:07:22 +0100 Subject: [PATCH] add the docs --- docs/src/params.md | 12 +++++++++--- docs/src/peps.md | 2 +- src/PEPS.jl | 32 ++++++++++++++++---------------- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/docs/src/params.md b/docs/src/params.md index 3fa99920..9eaf2e77 100644 --- a/docs/src/params.md +++ b/docs/src/params.md @@ -23,10 +23,16 @@ On the other hand, the `MPSAnnealing` method tailors the construction of MPS bas These approaches provide users with distinct strategies to efficiently contract the tensor network, catering to different preferences and requirements in the exploration of spin systems within the SpinGlassPEPS package. # Sparsity -In the domain of matrix operations, our package recognizes the significance of two primary approaches: +Our software package acknowledges the importance of two fundamental methodologies in tensor processing * `Dense` * `Sparse`. -The latter, referred to as sparsity, plays a pivotal role in various computational contexts. Frequently, the matrices involved in our calculations exhibit sparse characteristics, wherein a significant portion of their elements is zero. To accommodate this, our package offers the flexibility to choose the `Sparse` mode. This option not only optimizes memory usage but also substantially enhances computational efficiency, particularly when dealing with matrices characterized by a scarcity of non-zero entries. By selecting the sparse mode, users can leverage the inherent structure of these matrices, streamlining computations, and expediting solutions for intricate problems. This feature underscores our commitment to providing users with the tools to tailor their computational strategies based on the nature of the matrices involved, ensuring optimal performance across diverse scenarios. +The latter, referred to as sparsity, plays a pivotal role in manipulation on large tensors. To accommodate this, our package offers the flexibility to choose the `Sparse` mode. In this mode, tensors are not explicitly constructed but are storerd in structures and represented as blocks where not every dimension is contracted. This choice not only optimizes memory utilization but also significantly improves computational efficiency. In the `Dense` mode tensors are build explicitly. + +# Geometry +* SquareSingleNode +* SquareDoubleNode +* SquareCrossSingleNode +* SquareCrossDoubleNode # Layout Different decompositions of the network into MPS: @@ -39,7 +45,7 @@ Different decompositions of the network into MPS: ``` # Lattice transformations -The PEPS tensor network within our package stands out for its remarkable versatility, offering users the ability to undergo diverse transformations to meet distinct computational requirements. Notably, users can apply `rotations`, occurring in multiples of $\frac{\pi}{2}$ radians, and `reflections` along various axes. These transformations include rotations and reflections around the horizontal (x), vertical (y), diagonal, and antidiagonal axes. This comprehensive set of transformations empowers researchers to meticulously adjust the orientation and arrangement of the tensor network, providing the means to optimize it for specific problem-solving strategies or align it with the geometrical considerations of their chosen application domain. +Our package offers users the ability to undergo diverse transformations of PEPS network to meet distinct computational requirements. Notably, users can apply `rotations`, occurring in multiples of $\frac{\pi}{2}$ radians, and `reflections` along various axes. These transformations include rotations and reflections around the horizontal (x), vertical (y), diagonal, and antidiagonal axes. ```@docs all_lattice_transformations diff --git a/docs/src/peps.md b/docs/src/peps.md index ccd09527..fed2888b 100644 --- a/docs/src/peps.md +++ b/docs/src/peps.md @@ -1,6 +1,6 @@ # Constructing PEPS tensor network -After creating the clustered Hamiltonian, we can turn it into a PEPS tensor network as shown in the figure below. +After creating the clustered Hamiltonian, we can turn it into a PEPS tensor network as shown in the figure TODO(cite Brief description of the algorithm). ```@docs PEPSNetwork diff --git a/src/PEPS.jl b/src/PEPS.jl index e2d3702e..8465bab2 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -30,22 +30,22 @@ abstract type AbstractGibbsNetwork{S, T} end """ $(TYPEDSIGNATURES) -A mutable struct representing a Projected Entangled Pair States (PEPS) network. - -# Fields -- `clustered_hamiltonian::LabelledGraph`: The clustered Hamiltonian associated with the network. -- `vertex_map::Function`: A function mapping vertex coordinates to a transformed lattice. -- `lp::PoolOfProjectors`: A pool of projectors used in the network. -- `m::Int`: The number of rows in the PEPS lattice. -- `n::Int`: The number of columns in the PEPS lattice. -- `nrows::Int`: The effective number of rows based on lattice transformations. -- `ncols::Int`: The effective number of columns based on lattice transformations. -- `tensors_map::Dict{PEPSNode, Symbol}`: A dictionary mapping PEPS nodes to tensor symbols. -- `gauges::Gauges{T}`: Gauges used for gauge fixing operations. - -The `PEPSNetwork` struct represents a quantum network based on Projected Entangled Pair States (PEPS). -It holds information about the clustered Hamiltonian, lattice transformations, and gauge fixing operations. -PEPS networks are commonly used in quantum computing and quantum information theory to represent entangled states of qubits arranged on a lattice. + +Construct a Projected Entangled Pair States (PEPS) network. + +# Arguments +- `m::Int`: Number of rows in the PEPS lattice. +- `n::Int`: Number of columns in the PEPS lattice. +- `clustered_hamiltonian::LabelledGraph`: clustered hamiltonian representing the Hamiltonian. +- `transformation::LatticeTransformation`: Transformation of the PEPS lattice, as it can be rotated or reflected. +- `gauge_type::Symbol=:id`: Type of gauge to initialize (default is identity). + +# Type Parameters +- `T <: AbstractGeometry`: Type of geometry for the PEPS lattice. It can be `SquareSingleNode`, `SquareDoubleNode`, `SquareCrossSingleNode`, `SquareCrossDoubleNode`. +- `S <: AbstractSparsity`: Type of sparsity for the PEPS tensors: `Dense` or `Sparse`. + +# Returns +An instance of PEPSNetwork{T, S}. """ mutable struct PEPSNetwork{ T <: AbstractGeometry, S <: AbstractSparsity