diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 06a2fb0..800dbbd 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-02T19:12:51","documenter_version":"1.4.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-02T19:13:15","documenter_version":"1.4.1"}} \ No newline at end of file diff --git a/dev/algorithm/index.html b/dev/algorithm/index.html index 5138b3c..9c4d984 100644 --- a/dev/algorithm/index.html +++ b/dev/algorithm/index.html @@ -1,2 +1,2 @@ -Brief description of the algorithm · SpinGlassPEPS.jl

Brief description of the algorithm

We consider tensor network based algorithm for finding ground state configurations of quasi-2D Ising problems. We employ tensor networks to represent the Gibbs distribution [1]. Then we use approximate tensor network contraction to efficiently identify the low-energy spectrum of some quasi-two-dimensional Hamiltonians [2].

Let us consider a classical Ising Hamiltonian

\[H(\underline{s}_N) = \sum_{\langle i, j\rangle \in \mathcal{E}} J_{ij} s_i s_j + \sum_{i =1}^N J_{ii} s_i\]

where $\underline{s}_N$ denotes a particular configuration of $N$ binary variables $s_i=\pm 1$. More generally, we mark sub-configurations of the first $k$ variables as $\underline{s}_k = (s_1, s_2, \ldots, s_k)$. Non-zero couplings $J_{ij} \in \mathbb{R}$ are input parameters of a given problem instance and form a connectivity graph $\mathcal{E}$.

Graphs with large unit cells

We assume that graph $\mathcal{E}$ forms a quasi-2D lattice. In real life applications such graphs have large unit cells approaching 24 spins. SpinGlassPEPS.jl allows for unit cells containing multiple spins.

Info

More information on lattice geometries you can find in section Lattice Geometries.

In order to adress this three types of geometries using tensor networks, we represent the problem as a clustered Hamiltonian. To that end we group together sets of variables. In this framework Ising problem translates to:

\[H(\underline{x}_{\bar{N}}) = \sum_{\langle m,n\rangle \in \mathcal{F}} E_{x_m x_n} + \sum_{n=1}^{\bar{N}} E_{x_n}\]

where $\mathcal{F}$ forms a 2D graph, in which we indicate nearest-neighbour interactions with blue lines, and diagonal connections with green lines in the picture above. Each $x_n$ takes $d$ values with $d=2^4$ for square diagonal, $d=2^{24}$ for Pegasus and $2^{16}$ for Zephyr geometry. $E_{x_n}$ is an intra-node energy of the corresponding binary-variables configuration, and $E_{x_n x_m}$ is inter-node energy.

Calculating conditional probabilities

We assume that finding low energy states is equivalent to finding most probable states. We represent the probability distribution as a PEPS tensor network.

\[ p(\underline{x}_{\bar{N}}) = \frac{1}{Z} \exp{(-\beta H(\underline{x}_{\bar{N}}))}\]

where $Z$ is a partition function and $\beta$ is inverse temperature. Once the PEPS tensor network is constructed, the probability distribution can be obtained by approximately contracting the tensor network, which is described in more details in subsection Tensor network contractions for optimization problems. Subsequently, we select only the configurations with the highest marginal probabilities

\[ p(\underline{x}_{n+1}) = p(x_{n+1} | \underline{x}_{n}) \times p(\underline{x}_{n})\]

By employing branch and bound search strategy iteratively row after row, we address the solution of Hamiltonian in the terms of conditional probabilities. This approach enables the identification of most probable (low-energy) spin configurations within the problem space.

Tensor network contractions for optimization problems

Branch and bound search relies on the calculation of conditional probabilities. To that end, we use tensor network techniques. Conditional probabilities are obtained by contracting a PEPS tensor network, which, although an NP-hard problem, can be computed approximately. The approach utilized is boundary MPS-MPO, which involves contracting a tensor network row by row and truncating the bond dimension.

  1. "Two-Dimensional Tensor Product Variational Formulation" T. Nishino, Y. Hieida, K. Okunishi, N. Maeshima, Y. Akutsu, A. Gendiar, Progr. Theor. Phys. 105, 409 (2001)

  2. "Approximate optimization, sampling, and spin-glass droplet discovery with tensor networks" Marek M. Rams, Masoud Mohseni, Daniel Eppens, Konrad Jałowiecki, Bartłomiej Gardas Phys. Rev. E 104, 025308 (2021) or arXiv version arXiv:1811.06518

  3. tnac4o

+Brief description of the algorithm · SpinGlassPEPS.jl

Brief description of the algorithm

We consider tensor network based algorithm for finding ground state configurations of quasi-2D Ising problems. We employ tensor networks to represent the Gibbs distribution [1]. Then we use approximate tensor network contraction to efficiently identify the low-energy spectrum of some quasi-two-dimensional Hamiltonians [2].

Let us consider a classical Ising Hamiltonian

\[H(\underline{s}_N) = \sum_{\langle i, j\rangle \in \mathcal{E}} J_{ij} s_i s_j + \sum_{i =1}^N J_{ii} s_i\]

where $\underline{s}_N$ denotes a particular configuration of $N$ binary variables $s_i=\pm 1$. More generally, we mark sub-configurations of the first $k$ variables as $\underline{s}_k = (s_1, s_2, \ldots, s_k)$. Non-zero couplings $J_{ij} \in \mathbb{R}$ are input parameters of a given problem instance and form a connectivity graph $\mathcal{E}$.

Graphs with large unit cells

We assume that graph $\mathcal{E}$ forms a quasi-2D lattice. In real life applications such graphs have large unit cells approaching 24 spins. SpinGlassPEPS.jl allows for unit cells containing multiple spins.

Info

More information on lattice geometries you can find in section Lattice Geometries.

In order to adress this three types of geometries using tensor networks, we represent the problem as a clustered Hamiltonian. To that end we group together sets of variables. In this framework Ising problem translates to:

\[H(\underline{x}_{\bar{N}}) = \sum_{\langle m,n\rangle \in \mathcal{F}} E_{x_m x_n} + \sum_{n=1}^{\bar{N}} E_{x_n}\]

