Local dimensional reduction of cluster degrees of freedom
The SpinGlassPEPS.jl package addresses the computational challenges posed by large unit cells, which result in a high number of degrees of freedom per cluster. Contracting tensor networks generated from such Hamiltonians can become numerically expensive. To mitigate this, the package provides an optional local dimensional reduction feature, which reduces the problem's complexity by focusing on the most probable states within each cluster.
This dimensionality reduction is achieved by approximating the marginal probabilities of Potts variables using the Loopy Belief Propagation (LBP) algorithm. LBP iteratively updates messages between clusters and edges to approximate the likelihood of configurations within each cluster. While exact convergence is guaranteed only for tree-like graphs, this method effectively selects a subset of energetically favorable states, even for geometries with loops, such as Pegasus and Zephyr lattices. The details of the Loopy Belief Propagation algorithm are described in Ref.
SpinGlassPEPS.SpinGlassNetworks.truncate_potts_hamiltonian — Function
truncate_potts_hamiltonian(
potts_h,
β,
cs,
result_folder,
inst;
tol,
iter
) -> PottsHamiltonian
Truncate the Potts Hamiltonian using belief propagation or precomputed states.
This function reduces the dimensionality of a given Potts Hamiltonian by truncating its states. The process is guided by the Loopy Belief Propagation (LBP) algorithm, which estimates the marginal probabilities of states in the Potts model. If precomputed states are available, they are loaded from the specified result folder to skip recomputation.
Arguments:
potts_h: The input Potts Hamiltonian, represented as a labelled graph.β::Float64: The inverse temperature parameter controlling the distribution of states.cs::Int: The maximum number of states retained per cluster after truncation.result_folder::String: The folder path where results are stored or loaded.inst::String: The instance name used to identify stored results.tol::Float64: (Optional) Convergence tolerance for the belief propagation algorithm. Default is1e-6.iter::Int: The maximum number of iterations for the belief propagation algorithm.
Returns:
potts_h: A truncated Potts Hamiltonian with reduced state space, preserving the most relevant states per cluster.
SpinGlassPEPS.SpinGlassNetworks.potts_hamiltonian_2site — Function
potts_hamiltonian_2site(
potts_h::SpinGlassPEPS.SpinGlassNetworks.PottsLike,
beta::Real
) -> LabelledGraphs.LabelledGraph{MetaGraphs.MetaDiGraph{Int64, Float64}}
Construct a 2-site cluster approximation of a Potts Hamiltonian.
This function generates a new Potts Hamiltonian using a 2-site cluster approximation, specifically designed for geometries like Pegasus and Zephyr. In these geometries, clusters in the original Potts Hamiltonian are subdivided into smaller sub-clusters, which are then merged into unified 2-site clusters.
Arguments:
potts_h::LabelledGraph{S, T}: The input Potts Hamiltonian represented as a labelled graph, where vertices correspond to individual sub-clusters and edges define interactions between them.beta::Real: The inverse temperature parameter, used for computing the energy values and spectra of the 2-site clusters.
Returns:
new_potts_h::LabelledGraph{MetaDiGraph}: A labelled graph representing the new Potts Hamiltonian, where:- Vertices: Represent unified 2-site clusters.
- Edges: Capture interactions between these clusters, including energy values and associated projectors.
SpinGlassPEPS.SpinGlassNetworks.belief_propagation — Function
belief_propagation(
potts_h::SpinGlassPEPS.SpinGlassNetworks.PottsLike,
beta::Real;
tol,
iter
) -> Dict{Any, Any}
Perform loopy belief propagation on a given Potts Hamiltonian.
Arguments:
potts_h::LabelledGraph{S, T}: The Potts Hamiltonian represented as a labelled graph.beta::Real: The inverse temperature parameter for the belief propagation algorithm.tol::Real (optional, default=1e-6): The convergence tolerance. The algorithm stops when the message updates between iterations are smaller than this value.iter::Int (optional, default=1): The maximum number of iterations to perform.
Returns:
beliefs::Dict: A dictionary mapping the vertices of the Potts Hamiltonian to the computed belief distributions of states within each cluster.
The function implements loopy belief propagation on the given Potts Hamiltonian potts_h to calculate beliefs for each vertex. Belief propagation is an iterative algorithm that computes beliefs by passing messages between vertices and edges of the Potts Hamiltonian. The algorithm continues until convergence or until the specified maximum number of iterations is reached. The beliefs are computed based on the inverse temperature parameter beta, which controls the influence of energy values on the beliefs.
SpinGlassPEPS.SpinGlassNetworks.truncate_potts_hamiltonian_2site_BP — Function
truncate_potts_hamiltonian_2site_BP(
potts_h::SpinGlassPEPS.SpinGlassNetworks.PottsLike,
beliefs::Dict,
num_states::Int64;
...
) -> PottsHamiltonian
truncate_potts_hamiltonian_2site_BP(
potts_h::SpinGlassPEPS.SpinGlassNetworks.PottsLike,
beliefs::Dict,
num_states::Int64,
result_folder::String;
...
) -> PottsHamiltonian
truncate_potts_hamiltonian_2site_BP(
potts_h::SpinGlassPEPS.SpinGlassNetworks.PottsLike,
beliefs::Dict,
num_states::Int64,
result_folder::String,
inst::String;
beta
) -> PottsHamiltonian
Truncate a Potts Hamiltonian based on 2-site belief propagation states.
This function truncates the state space of a Potts Hamiltonian by leveraging 2-site belief propagation. In certain geometries, such as Pegasus or Zephyr, clusters in the Potts Hamiltonian are further divided into smaller sub-clusters. This function computes beliefs for the entire 2-site cluster and selects states that maximize the overall probability in a cluster.
Arguments:
potts_h::LabelledGraph{S, T}: The Potts Hamiltonian represented as a labelled graph.beliefs::Dict: A dictionary where keys are clusters (vertices) and values are the beliefs.num_states::Int: The maximum number of most probable states to retain for each cluster.result_folder::String (optional): Path to the folder where truncated states will be saved. Default is"results_folder".inst::String (optional): Instance name for saving or loading results. Default is"inst".beta::Real (optional): The inverse temperature parameter. Default is1.0.
Returns:
LabelledGraph{S, T}: A Potts Hamiltonian with reduced state space, preserving only the most probable states.