Constructing PEPS tensor network

After creating the Potts Hamiltonian, we can turn it into a PEPS tensor network as shown in the Section Brief description of the algorithm.

SpinGlassEngine.PEPSNetworkType

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.
  • potts_hamiltonian::LabelledGraph: Potts 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 node used within the PEPS tensor network. It can be SquareSingleNode, SquareDoubleNode, KingSingleNode, SquareCrossDoubleNode.
  • S <: AbstractSparsity: Type of sparsity for the PEPS tensors: Dense or Sparse.
  • R <: Real`: The numeric precision type for real values (e.g., Float64).

Returns

An instance of PEPSNetwork{T, S, R}.

source

Basic example of usage

using SpinGlassEngine, SpinGlassTensors, SpinGlassNetworks
using SpinGlassExhaustive

m, n, t = 5, 5, 4
onGPU = true
instance = "$(@__DIR__)/../../src/instances/square_diagonal/5x5/diagonal.txt"

Strategy = Zipper
transform = rotation(0)
Layout = GaugesEnergy
Sparsity = Sparse
R = Float64

ig = ising_graph(instance)
potts_h = potts_hamiltonian(
    ig,
    spectrum = full_spectrum,
    cluster_assignment_rule=super_square_lattice((m, n, t))
)

net = PEPSNetwork{KingSingleNode{Layout}, Sparsity, R}(m, n, potts_h, transform)
PEPSNetwork{KingSingleNode{GaugesEnergy}, Sparse, Float64}(LabelledGraphs.LabelledGraph{MetaGraphs.MetaDiGraph{Int64, Float64}, Tuple{Int64, Int64}}([(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5)  …  (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5)], {25, 72} directed Int64 metagraph with Float64 weights defined by :weight (default weight 1.0), Dict((4, 5) => 20, (1, 2) => 2, (3, 1) => 11, (2, 5) => 10, (1, 3) => 3, (1, 4) => 4, (5, 5) => 25, (3, 2) => 12, (3, 3) => 13, (4, 1) => 16…)), SpinGlassEngine.var"#vmap#18"(Core.Box(SpinGlassEngine.var"#2#10"())), PoolOfProjectors{Int64}(Dict{Symbol, Dict{Int64, Union{Vector{Int64}, CUDA.CuVector{Int64}, CUDA.DenseCuVector{Int64}}}}(:CPU => Dict(1 => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])), :CPU, Dict(1 => 16)), 5, 5, 5, 5, Dict{PEPSNode, Symbol}(PEPSNode(25//6, 3//2) => :gauge_h, PEPSNode(3//2, 9//2) => :central_d_single_node, PEPSNode(3, 1) => :sparse_site, PEPSNode(9//2, 5//2) => :central_d_single_node, PEPSNode(2, 5//2) => :sparse_virtual_single_node, PEPSNode(5, 7//2) => :sparse_virtual_single_node, PEPSNode(7//2, 1//2) => :central_d_single_node, PEPSNode(5, 5//2) => :sparse_virtual_single_node, PEPSNode(7//6, 7//2) => :gauge_h, PEPSNode(19//6, 4) => :gauge_h…), Gauges{KingSingleNode{GaugesEnergy}, Float64}(Dict{PEPSNode, AbstractArray{Float64}}(PEPSNode(25//6, 3//2) => [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0  …  1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], PEPSNode(7//6, 1//2) => [1.0], PEPSNode(7//6, 3//2) => [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0  …  1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], PEPSNode(7//6, 3) => [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], PEPSNode(13//6, 5//2) => [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0  …  1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], PEPSNode(4//3, 9//2) => [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0  …  1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], PEPSNode(10//3, 2) => [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], PEPSNode(13//3, 3) => [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], PEPSNode(4//3, 3) => [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], PEPSNode(7//3, 1//2) => [1.0]…), GaugeInfo[GaugeInfo((PEPSNode(7//6, 1//2), PEPSNode(4//3, 1//2)), PEPSNode(3//2, 1//2), 1, :gauge_h), GaugeInfo((PEPSNode(7//6, 1), PEPSNode(4//3, 1)), PEPSNode(3//2, 1), 1, :gauge_h), GaugeInfo((PEPSNode(7//6, 3//2), PEPSNode(4//3, 3//2)), PEPSNode(3//2, 3//2), 1, :gauge_h), GaugeInfo((PEPSNode(7//6, 2), PEPSNode(4//3, 2)), PEPSNode(3//2, 2), 1, :gauge_h), GaugeInfo((PEPSNode(7//6, 5//2), PEPSNode(4//3, 5//2)), PEPSNode(3//2, 5//2), 1, :gauge_h), GaugeInfo((PEPSNode(7//6, 3), PEPSNode(4//3, 3)), PEPSNode(3//2, 3), 1, :gauge_h), GaugeInfo((PEPSNode(7//6, 7//2), PEPSNode(4//3, 7//2)), PEPSNode(3//2, 7//2), 1, :gauge_h), GaugeInfo((PEPSNode(7//6, 4), PEPSNode(4//3, 4)), PEPSNode(3//2, 4), 1, :gauge_h), GaugeInfo((PEPSNode(7//6, 9//2), PEPSNode(4//3, 9//2)), PEPSNode(3//2, 9//2), 1, :gauge_h), GaugeInfo((PEPSNode(7//6, 5), PEPSNode(4//3, 5)), PEPSNode(3//2, 5), 1, :gauge_h)  …  GaugeInfo((PEPSNode(25//6, 1//2), PEPSNode(13//3, 1//2)), PEPSNode(9//2, 1//2), 1, :gauge_h), GaugeInfo((PEPSNode(25//6, 1), PEPSNode(13//3, 1)), PEPSNode(9//2, 1), 1, :gauge_h), GaugeInfo((PEPSNode(25//6, 3//2), PEPSNode(13//3, 3//2)), PEPSNode(9//2, 3//2), 1, :gauge_h), GaugeInfo((PEPSNode(25//6, 2), PEPSNode(13//3, 2)), PEPSNode(9//2, 2), 1, :gauge_h), GaugeInfo((PEPSNode(25//6, 5//2), PEPSNode(13//3, 5//2)), PEPSNode(9//2, 5//2), 1, :gauge_h), GaugeInfo((PEPSNode(25//6, 3), PEPSNode(13//3, 3)), PEPSNode(9//2, 3), 1, :gauge_h), GaugeInfo((PEPSNode(25//6, 7//2), PEPSNode(13//3, 7//2)), PEPSNode(9//2, 7//2), 1, :gauge_h), GaugeInfo((PEPSNode(25//6, 4), PEPSNode(13//3, 4)), PEPSNode(9//2, 4), 1, :gauge_h), GaugeInfo((PEPSNode(25//6, 9//2), PEPSNode(13//3, 9//2)), PEPSNode(9//2, 9//2), 1, :gauge_h), GaugeInfo((PEPSNode(25//6, 5), PEPSNode(13//3, 5)), PEPSNode(9//2, 5), 1, :gauge_h)]))