where $\mathcal{F}$ forms a 2D graph, in which we indicate nearest-neighbour interactions with blue lines, and diagonal connections with green lines in the picture above. Each $x_n$ takes $d$ values with $d=2^4$ for square diagonal, $d=2^{24}$ for Pegasus and $2^{16}$ for Zephyr geometry. $E_{x_n}$ is an intra-node energy of the corresponding binary-variables configuration, and $E_{x_n x_m}$ is inter-node energy.

Calculating conditional probabilities

We assume that finding low energy states is equivalent to finding most probable states. We represent the probability distribution as a PEPS tensor network.

\[ p(\underline{x}_{\bar{N}}) = \frac{1}{Z} \exp{(-\beta H(\underline{x}_{\bar{N}}))}\]

where $Z$ is a partition function and $\beta$ is inverse temperature. Once the PEPS tensor network is constructed, the probability distribution can be obtained by approximately contracting the tensor network, which is described in more details in subsection Tensor network contractions for optimization problems. Subsequently, we select only the configurations with the highest marginal probabilities

\[ p(\underline{x}_{n+1}) = p(x_{n+1} | \underline{x}_{n}) \times p(\underline{x}_{n})\]

By employing branch and bound search strategy iteratively row after row, we address the solution of Hamiltonian in the terms of conditional probabilities. This approach enables the identification of most probable (low-energy) spin configurations within the problem space.

Tensor network contractions for optimization problems

Branch and bound search relies on the calculation of conditional probabilities. To that end, we use tensor network techniques. Conditional probabilities are obtained by contracting a PEPS tensor network, which, although an NP-hard problem, can be computed approximately. The approach utilized is boundary MPS-MPO, which involves contracting a tensor network row by row and truncating the bond dimension.

  1. "Two-Dimensional Tensor Product Variational Formulation" T. Nishino, Y. Hieida, K. Okunishi, N. Maeshima, Y. Akutsu, A. Gendiar, Progr. Theor. Phys. 105, 409 (2001)

  2. "Approximate optimization, sampling, and spin-glass droplet discovery with tensor networks" Marek M. Rams, Masoud Mohseni, Daniel Eppens, Konrad Jałowiecki, Bartłomiej Gardas Phys. Rev. E 104, 025308 (2021) or arXiv version arXiv:1811.06518

  3. tnac4o

diff --git a/dev/index.html b/dev/index.html index 654ff13..3ad4b50 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,3 +1,3 @@ Home · SpinGlassPEPS.jl

Welcome to SpinGlassPEPS.jl documentation!

Welcome to SpinGlassPEPS.jl, a open-source Julia package designed for heuristically solving Ising-type optimization problems defined on quasi-2D lattices and Random Markov Fields on 2D rectangular lattices.

Star us on GitHub!

If you have found this library useful, please consider starring the GitHub repository. This gives us an accurate lower bound of the satisfied users.

Overview

In this section we will provide a condensed overview of the package.

SpinGlassPEPS.jl is a collection of Julia packages bundled together under a single package SpinGlassPEPS.jl. It can be installed using the Julia package manager for Julia v1.6 and higher. Inside the Julia REPL, type ] to enter the Pkg REPL mode and then run

using Pkg; 
-Pkg.add("SpinGlassPEPS")

The package SpinGlassPEPS.jl includes:

  • SpinGlassTensors.jl - Package containing all necessary functionalities for creating and operating on tensors. It allows the use of both CPU and GPU.
  • SpinGlassNetworks.jl - Package containing all tools needed to construct a tensor network from a given instance.
  • SpinGlassEngine.jl - Package containing the solver itself and tools focused on finding and operating on droplets.

Our goals

SpinGlassPEPS.jl was created to heuristically solve Ising-type optimization problems defined on quasi-2D lattices or Random Markov Fields (RMF) on 2D rectangular lattices. This package combines advanced heuristics to address optimization challenges and employs tensor network contractions to compute conditional probabilities to identify the most probable states according to the Gibbs distribution. SpinGlassPEPS.jl is a tool for reconstructing the low-energy spectrum of Ising spin glass Hamiltonians and RMF Hamiltonians. Beyond energy computations, the package offers insights into spin configurations, associated probabilities, and retains the largest discarded probability during the branch and bound optimization procedure. Notably, SpinGlassPEPS.jl goes beyond ground states, introducing a unique feature for identifying and analyzing spin glass droplets — collective excitations crucial for understanding system dynamics beyond the fundamental ground state configurations.

Citing SpinGlassPEPS.jl

If you use SpinGlassPEPS.jl for academic research and wish to cite it, please use the following paper:

K. Jałowiecki, K. Domino, A. M. Dziubyna, M. M. Rams, B. Gardas and Ł. Pawela, “SpinGlassPEPS.jl: software to emulate quantum annealing processors”

Contributing

Contributions are always welcome:

  • Please report any issues and bugs that you encounter in Issues
  • Questions about SpinGlassPEPS.jl can be asked by directly opening up an Issue on its GitHub page
  • If you plan to contribute new features, extensions, bug fixes, etc, please first open an issue and discuss the feature with us.
Report the bug

Filling an issue to report a bug, counterintuitive behavior, or even to request a feature is extremely valuable in helping us prioritize what to work on, so don't hestitate.

+Pkg.add("SpinGlassPEPS")

The package SpinGlassPEPS.jl includes:

Our goals

SpinGlassPEPS.jl was created to heuristically solve Ising-type optimization problems defined on quasi-2D lattices or Random Markov Fields (RMF) on 2D rectangular lattices. This package combines advanced heuristics to address optimization challenges and employs tensor network contractions to compute conditional probabilities to identify the most probable states according to the Gibbs distribution. SpinGlassPEPS.jl is a tool for reconstructing the low-energy spectrum of Ising spin glass Hamiltonians and RMF Hamiltonians. Beyond energy computations, the package offers insights into spin configurations, associated probabilities, and retains the largest discarded probability during the branch and bound optimization procedure. Notably, SpinGlassPEPS.jl goes beyond ground states, introducing a unique feature for identifying and analyzing spin glass droplets — collective excitations crucial for understanding system dynamics beyond the fundamental ground state configurations.

