Branch and bound search
Here you find the main function of the package, which is an actual solver.
SpinGlassEngine.low_energy_spectrum
— Functionlow_energy_spectrum(
ctr::MpsContractor{T, R, S},
sparams::SearchParameters;
...
) -> Tuple{Solution, Dict{Any, Any}}
low_energy_spectrum(
ctr::MpsContractor{T, R, S},
sparams::SearchParameters,
merge_strategy;
...
) -> Tuple{Solution, Dict{Any, Any}}
low_energy_spectrum(
ctr::MpsContractor{T, R, S},
sparams::SearchParameters,
merge_strategy,
symmetry::Symbol;
no_cache
) -> Tuple{Solution, Dict{Any, Any}}
Compute the low-energy spectrum on a quasi-2D graph using branch-and-bound search.
Merge matching configurations during branch-and-bound search going line by line. Information about excited states (droplets) is collected during merging, which allows reconstructing the low-energy spectrum. It takes as input a ctr
object representing the PEPS network and the parameters for controlling its contraction, sparams
specifying search parameters, merge_strategy
for merging branches, and symmetry
indicating any symmetry constraints. Optionally, you can disable caching using the no_cache
flag. Probabilities are kept as log. Results are stored in Solution structure.
Arguments
ctr::AbstractContractor
: The contractor object representing the PEPS network, which should be a subtype ofAbstractContractor
.sparams::SearchParameters
: Parameters for controlling the search, including the maximum number of states and a cutoff probability.merge_strategy=no_merge
: (Optional) Merge strategy for branches. Defaults tono_merge
.symmetry::Symbol=:noZ2
: (Optional) Symmetry constraint. Defaults to:noZ2
. If Z2 symmetry is present in your system, use:Z2
.no_cache=false
: (Optional) Iftrue
, disables caching. Defaults tofalse
.
Returns
A tuple (sol, s)
containing:
sol::Solution
: ASolution
object representing the computed low-energy spectrum.s::Dict
: A dictionary containing Schmidt spectra for each row of the PEPS network.
SpinGlassEngine.merge_branches
— Functionmerge_branches(
ctr::MpsContractor{T};
merge_prob,
droplets_encoding
) -> SpinGlassEngine.var"#_merge#383"{Symbol, NoDroplets, MpsContractor{T, R, S}} where {T, R<:SpinGlassEngine.AbstractGauge, S<:Real}
Merge branches of a contractor based on specified merge type and droplet update strategy.
This function merges branches of a contractor (ctr
) based on a specified merge type (merge_prob
) and an optional droplet update strategy (droplets_encoding
). It returns a function _merge
that can be used to merge branches in a solution.
Arguments
ctr::MpsContractor{T}
: A contractor for which branches will be merged.merge_prob::Symbol=:none
: (Optional) The merge type to use. Defaults to:none
. Possible values are:none
,:median
, and:tnac4o
.droplets_encoding=NoDroplets()
: (Optional) The droplet update strategy. Defaults toNoDroplets()
. You can provide a custom droplet update strategy if needed.
Returns
A function _merge
that can be used to merge branches in a solution.
Details
The _merge
function can be applied to a Solution
object to merge its branches based on the specified merge type and droplet update strategy.
SpinGlassEngine.merge_branches_blur
— Functionmerge_branches_blur(
ctr::MpsContractor{T},
hamming_cutoff::Int64
) -> SpinGlassEngine.var"#_merge_blur#385"{MpsContractor{T, R, S}, Int64, Symbol, NoDroplets} where {T, R<:SpinGlassEngine.AbstractGauge, S<:Real}
merge_branches_blur(
ctr::MpsContractor{T},
hamming_cutoff::Int64,
merge_prob::Symbol
) -> SpinGlassEngine.var"#_merge_blur#385"{MpsContractor{T, R, S}, Int64, Symbol, NoDroplets} where {T, R<:SpinGlassEngine.AbstractGauge, S<:Real}
merge_branches_blur(
ctr::MpsContractor{T},
hamming_cutoff::Int64,
merge_prob::Symbol,
droplets_encoding
) -> SpinGlassEngine.var"#_merge_blur#385"{MpsContractor{T, R, S}, Int64, Symbol} where {T, R<:SpinGlassEngine.AbstractGauge, S<:Real}
Generate a function for merging branches in a Gibbs network with a Hamming distance blur.
Arguments
ctr::MpsContractor{T}
: The contractor representing the contracted Gibbs network.hamming_cutoff::Int
: The Hamming distance cutoff for blur.merge_prob::Symbol=:none
: The merging strategy, defaults to:none
.droplets_encoding=NoDroplets()
: Droplet update method, defaults toNoDroplets()
.
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.
Results of the branch and bound search are stored in a Solution structure.
SpinGlassEngine.Solution
— TypeA 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.
Droplet search
SpinGlassPEPS.jl
provides the capability to find not only low-energy states but also droplet excitations. To search for droplets, the SingleLayerDroplets
option must be selected in the merge_branches
function.
Droplets are identified during the optional merge_branches
step, which can be invoked within the low_energy_spectrum
function that runs the branch-and-bound algorithm. This search focuses on finding diverse excitations within a specific energy range above the ground state. An excitation is accepted only if its Hamming distance from any previously identified excitation exceeds a predefined threshold.
This behavior is controlled by two key parameters:
energy_cutoff
: Defines the maximum allowed energy above the ground state for considering an excitation.hamming_cutoff
: Sets the minimum Hamming distance required between excitations for them to be classified as distinct.
By adjusting these parameters, users can search for different excitations while ensuring that only sufficiently distinct ones are included.
SpinGlassEngine.SingleLayerDroplets
— TypeA data structure representing the properties and criteria for identifying 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.
Fields
max_energy::Real
: The maximum allowed excitation energy above the ground state. It is typically a real number.min_size::Int
: The minimum Hamming distance required between excitations for them to be considered distinct.metric::Symbol
: The metric used to evaluate the significance of a single-layer droplet. Default is:no_metric
.:hamming
treats Hamming distances as a metric.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 newSingleLayerDroplets
object with the specified maximum energy, minimum size, metric and mode.