Skip to content

Commit

Permalink
add the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
annamariadziubyna committed Nov 27, 2023
1 parent f226ff1 commit 2005e53
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
12 changes: 9 additions & 3 deletions docs/src/params.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/src/peps.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
32 changes: 16 additions & 16 deletions src/PEPS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2005e53

Please sign in to comment.