Citing SpinGlassPEPS.jl

If you use SpinGlassPEPS.jl for academic research and wish to cite it, please use the following paper:

K. Jałowiecki, K. Domino, A. M. Dziubyna, M. M. Rams, B. Gardas and Ł. Pawela, “SpinGlassPEPS.jl: software to emulate quantum annealing processors”

Contributing

Contributions are always welcome:

Report the bug

Filling an issue to report a bug, counterintuitive behavior, or even to request a feature is extremely valuable in helping us prioritize what to work on, so don't hestitate.

diff --git a/dev/intro/index.html b/dev/intro/index.html index d48270d..d1d084c 100644 --- a/dev/intro/index.html +++ b/dev/intro/index.html @@ -20,4 +20,4 @@ spectrum = full_spectrum, cluster_assignment_rule=super_square_lattice((m, n, t)) )

The next part of the code builds the PEPS tensor network compatible with previously defined clustered Hamiltonian.

net = PEPSNetwork{SquareCrossSingleNode{Layout}, Sparsity}(m, n, cl_h, transform)

In order to start calculating conditional probabilities we need to define MpsContractor structure which stores the elements and information necessary for contracting the tensor network and, consequently, calculating the probability of a given configuration.

ctr = MpsContractor{Strategy, NoUpdate}(net, [β], graduate_truncation, params; onGPU=onGPU)

Finally the call

sol_peps, schmidts = low_energy_spectrum(ctr, search_params, merge_branches(ctr, :fit, SingleLayerDroplets(eng, hamming_dist, :hamming)))
-

which runs branch and bound algorithm included in SpinGlassPEPS.jl It is actual solver, which iteratively explores the state space in search of the most probable states. The probabilities of a given configuration are calculated approximately through the contractions of the tensor network.

Expected output

The function low_energy_spectrum, as its output, provides a wealth of information, which we will briefly discuss now.

sol_peps, schmidt_val = low_energy_spectrum(ctr, search_params, merge_branches(ctr))

It returns a Solution-type structure (sol_peps) and Schmidt values schmidt_val. In the Solution structure, the following information is recorded:

If you want to display it, you can type:

println(sol_peps.energies)

In this case, you should obtain:

[-215.23679958927175]
println(sol_peps.states)
println([[4, 4, 2, 16, 9, 8, 8, 2, 3, 8, 7, 1, 4, 10, 9, 2, 11, 2, 1, 2, 11, 3, 11, 8, 3]])
println(sol_peps.probabilities)
[-5.637640487579043]
println(sol_peps.degeneracy)
[2]
println(sol_peps.largest_discarded_probability)
-4.70579014404923
println(schmidt_val)

which are

Dict{Any, Any}(5 => Any[1.0, 1.0, 0.0035931343796194565, 0.0015050888555964259, 0.0007184752751868924, 5.2741877514519126e-5, 4.137035816131772e-5, 0.00040017490729592366, 0.00021874495320028077, 6.827849766898342e-5], 4 => Any[1.0, 1.0, 1.704951518711975e-5, 0.00037890798675182353, 0.00011310427642297989, 0.001014257142680146, 0.0012672631937840461, 0.0005487312667512858, 0.0006741839581781018, 0.00012017531445170455], 6 => Any[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], 2 => Any[1.0, 1.0, 0.0001405854472578707, 0.0012280075890260514, 0.001177462193268373, 0.0029570115655969827, 0.002997829968910592, 0.0011163442379909382, 0.0010056280784881478, 0.00026431187613365595], 3 => Any[1.0, 1.0, 1.864183962070951e-5, 0.006059161388679921, 0.006793028602573968, 0.012337242616802302, 0.011721497080177857, 0.013791830543357657, 0.020430181282353188, 0.014653186648427675])
println(minimum(values(ctr.statistics)))

The output should give you

0.0
+

which runs branch and bound algorithm included in SpinGlassPEPS.jl It is actual solver, which iteratively explores the state space in search of the most probable states. The probabilities of a given configuration are calculated approximately through the contractions of the tensor network.

Expected output

The function low_energy_spectrum, as its output, provides a wealth of information, which we will briefly discuss now.

sol_peps, schmidt_val = low_energy_spectrum(ctr, search_params, merge_branches(ctr))

It returns a Solution-type structure (sol_peps) and Schmidt values schmidt_val. In the Solution structure, the following information is recorded:

If you want to display it, you can type:

println(sol_peps.energies)

In this case, you should obtain:

[-215.23679958927175]
println(sol_peps.states)
println([[4, 4, 2, 16, 9, 8, 8, 2, 3, 8, 7, 1, 4, 10, 9, 2, 11, 2, 1, 2, 11, 3, 11, 8, 3]])
println(sol_peps.probabilities)
[-5.637640487579043]
println(sol_peps.degeneracy)
[2]
println(sol_peps.largest_discarded_probability)
-4.70579014404923
println(schmidt_val)

which are

Dict{Any, Any}(5 => Any[1.0, 1.0, 0.0035931343796194565, 0.0015050888555964259, 0.0007184752751868924, 5.2741877514519126e-5, 4.137035816131772e-5, 0.00040017490729592366, 0.00021874495320028077, 6.827849766898342e-5], 4 => Any[1.0, 1.0, 1.704951518711975e-5, 0.00037890798675182353, 0.00011310427642297989, 0.001014257142680146, 0.0012672631937840461, 0.0005487312667512858, 0.0006741839581781018, 0.00012017531445170455], 6 => Any[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], 2 => Any[1.0, 1.0, 0.0001405854472578707, 0.0012280075890260514, 0.001177462193268373, 0.0029570115655969827, 0.002997829968910592, 0.0011163442379909382, 0.0010056280784881478, 0.00026431187613365595], 3 => Any[1.0, 1.0, 1.864183962070951e-5, 0.006059161388679921, 0.006793028602573968, 0.012337242616802302, 0.011721497080177857, 0.013791830543357657, 0.020430181282353188, 0.014653186648427675])
println(minimum(values(ctr.statistics)))

The output should give you

0.0
diff --git a/dev/sge/api/index.html b/dev/sge/api/index.html index 978da5d..65b37b9 100644 --- a/dev/sge/api/index.html +++ b/dev/sge/api/index.html @@ -376,4 +376,4 @@ ctr::MpsContractor{S}, current_node ) -> Any -

Precompute conditional probabilities and energies for a square cross double node tensor contraction.

Arguments

Returns

Description

The precompute_conditional function computes and returns precomputed conditional probabilities and energies for the specified square cross double node tensor contraction. It takes into account the geometry of the tensor network, interaction energies, and projectors. The precomputed values are used during the tensor contraction process to speed up the computation. The function is specialized for the SquareCrossDoubleNode tensor network type and is parametrized by the layout type S of the contractor.

source +

Precompute conditional probabilities and energies for a square cross double node tensor contraction.

Arguments

Returns

Description

The precompute_conditional function computes and returns precomputed conditional probabilities and energies for the specified square cross double node tensor contraction. It takes into account the geometry of the tensor network, interaction energies, and projectors. The precomputed values are used during the tensor contraction process to speed up the computation. The function is specialized for the SquareCrossDoubleNode tensor network type and is parametrized by the layout type S of the contractor.

source diff --git a/dev/sge/guide/index.html b/dev/sge/guide/index.html index 34dad23..4d287a3 100644 --- a/dev/sge/guide/index.html +++ b/dev/sge/guide/index.html @@ -1,2 +1,2 @@ -User Guide · SpinGlassPEPS.jl

Introduction

A Julia package for finding low energy spectrum of Ising spin systems. Part of SpinGlassPEPS package.

This part of the documentation is dedicated to describing the SpinGlassEngine.jl package, which serves as the actual solver. First, we will demonstrate how to construct a tensor network using the clustered Hamiltonian obtained with the SpinGlassNetworks.jl package. Next, we discuss the parameters necessary for conducting calculations, which the user should provide. Finally, we present functions that enable the discovery of low-energy spectra.

+User Guide · SpinGlassPEPS.jl

Introduction

A Julia package for finding low energy spectrum of Ising spin systems. Part of SpinGlassPEPS package.

This part of the documentation is dedicated to describing the SpinGlassEngine.jl package, which serves as the actual solver. First, we will demonstrate how to construct a tensor network using the clustered Hamiltonian obtained with the SpinGlassNetworks.jl package. Next, we discuss the parameters necessary for conducting calculations, which the user should provide. Finally, we present functions that enable the discovery of low-energy spectra.

diff --git a/dev/sge/index.html b/dev/sge/index.html index 1e8d728..1752e39 100644 --- a/dev/sge/index.html +++ b/dev/sge/index.html @@ -1,2 +1,2 @@ -SpinGlassEngine · SpinGlassPEPS.jl
+SpinGlassEngine · SpinGlassPEPS.jl
diff --git a/dev/sge/params/index.html b/dev/sge/params/index.html index bf8d609..998b536 100644 --- a/dev/sge/params/index.html +++ b/dev/sge/params/index.html @@ -1,4 +1,4 @@ Search parameters · SpinGlassPEPS.jl

Contracting PEPS tensor network

Once we construct the tensor network, we can proceed with its contraction. The first step involves preparing structures to store information about the approximate contraction using the MPS-MPO method and the exploration of states through the branch-and-bound algorithm.

SpinGlassEngine.MpsContractorType

A mutable struct representing a contractor for contracting a PEPS (Projected Entangled Pair States) network using the MPO-MPS (Matrix Product Operator - Matrix Product State) scheme.

Fields

  • peps::PEPSNetwork{T, S}: The PEPS network to be contracted.
  • betas::Vector{<:Real}: A vector of inverse temperatures (β) used during the search. The last one is the target one. This parameter plays a crucial role: a larger β enables a finer focus on low-energy states, although it may compromise the numerical stability of tensor network contraction. Determining the optimal β could be instance-dependent, and experimental exploration might be necessary for different classes of instances.
  • graduate_truncation::Symbol: The truncation method to use for gradually truncating MPS bond dimensions.
  • params::MpsParameters: Control parameters for the MPO-MPS contraction.

Optional Arguments

  • onGPU::Bool: A flag indicating whether the contraction is performed on a GPU. Default is true.
  • depth: An integer specifying the iteration depth for variational sweeps in Zipper algorithm. Default is 0 which means variational sweep is done on all lattice sites.

The MpsContractor function defines the contractor structure responsible for contracting a PEPS network using the MPO-MPS scheme. It encapsulates various components and settings required for the contraction process.

source

Structures to store parameters used in branch and bound search

SpinGlassEngine.MpsParametersType

A struct representing control parameters for the MPO-MPS (Matrix Product Operator - Matrix Product State) scheme used to contract a PEPS (Projected Entangled Pair States) network.

Fields

  • bond_dimension::Int: The maximum bond dimension to be used during contraction.
  • variational_tol::Real: The tolerance for the variational solver used in MPS optimization. It gives the condition for overlap convergence during one sweep in boundary MPS. Default is 1E-8.
  • max_num_sweeps::Int: The maximum number of sweeps to perform during variational compression. Default is 4.
  • tol_SVD::Real: The tolerance used in singular value decomposition (SVD) operations. It means that smaller singular values are truncated. Default is 1E-16.
  • iters_svd::Int: The number of iterations to perform in SVD computations. Default is 1.
  • iters_var::Int: The number of iterations for variational optimization. Default is 1.
  • Dtemp_multiplier::Int: A multiplier for the bond dimension when temporary bond dimensions are computed. Default is 2.
  • method::Symbol: The type of SVD method to use (e.g., :psvd_sparse). Default is :psvd_sparse.

The MpsParameters struct encapsulates various control parameters that influence the behavior and accuracy of the MPO-MPS contraction scheme used for PEPS network calculations.

source
SpinGlassEngine.SearchParametersType

A struct representing search parameters for low-energy spectrum search.

Fields

  • max_states::Int: The maximum number of states to be considered during the search. Default is 1, indicating a single state search.
  • cut_off_prob::Real: The cutoff probability for terminating the search. Default is 0.0, meaning no cutoff based on probability.

SearchParameters encapsulates parameters that control the behavior of low-energy spectrum search algorithms in the SpinGlassPEPS package.

source

Strategy

In the boundary MPS-MPO approach we apply Matrix Product Operator (MPO) to appropriate sites of Matrix Product State (MPS). In this context, the absorption of a MPO into a MPS leads to an exponential growth of the bond dimension. Hence, a truncation scheme is necessary to mitigate this issue and to keep the bond dimension in a reasonable size. Our package offers users the flexibility to choose between three distinct methods for optimizing the boundary MPS used in contracting the tensor network:

  • Zipper
  • MPSAnnealing
  • SVDTruncate.

Zipper method combines randomized truncated Singular Value Decomposition (SVD) and a variational scheme.

With the SVDTruncate method, the Matrix Product State (MPS) is systematically constructed row by row, contracted with the Matrix Product Operator (MPO) from the preceding row. The resulting MPS undergoes a Singular Value Decomposition (SVD) to truncate its bond dimension, followed by variational compression.

On the other hand, the MPSAnnealing method tailors the construction of MPS based on variational compression.

Sparsity

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 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 stored in structures and represented as blocks, in which 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
SpinGlassEngine.SquareSingleNodeType

A geometric structure representing a 1-layer grid with nodes arranged in a grid of rows and columns.

Type Parameters

  • T <: AbstractTensorsLayout: The layout of decomposition of tensors into MPS. Can be GaugesEnergy, EnergyGauges or EngGaugesEng.

Constructors

  • SquareDoubleNode(layout::T): Create a SquareDoubleNode with the specified tensor layout.
source
  • SquareDoubleNode
SpinGlassEngine.SquareDoubleNodeType

A geometric structure representing a 2-layer grid with nodes arranged in rows and columns. Each node is labeled with a tuple (i, j, k), where i is the row index, j is the column index, and k is the layer index (1 or 2).

Type Parameters

  • T <: AbstractTensorsLayout: The layout of decomposition of tensors into MPS. Can be GaugesEnergy, EnergyGauges or EngGaugesEng.

Constructors

  • SquareDoubleNode(layout::T): Create a SquareDoubleNode with the specified tensor layout.
source
  • SquareCrossSingleNode
SpinGlassEngine.SquareCrossSingleNodeType

A geometric structure representing a 1-layer grid with nodes arranged in a grid of rows and columns, and additional diagonal edges forming a cross pattern between neighboring nodes.

Type Parameters

  • T <: AbstractTensorsLayout: The layout of decomposition of tensors into MPS. Can be GaugesEnergy, EnergyGauges or EngGaugesEng.

Constructors

  • SquareCrossSingleNode(layout::T): Create a SquareCrossSingleNode with the specified tensor layout.
source
  • SquareCrossDoubleNode
SpinGlassEngine.SquareCrossDoubleNodeType

A geometric structure representing a 2-layer grid with nodes arranged in rows and columns, and additional diagonal edges forming a cross pattern between neighboring nodes. Each node is labeled with a tuple (i, j, k), where i is the row index, j is the column index, and k is the layer index (1 or 2).

Type Parameters

  • T <: AbstractTensorsLayout: The layout of decomposition of tensors into MPS. Can be GaugesEnergy, EnergyGauges or EngGaugesEng.

Constructors

  • SquareCrossSingleNode(layout::T): Create a SquareCrossDoubleNode with the specified tensor layout.

Description

SquareCrossDoubleNode is a geometry type that models a double unit cell square lattice with diagonal interaction. This geometry is suitable for systems with tensors laid out according to the specified AbstractTensorsLayout. It can be used in Pegasus and Zephyr graphs.

source

Layout

SpinGlassPEPS.jl allows for different decompositions of the network into MPOs:

  • GaugesEnergy
  • EnergyGauges
  • EngGaugesEng

For complex problems, the solution may depend on the choice of decomposition.

Lattice transformations

Our package offers users the ability to undergo diverse transformations of PEPS network. 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. Transformations are used to contract PEPS and perform search starting from different sites of the lattice.

SpinGlassEngine.all_lattice_transformationsConstant

A tuple containing all possible lattice transformations.

This constant includes rotations at angles 0, 90, 180, and 270 degrees, as well as reflections across the x-axis, y-axis, diagonal, and antidiagonal axes. These lattice transformations can be applied to the PEPS lattice to achieve various orientations and reflections in order to start the search on a different sites of lattice.

source
SpinGlassEngine.rotationFunction
rotation(θ::Int64) -> LatticeTransformation
 

Create a rotation transformation by a specified angle.

Arguments

  • θ::Int: The angle of rotation, expressed in degrees. Only integral multiples of 90° can be passed as θ.

Returns

A LatticeTransformation object representing the specified rotation transformation.

source
SpinGlassEngine.reflectionFunction
reflection(axis::Symbol) -> LatticeTransformation
-

Create a reflection transformation along the specified axis.

Arguments

  • axis::Symbol: The axis of reflection, which can be one of the following:
    • :x for reflection along the x-axis.
    • :y for reflection along the y-axis.
    • :diag for reflection along the main diagonal.
    • :antydiag for reflection along the anti-diagonal.

Returns

A LatticeTransformation object representing the specified reflection transformation.

source

Gauge

Currently only NoUpdate mode is supported.

+

Create a reflection transformation along the specified axis.

Arguments

Returns

A LatticeTransformation object representing the specified reflection transformation.

source

Gauge

Currently only NoUpdate mode is supported.

diff --git a/dev/sge/peps/index.html b/dev/sge/peps/index.html index ebab10d..0ac7d84 100644 --- a/dev/sge/peps/index.html +++ b/dev/sge/peps/index.html @@ -18,4 +18,4 @@ cluster_assignment_rule=super_square_lattice((m, n, t)) ) -net = PEPSNetwork{SquareCrossSingleNode{Layout}, Sparsity}(m, n, cl_h, transform)
PEPSNetwork{SquareCrossSingleNode{GaugesEnergy}, Sparse}(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) => :gauge_h, PEPSNode(3, 4) => :sparse_site, PEPSNode(4, 3) => :sparse_site, PEPSNode(7//3, 2) => :gauge_h, PEPSNode(4//3, 3//2) => :gauge_h, PEPSNode(4, 5) => :sparse_site, PEPSNode(11//2, 5) => :central_v_single_node, PEPSNode(19//6, 5//2) => :gauge_h, PEPSNode(7//3, 5//2) => :gauge_h, PEPSNode(4, 1//2) => :sparse_virtual_single_node…), Gauges{SquareCrossSingleNode{GaugesEnergy}}(Dict{PEPSNode, AbstractArray{<:Real}}(PEPSNode(25//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, 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(25//6, 7//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, 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//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, 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(7//3, 1) => [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//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//3, 5) => [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) => [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]…), 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)]))
+net = PEPSNetwork{SquareCrossSingleNode{Layout}, Sparsity}(m, n, cl_h, transform)
PEPSNetwork{SquareCrossSingleNode{GaugesEnergy}, Sparse}(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(10//3, 2) => :gauge_h, PEPSNode(25//6, 1//2) => :gauge_h, PEPSNode(10//3, 3) => :gauge_h, PEPSNode(5, 1//2) => :sparse_virtual_single_node, PEPSNode(3//2, 1//2) => :central_d_single_node, PEPSNode(13//3, 4) => :gauge_h, PEPSNode(10//3, 5) => :gauge_h, PEPSNode(1, 3//2) => :sparse_virtual_single_node, PEPSNode(3, 1) => :sparse_site, PEPSNode(11//2, 4) => :central_v_single_node…), Gauges{SquareCrossSingleNode{GaugesEnergy}}(Dict{PEPSNode, AbstractArray{<:Real}}(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(25//6, 1//2) => [1.0], PEPSNode(7//3, 1) => [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(25//6, 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(4//3, 1) => [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, 7//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, 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(10//3, 1//2) => [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(10//3, 1) => [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]…), 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)]))
diff --git a/dev/sge/search/index.html b/dev/sge/search/index.html index b95c383..0f0c224 100644 --- a/dev/sge/search/index.html +++ b/dev/sge/search/index.html @@ -44,4 +44,4 @@ merge_type::Symbol, update_droplets ) -> SpinGlassEngine.var"#_merge_blur#381"{MpsContractor{T, R}, Int64, Symbol} where {T, R<:SpinGlassEngine.AbstractGauge} -

Generate a function for merging branches in a Gibbs network with a Hamming distance blur.

Arguments

Returns

A function _merge_blur that can be used to merge branches with Hamming distance blur in a solution.

Description

This function generates a function for merging branches in a Gibbs network with Hamming distance blur. The resulting function takes a partial solution as an input and performs the merging process, considering Hamming distance constraints. It returns a new solution with the merged branches. The Hamming distance blur helps in selecting diverse states during the merging process. States with Hamming distances greater than or equal to the specified cutoff are considered distinct.

source

Results of the branch and bound search are stored in a Solution structure.

SpinGlassEngine.SolutionType

A struct representing a solution obtained from a low-energy spectrum search.

Fields

  • energies::Vector{<:Real}: A vector containing the energies of the discovered states.
  • states::Vector{Vector{Int}}: A vector of state configurations corresponding to the energies.
  • probabilities::Vector{<:Real}: The probabilities associated with each discovered state.
  • degeneracy::Vector{Int}: The degeneracy of each energy level.
  • largest_discarded_probability::Real: The largest probability of the largest discarded state.
  • droplets::Vector{Droplets}: A vector of droplets associated with each state.
  • spins::Vector{Vector{Int}}: The spin configurations corresponding to each state.

The Solution struct holds information about the results of a low-energy spectrum search, including the energy levels, state configurations, probabilities, degeneracy, and additional details such as droplets and spin configurations. Users can access this information to analyze and interpret the search results.

source

Droplet search

SpinGlassPEPS.jl offers the possibility not only finding low lying energy states, but also droplet excitations. In order to search for droplets, one need to choose the option SingleLayerDroplets in merge_branches.

SpinGlassEngine.SingleLayerDropletsType

A data structure representing the properties and criteria for single-layer droplets in the context of the SpinGlassPEPS package.

A SingleLayerDroplets object is used to specify the maximum energy, minimum size, and metric for single-layer droplets in the SpinGlassPEPS system.

Fields

  • max_energy::Real: The maximum allowed excitation energy for single-layer droplets. It is typically a real number.
  • min_size::Int: The minimum size (Hamming cutoff) required for a single-layer droplet to be considered significant.
  • metric::Symbol: The metric used to evaluate the significance of a single-layer droplet. Default is :no_metric. :hamming treats Hamming distances as matric.
  • mode::Symbol: :Ising assumes Ising-type representation of the problem. :RMF assumes a Random Markov Field type model. Default is :Ising.

Constructors

  • SingleLayerDroplets(max_energy::Real = 1.0, min_size::Int = 1, metric::Symbol = :no_metric, mode = :Ising): Creates a new SingleLayerDroplets object with the specified maximum energy, minimum size, metric and mode.
source
+

Generate a function for merging branches in a Gibbs network with a Hamming distance blur.

Arguments

Returns

A function _merge_blur that can be used to merge branches with Hamming distance blur in a solution.

Description

This function generates a function for merging branches in a Gibbs network with Hamming distance blur. The resulting function takes a partial solution as an input and performs the merging process, considering Hamming distance constraints. It returns a new solution with the merged branches. The Hamming distance blur helps in selecting diverse states during the merging process. States with Hamming distances greater than or equal to the specified cutoff are considered distinct.

source

Results of the branch and bound search are stored in a Solution structure.

SpinGlassEngine.SolutionType

A struct representing a solution obtained from a low-energy spectrum search.

Fields

  • energies::Vector{<:Real}: A vector containing the energies of the discovered states.
  • states::Vector{Vector{Int}}: A vector of state configurations corresponding to the energies.
  • probabilities::Vector{<:Real}: The probabilities associated with each discovered state.
  • degeneracy::Vector{Int}: The degeneracy of each energy level.
  • largest_discarded_probability::Real: The largest probability of the largest discarded state.
  • droplets::Vector{Droplets}: A vector of droplets associated with each state.
  • spins::Vector{Vector{Int}}: The spin configurations corresponding to each state.

The Solution struct holds information about the results of a low-energy spectrum search, including the energy levels, state configurations, probabilities, degeneracy, and additional details such as droplets and spin configurations. Users can access this information to analyze and interpret the search results.

source

Droplet search

SpinGlassPEPS.jl offers the possibility not only finding low lying energy states, but also droplet excitations. In order to search for droplets, one need to choose the option SingleLayerDroplets in merge_branches.

SpinGlassEngine.SingleLayerDropletsType

A data structure representing the properties and criteria for single-layer droplets in the context of the SpinGlassPEPS package.

A SingleLayerDroplets object is used to specify the maximum energy, minimum size, and metric for single-layer droplets in the SpinGlassPEPS system.

Fields

  • max_energy::Real: The maximum allowed excitation energy for single-layer droplets. It is typically a real number.
  • min_size::Int: The minimum size (Hamming cutoff) required for a single-layer droplet to be considered significant.
  • metric::Symbol: The metric used to evaluate the significance of a single-layer droplet. Default is :no_metric. :hamming treats Hamming distances as matric.
  • mode::Symbol: :Ising assumes Ising-type representation of the problem. :RMF assumes a Random Markov Field type model. Default is :Ising.

Constructors

  • SingleLayerDroplets(max_energy::Real = 1.0, min_size::Int = 1, metric::Symbol = :no_metric, mode = :Ising): Creates a new SingleLayerDroplets object with the specified maximum energy, minimum size, metric and mode.
source
diff --git a/dev/sgn/api/index.html b/dev/sgn/api/index.html index 025eba5..a8831a7 100644 --- a/dev/sgn/api/index.html +++ b/dev/sgn/api/index.html @@ -147,4 +147,4 @@ Nx::Union{Nothing, Integer}, Ny::Union{Nothing, Integer} ) -> Dict -

Loads some factored graphs written in openGM format. Assumes rectangular lattice.

Args: filename (str): a path to file with factor graph in openGM format. ints Nx, Ny: it is assumed that graph if forming an :math:Nx imes N_y lattice with nearest-neighbour interactions only.

Returns: dictionary with factors and funcitons defining the energy functional.

source +

Loads some factored graphs written in openGM format. Assumes rectangular lattice.

Args: filename (str): a path to file with factor graph in openGM format. ints Nx, Ny: it is assumed that graph if forming an :math:Nx imes N_y lattice with nearest-neighbour interactions only.

Returns: dictionary with factors and funcitons defining the energy functional.

source diff --git a/dev/sgn/bp/index.html b/dev/sgn/bp/index.html index bae45f5..a2f0d1a 100644 --- a/dev/sgn/bp/index.html +++ b/dev/sgn/bp/index.html @@ -30,4 +30,4 @@ inst::String; beta ) -> LabelledGraphs.LabelledGraph{MetaGraphs.MetaDiGraph{Int64, Float64}} -

Truncate a clustered Hamiltonian based on 2-site belief propagation states.

This function truncates a clustered Hamiltonian by considering 2-site belief propagation states and selecting the most probable states to keep. It computes the beliefs for all 2-site combinations and selects the states that maximize the probability.

Arguments:

Returns:

source +

Truncate a clustered Hamiltonian based on 2-site belief propagation states.

This function truncates a clustered Hamiltonian by considering 2-site belief propagation states and selecting the most probable states to keep. It computes the beliefs for all 2-site combinations and selects the states that maximize the probability.

Arguments:

Returns:

source diff --git a/dev/sgn/clh/index.html b/dev/sgn/clh/index.html index 800dfdc..b5d0c07 100644 --- a/dev/sgn/clh/index.html +++ b/dev/sgn/clh/index.html @@ -26,4 +26,4 @@ cl_h = clustered_hamiltonian( ig, cluster_assignment_rule = super_square_lattice((5,5,4)) -)
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…))
+)
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…))
diff --git a/dev/sgn/index.html b/dev/sgn/index.html index 65de459..2fee3e7 100644 --- a/dev/sgn/index.html +++ b/dev/sgn/index.html @@ -1,2 +1,2 @@ -SpinGlassNetworks · SpinGlassPEPS.jl
+SpinGlassNetworks · SpinGlassPEPS.jl
diff --git a/dev/sgn/ising/index.html b/dev/sgn/ising/index.html index 20e908b..116600e 100644 --- a/dev/sgn/ising/index.html +++ b/dev/sgn/ising/index.html @@ -5,4 +5,4 @@ ig = ising_graph(instance) # View graph properties -@show biases(ig), couplings(ig)
([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0  …  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0 -0.935080082835686 … 0.0 0.0; 0.0 0.0 … 0.0 0.0; … ; 0.0 0.0 … 0.0 -0.6713059673107826; 0.0 0.0 … 0.0 0.0])
+@show biases(ig), couplings(ig)
([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0  …  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0 -0.935080082835686 … 0.0 0.0; 0.0 0.0 … 0.0 0.0; … ; 0.0 0.0 … 0.0 -0.6713059673107826; 0.0 0.0 … 0.0 0.0])
diff --git a/dev/sgn/lattice/index.html b/dev/sgn/lattice/index.html index 84187a8..3801a65 100644 --- a/dev/sgn/lattice/index.html +++ b/dev/sgn/lattice/index.html @@ -59,4 +59,4 @@ cluster_assignment_rule = zephyr_lattice((m, n, t)) ) -println("Number of nodes in oryginal instance: ", length(LabelledGraphs.vertices(ig)))
Number of nodes in oryginal instance: 332
+println("Number of nodes in oryginal instance: ", length(LabelledGraphs.vertices(ig)))
Number of nodes in oryginal instance: 332
diff --git a/dev/sgn/userguide/index.html b/dev/sgn/userguide/index.html index c52f7cf..471900a 100644 --- a/dev/sgn/userguide/index.html +++ b/dev/sgn/userguide/index.html @@ -1,2 +1,2 @@ -User guide · SpinGlassPEPS.jl

Introduction

A Julia package for building and interacting with Ising spin glass models in context of tensor networks. Part of SpinGlassPEPS package.

The contents of our package are illustrated through comprehensive examples, showcasing the practical utilization of key functions. Specifically, the ising_graph function is highlighted, demonstrating its capacity to generate Ising model graphs — a fundamental step in modeling spin systems. Additionally, the clustered_hamiltonian function is presented as a tool for converting Ising graphs into clustered Hamiltonians. The package delves into various lattice geometries, providing insights into constructing diverse structures such as the super_square_lattice, pegasus_lattice, and zephyr_lattice. Moreover, the documentation outlines methods for local dimensional reduction, shedding light on techniques to streamline computations and enhance the efficiency of spin system simulations.

+User guide · SpinGlassPEPS.jl

Introduction

A Julia package for building and interacting with Ising spin glass models in context of tensor networks. Part of SpinGlassPEPS package.

The contents of our package are illustrated through comprehensive examples, showcasing the practical utilization of key functions. Specifically, the ising_graph function is highlighted, demonstrating its capacity to generate Ising model graphs — a fundamental step in modeling spin systems. Additionally, the clustered_hamiltonian function is presented as a tool for converting Ising graphs into clustered Hamiltonians. The package delves into various lattice geometries, providing insights into constructing diverse structures such as the super_square_lattice, pegasus_lattice, and zephyr_lattice. Moreover, the documentation outlines methods for local dimensional reduction, shedding light on techniques to streamline computations and enhance the efficiency of spin system simulations.

diff --git a/dev/sgt/api/index.html b/dev/sgt/api/index.html index 7f64ff2..4c6e189 100644 --- a/dev/sgt/api/index.html +++ b/dev/sgt/api/index.html @@ -8,4 +8,4 @@ | |

R = – M – RE | | – B –

source
  -- A --
      |    |

R = | RE | | – B –

source
  -- A --
      |    |

R = –- RE |

source
SpinGlassTensors.update_reduced_env_rightFunction
  K
-  |

– M – RE | | – B –-

source
+ |

– M – RE | | – B –-

source diff --git a/dev/sgt/index.html b/dev/sgt/index.html index 612431b..46683b9 100644 --- a/dev/sgt/index.html +++ b/dev/sgt/index.html @@ -1,2 +1,2 @@ -User guide · SpinGlassPEPS.jl

SpinGlassTensor

Part of SpinGlassPEPS package. It constitutes the basis for the preparation of tensors and operations on them.

Info

We don't expect the user to interact with this package, as it is more of a "back-end" type. Nevertheless, we provide API references should the need arise.

This section of the package encompasses supplementary functionalities that serve as support for the main solver. It includes the creation and manipulation of tensors, with a particular emphasis on implementing Matrix Product States (MPS) and Matrix Product Operators (MPO).

+User guide · SpinGlassPEPS.jl

SpinGlassTensor

Part of SpinGlassPEPS package. It constitutes the basis for the preparation of tensors and operations on them.

Info

We don't expect the user to interact with this package, as it is more of a "back-end" type. Nevertheless, we provide API references should the need arise.

This section of the package encompasses supplementary functionalities that serve as support for the main solver. It includes the creation and manipulation of tensors, with a particular emphasis on implementing Matrix Product States (MPS) and Matrix Product Operators (MPO).

diff --git a/dev/sgt/mpo/index.html b/dev/sgt/mpo/index.html index e812a5b..2a55021 100644 --- a/dev/sgt/mpo/index.html +++ b/dev/sgt/mpo/index.html @@ -1,2 +1,2 @@ -Matrix Product States and Matrix Product Operations · SpinGlassPEPS.jl

Matrix Product States and Matrix Product Operations

SpinGlassTensors.MpoTensorType

A mutable struct representing a Matrix Product Operator (MPO) tensor in a tensor network.

Fields

  • top::Vector{Tensor{T, 2}}: Vector of tensors representing the top tensor of the MPO. Empty if N == 2.
  • ctr::Union{Tensor{T, N}, Nothing}: Central tensor of the MPO. Nothing if not present.
  • bot::Vector{Tensor{T, 2}}: Vector of tensors representing the bottom tensor of the MPO. Empty if N == 2.
  • dims::Dims{N}: Dimensions of the MPO tensor.

Description

MpoTensor{T, N} is a mutable struct that represents a Matrix Product Operator tensor in a tensor network. The MPO tensor is characterized by its top and bottom tensors, a central tensor (ctr), and dimensions (dims). The top and bottom legs are vectors of two-dimensional tensors (Tensor{T, 2}). The central tensor is of type Tensor{T, N} or Nothing if not present. The dimensions of the MPO tensor are specified by dims.

source
+Matrix Product States and Matrix Product Operations · SpinGlassPEPS.jl

Matrix Product States and Matrix Product Operations

SpinGlassTensors.MpoTensorType

A mutable struct representing a Matrix Product Operator (MPO) tensor in a tensor network.

Fields

  • top::Vector{Tensor{T, 2}}: Vector of tensors representing the top tensor of the MPO. Empty if N == 2.
  • ctr::Union{Tensor{T, N}, Nothing}: Central tensor of the MPO. Nothing if not present.
  • bot::Vector{Tensor{T, 2}}: Vector of tensors representing the bottom tensor of the MPO. Empty if N == 2.
  • dims::Dims{N}: Dimensions of the MPO tensor.

Description

MpoTensor{T, N} is a mutable struct that represents a Matrix Product Operator tensor in a tensor network. The MPO tensor is characterized by its top and bottom tensors, a central tensor (ctr), and dimensions (dims). The top and bottom legs are vectors of two-dimensional tensors (Tensor{T, 2}). The central tensor is of type Tensor{T, N} or Nothing if not present. The dimensions of the MPO tensor are specified by dims.

source