From 3aaac360d2face2feb2e3f62f61133c8f783ac43 Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Tue, 2 Feb 2021 13:30:16 +0100 Subject: [PATCH 001/110] cleaning up --- src/{spectrum.jl => MPS_search.jl} | 50 +-------- src/PEPS.jl | 62 +---------- src/SpinGlassPEPS.jl | 8 +- src/exact.jl | 59 ++++++++++ src/{graph.jl => factor.jl} | 81 +------------- src/graphs/chimera.jl | 66 ----------- src/graphs/lattice.jl | 18 --- src/graphs/model.jl | 31 ------ src/ising.jl | 170 +++++++++++++++++++---------- src/network.jl | 60 ++++++++++ src/utils.jl | 20 +++- test/runtests.jl | 2 +- 12 files changed, 256 insertions(+), 371 deletions(-) rename src/{spectrum.jl => MPS_search.jl} (86%) create mode 100644 src/exact.jl rename src/{graph.jl => factor.jl} (51%) delete mode 100644 src/graphs/chimera.jl delete mode 100644 src/graphs/lattice.jl delete mode 100644 src/graphs/model.jl create mode 100644 src/network.jl diff --git a/src/spectrum.jl b/src/MPS_search.jl similarity index 86% rename from src/spectrum.jl rename to src/MPS_search.jl index 81b29426..e0cb519b 100644 --- a/src/spectrum.jl +++ b/src/MPS_search.jl @@ -1,14 +1,7 @@ -export unique_neighbors -export full_spectrum, brute_force export MPSControl export solve, solve_new export MPS2 -struct Spectrum - energies::Array{<:Number} - states::Array{Vector{<:Number}} -end - struct MPSControl max_bond::Int var_ϵ::Number @@ -125,8 +118,7 @@ function solve_new(ψ::MPS, keep::Int) @cast B[β, (l, d)] |= config[β, l, d] states = B[:, perm] end - states = states' - states, lprob, lpCut + states', lprob, lpCut end function _apply_bias!(ψ::AbstractMPS, ig::MetaGraph, dβ::Number, i::Int) @@ -292,42 +284,4 @@ function MPS(ig::MetaGraph, control::MPSControl, type::Symbol) end ρ -end - -""" -$(TYPEDSIGNATURES) - -Return the low energy spectrum - -# Details - -Calculates \$k\$ lowest energy states -together with the coresponding energies -of a classical Ising Hamiltonian -""" -function brute_force(ig::MetaGraph; num_states::Int=1) - cl = Cluster(ig, 0) - brute_force(cl, num_states=num_states) -end - -function brute_force(cl::Cluster; num_states::Int=1) - if isempty(cl.vertices) - return Spectrum(zeros(1), []) - end - - if num_states > prod(cl.rank) num_states = prod(cl.rank) end - - σ = collect.(all_states(cl.rank)) - energies = energy.(σ, Ref(cl)) - perm = partialsortperm(vec(energies), 1:num_states) - Spectrum(energies[perm], σ[perm]) -end - -function full_spectrum(cl::Cluster; num_states::Int=prod(cl.rank)) - if isempty(cl.vertices) - return Spectrum(zeros(1), []) - end - σ = collect.(all_states(cl.rank)) - energies = energy.(σ, Ref(cl)) - Spectrum(energies[1:num_states], σ[1:num_states]) -end +end \ No newline at end of file diff --git a/src/PEPS.jl b/src/PEPS.jl index a87b98c3..38284b20 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -1,63 +1,5 @@ -export NetworkGraph, PepsNetwork -export generate_tensor, MPO - -mutable struct NetworkGraph - factor_graph::MetaDiGraph - nbrs::Dict - β::Number - - function NetworkGraph(factor_graph::MetaDiGraph, nbrs::Dict, β::Number) - ng = new(factor_graph, nbrs, β) - - count = 0 - for v ∈ vertices(ng.factor_graph), w ∈ ng.nbrs[v] - if has_edge(ng.factor_graph, v, w) count += 1 end - end - - mc = ne(ng.factor_graph) - if count < mc - error("Error: $(count) < $(mc)") - end - ng - end -end - -function generate_tensor(ng::NetworkGraph, v::Int) - fg = ng.factor_graph - loc_exp = exp.(-ng.β .* get_prop(fg, v, :loc_en)) - - dim = [] - @cast tensor[_, i] := loc_exp[i] - - for w ∈ ng.nbrs[v] - if has_edge(fg, w, v) - _, _, pv = get_prop(fg, w, v, :split) - pv = pv' - elseif has_edge(fg, v, w) - pv, _, _ = get_prop(fg, v, w, :split) - else - pv = ones(length(loc_exp), 1) - end - - @cast tensor[(c, γ), σ] |= tensor[c, σ] * pv[σ, γ] - push!(dim, size(pv, 2)) - end - reshape(tensor, dim..., :) -end - -function generate_tensor(ng::NetworkGraph, v::Int, w::Int) - fg = ng.factor_graph - if has_edge(fg, w, v) - _, e, _ = get_prop(fg, w, v, :split) - tensor = exp.(-ng.β .* e') - elseif has_edge(fg, v, w) - _, e, _ = get_prop(fg, v, w, :split) - tensor = exp.(-ng.β .* e) - else - tensor = ones(1, 1) - end - tensor -end +export PepsNetwork +export MPO mutable struct PepsNetwork size::NTuple{2, Int} diff --git a/src/SpinGlassPEPS.jl b/src/SpinGlassPEPS.jl index df7fb36e..d39848e7 100644 --- a/src/SpinGlassPEPS.jl +++ b/src/SpinGlassPEPS.jl @@ -14,15 +14,15 @@ module SpinGlassPEPS include("base.jl") include("utils.jl") + include("exact.jl") include("compressions.jl") include("contractions.jl") include("lattice.jl") - #include("graphs/chimera.jl") - #include("graphs/lattice.jl") - include("graph.jl") include("ising.jl") + include("factor.jl") + include("network.jl") include("PEPS.jl") - include("spectrum.jl") + include("MPS_search.jl") include("notation.jl") include("peps_no_types.jl") include("mps_implementation.jl") diff --git a/src/exact.jl b/src/exact.jl new file mode 100644 index 00000000..233315bb --- /dev/null +++ b/src/exact.jl @@ -0,0 +1,59 @@ +export gibbs_tensor, brute_force, full_spectrum + +""" +$(TYPEDSIGNATURES) + +Calculates Gibbs state of a classical Ising Hamiltonian + +# Details + +Calculates matrix elements (probabilities) of \$\\rho\$ +```math +\$\\bra{\\σ}\\rho\\ket{\\sigma}\$ +``` +for all possible configurations \$\\σ\$. +""" +function gibbs_tensor(ig::MetaGraph, β=Float64=1.0) + rank = get_prop(ig, :rank) + states = collect.(all_states(rank)) + ρ = exp.(-β .* energy.(states, Ref(ig))) + ρ ./ sum(ρ) +end + +""" +$(TYPEDSIGNATURES) + +Return the low energy spectrum + +# Details + +Calculates \$k\$ lowest energy states +together with the coresponding energies +of a classical Ising Hamiltonian +""" +function brute_force(ig::MetaGraph; num_states::Int=1) + cl = Cluster(ig, 0) + brute_force(cl, num_states=num_states) +end + +function brute_force(cl::Cluster; num_states::Int=1) + if isempty(cl.vertices) + return Spectrum(zeros(1), []) + end + + if num_states > prod(cl.rank) num_states = prod(cl.rank) end + + σ = collect.(all_states(cl.rank)) + energies = energy.(σ, Ref(cl)) + perm = partialsortperm(vec(energies), 1:num_states) + Spectrum(energies[perm], σ[perm]) +end + +function full_spectrum(cl::Cluster; num_states::Int=prod(cl.rank)) + if isempty(cl.vertices) + return Spectrum(zeros(1), []) + end + σ = collect.(all_states(cl.rank)) + energies = energy.(σ, Ref(cl)) + Spectrum(energies[1:num_states], σ[1:num_states]) +end \ No newline at end of file diff --git a/src/graph.jl b/src/factor.jl similarity index 51% rename from src/graph.jl rename to src/factor.jl index 10ab8546..dadb5732 100644 --- a/src/graph.jl +++ b/src/factor.jl @@ -1,84 +1,5 @@ export factor_graph, projectors -export Cluster, rank_reveal - -const SimpleEdge = LightGraphs.SimpleGraphs.SimpleEdge -const EdgeIter = Union{LightGraphs.SimpleGraphs.SimpleEdgeIter, Base.Iterators.Filter, Array} - -mutable struct Cluster - tag::Int - vertices::Dict{Int, Int} - edges::EdgeIter - rank::Vector - J::Matrix{<:Number} - h::Vector{<:Number} - - function Cluster(ig::MetaGraph, v::Int) - cl = new(v) - active = filter_vertices(ig, :active, true) - - if cl.tag == 0 - vlist = vertices(ig) - else - vlist = filter_vertices(ig, :cell, v) - end - vlist = intersect(active, vlist) - - L = length(vlist) - cl.h = zeros(L) - cl.J = zeros(L, L) - - cl.vertices = Dict() - cl.edges = SimpleEdge[] - - rank = get_prop(ig, :rank) - cl.rank = zeros(Int, L) - - for (i, w) ∈ enumerate(vlist) - push!(cl.vertices, w => i) - @inbounds cl.h[i] = get_prop(ig, w, :h) - @inbounds cl.rank[i] = rank[w] - end - - for e ∈ edges(ig) - if src(e) ∈ vlist && dst(e) ∈ vlist - i, j = cl.vertices[src(e)], cl.vertices[dst(e)] - @inbounds cl.J[i, j] = get_prop(ig, e, :J) - push!(cl.edges, e) - end - end - cl - end -end - -function MetaGraphs.filter_edges(ig::MetaGraph, v::Cluster, w::Cluster) - edges = SimpleEdge[] - for i ∈ keys(v.vertices), j ∈ neighbors(ig, i) - if j ∈ keys(w.vertices) push!(edges, SimpleEdge(i, j)) end - end - edges -end - -mutable struct Edge - tag::NTuple{2, Int} - edges::EdgeIter - J::Matrix{<:Number} - - function Edge(ig::MetaGraph, v::Cluster, w::Cluster) - ed = new((v.tag, w.tag)) - ed.edges = filter_edges(ig, v, w) - - m = length(v.vertices) - n = length(w.vertices) - - ed.J = zeros(m, n) - for e ∈ ed.edges - i = v.vertices[src(e)] - j = w.vertices[dst(e)] - @inbounds ed.J[i, j] = get_prop(ig, e, :J) - end - ed - end -end +export rank_reveal function _max_cell_num(ig::MetaGraph) L = 0 diff --git a/src/graphs/chimera.jl b/src/graphs/chimera.jl deleted file mode 100644 index f98dc271..00000000 --- a/src/graphs/chimera.jl +++ /dev/null @@ -1,66 +0,0 @@ -export Chimera -export unit_cell - -struct Chimera <: Model - size::NTuple{3, Int} - graph::MetaGraph - - function Chimera(size::NTuple{3, Int}, graph::MetaGraph) - cg = new(size, graph) - m, n, t = size - linear = LinearIndices((1:m, 1:n)) - - for i=1:m, j=1:n, u=1:2, k=1:t - v = cg[i, j, u, k] - ij = linear[i, j] - set_prop!(cg, v, :cell, ij) - end - - for e ∈ edges(cg) - v = get_prop(cg, src(e), :cell) - w = get_prop(cg, dst(e), :cell) - set_prop!(cg, e, :cells, (v, w)) - end - cg - end -end - -function Chimera(m::Int, n::Int=m, t::Int=4) - max_size = m * n * 2 * t - g = MetaGraph(max_size) - - hoff = 2t - voff = n * hoff - mi = m * voff - ni = n * hoff - - for i=1:hoff:ni, j=i:voff:mi, k0=j:j+t-1, k1=j+t:j+2t-1 - add_edge!(g, k0, k1) - end - - for i=t:2t-1, j=i:hoff:ni-hoff-1, k=j+1:voff:mi-1 - add_edge!(g, k, k+hoff-1) - end - - for i=1:t, j=i:hoff:ni-1, k=j:voff:mi-voff-1 - add_edge!(g, k, k+voff) - end - Chimera((m, n, t), g) -end - -@inline function Base.getindex(c::Chimera, i::Int, j::Int, u::Int, k::Int) - _, n, t = size(c) - t * (2 * (n * (i - 1) + j - 1) + u - 1) + k -end - -@inline function Base.getindex(c::Chimera, i::Int, j::Int) - t = size(c, 3) - idx = vec([c[i, j, u, k] for u=1:2, k=1:t]) - c.graph[idx] -end - -function unit_cell(c::Chimera, v::Int) - elist = filter_edges(c.graph, :cells, (v, v)) - vlist = filter_vertices(c.graph, :cell, v) - Cluster(c.graph, v, enum(vlist), elist) -end diff --git a/src/graphs/lattice.jl b/src/graphs/lattice.jl deleted file mode 100644 index 354bb7de..00000000 --- a/src/graphs/lattice.jl +++ /dev/null @@ -1,18 +0,0 @@ -export Lattice -export unit_cell - -struct Lattice <: Model - size::NTuple{2, Int} - graph::MetaGraph - - function Lattice(m::Int, n::Int) - lt = new((m, n)) - lt.graph = MetaGraph(grid([m, n])) - lt - end -end - -@inline function Base.getindex(l::Lattice, i::Int, j::Int) - m, n = size(l) - LinearIndices((1:m, 1:n))[i, j] -end diff --git a/src/graphs/model.jl b/src/graphs/model.jl deleted file mode 100644 index e373fcba..00000000 --- a/src/graphs/model.jl +++ /dev/null @@ -1,31 +0,0 @@ -export Model - -abstract type Model end - -for op ∈ [ - :nv, - :ne, - :eltype, - :edgetype, - :vertices, - :edges, - ] - - @eval LightGraphs.$op(c::Model) = $op(c.graph) -end - -for op ∈ [ - :get_prop, - :set_prop!, - :has_vertex, - :inneighbors, - :outneighbors, - :neighbors] - - @eval MetaGraphs.$op(m::Model, args...) = $op(m.graph, args...) -end - -#has_edge(m::Model, x...) = has_edge(m.graph, x...) - -Base.size(m::Model) = m.size -Base.size(m::Model, i::Int) = m.size[i] \ No newline at end of file diff --git a/src/ising.jl b/src/ising.jl index 71ecb13e..9eaea237 100644 --- a/src/ising.jl +++ b/src/ising.jl @@ -1,54 +1,19 @@ export ising_graph, update_cells! -export energy, gibbs_tensor +export energy, Cluster, rank_vec, Spectrum const Instance = Union{String, Dict} +const SimpleEdge = LightGraphs.SimpleGraphs.SimpleEdge +const EdgeIter = Union{LightGraphs.SimpleGraphs.SimpleEdgeIter, Base.Iterators.Filter, Array} -""" -$(TYPEDSIGNATURES) - -Calculates Gibbs state of a classical Ising Hamiltonian - -# Details - -Calculates matrix elements (probabilities) of \$\\rho\$ -```math -\$\\bra{\\σ}\\rho\\ket{\\sigma}\$ -``` -for all possible configurations \$\\σ\$. -""" -function gibbs_tensor(ig::MetaGraph, β=Float64=1.0) - states = collect.(all_states(rank_vec(ig))) - ρ = exp.(-β .* energy.(states, Ref(ig))) - ρ ./ sum(ρ) +struct Spectrum + energies::Array{<:Number} + states::Array{Vector{<:Number}} end -""" -$(TYPEDSIGNATURES) - -Calculate the Ising energy -```math -E = -\\sum_ s_i J_{ij} * s_j - \\sum_j h_i s_j. -``` -""" - -energy(σ::Vector, J::Matrix, η::Vector=σ) = dot(σ, J, η) -energy(σ::Vector, h::Vector) = dot(h, σ) -energy(σ::Vector, cl::Cluster, η::Vector=σ) = energy(σ, cl.J, η) + energy(cl.h, σ) -energy(σ::Vector, ig::MetaGraph) = energy(σ, get_prop(ig, :J)) + energy(σ, get_prop(ig, :h)) - -function energy(fg::MetaDiGraph, edge::Edge) - v, w = edge.tag - vSp = get_prop(fg, v, :spectrum).states - wSp = get_prop(fg, w, :spectrum).states - - m = prod(size(vSp)) - n = prod(size(wSp)) - - en = zeros(m, n) - for (j, η) ∈ enumerate(vec(wSp)) - en[:, j] = energy.(vec(vSp), Ref(edge.J), Ref(η)) - end - en +function rank_vec(ig::MetaGraph) + rank = get_prop(ig, :rank) + L = get_prop(ig, :L) + Int[get(rank, i, 1) for i=1:L] end """ @@ -128,25 +93,114 @@ function ising_graph( ig end +function update_cells!(ig::MetaGraph; rule::Dict) + for v ∈ vertices(ig) + w = get_prop(ig, v, :cell) + set_prop!(ig, v, :cell, rule[w]) + end +end + +mutable struct Cluster + tag::Int + vertices::Dict{Int, Int} + edges::EdgeIter + rank::Vector + J::Matrix{<:Number} + h::Vector{<:Number} + + function Cluster(ig::MetaGraph, v::Int) + cl = new(v) + active = filter_vertices(ig, :active, true) + + if cl.tag == 0 + vlist = vertices(ig) + else + vlist = filter_vertices(ig, :cell, v) + end + vlist = intersect(active, vlist) + + L = length(vlist) + cl.h = zeros(L) + cl.J = zeros(L, L) + + cl.vertices = Dict() + cl.edges = SimpleEdge[] + + rank = get_prop(ig, :rank) + cl.rank = zeros(Int, L) + + for (i, w) ∈ enumerate(vlist) + push!(cl.vertices, w => i) + @inbounds cl.h[i] = get_prop(ig, w, :h) + @inbounds cl.rank[i] = rank[w] + end + + for e ∈ edges(ig) + if src(e) ∈ vlist && dst(e) ∈ vlist + i, j = cl.vertices[src(e)], cl.vertices[dst(e)] + @inbounds cl.J[i, j] = get_prop(ig, e, :J) + push!(cl.edges, e) + end + end + cl + end +end + +function MetaGraphs.filter_edges(ig::MetaGraph, v::Cluster, w::Cluster) + edges = SimpleEdge[] + for i ∈ keys(v.vertices), j ∈ neighbors(ig, i) + if j ∈ keys(w.vertices) push!(edges, SimpleEdge(i, j)) end + end + edges +end + +mutable struct Edge + tag::NTuple{2, Int} + edges::EdgeIter + J::Matrix{<:Number} + + function Edge(ig::MetaGraph, v::Cluster, w::Cluster) + ed = new((v.tag, w.tag)) + ed.edges = filter_edges(ig, v, w) + + m = length(v.vertices) + n = length(w.vertices) + + ed.J = zeros(m, n) + for e ∈ ed.edges + i = v.vertices[src(e)] + j = w.vertices[dst(e)] + @inbounds ed.J[i, j] = get_prop(ig, e, :J) + end + ed + end +end + """ $(TYPEDSIGNATURES) -Calculate unique neighbors of node \$i\$ +Calculate the Ising energy +```math +E = -\\sum_ s_i J_{ij} * s_j - \\sum_j h_i s_j. +``` +""" -# Details +energy(σ::Vector, J::Matrix, η::Vector=σ) = dot(σ, J, η) +energy(σ::Vector, h::Vector) = dot(h, σ) +energy(σ::Vector, cl::Cluster, η::Vector=σ) = energy(σ, cl.J, η) + energy(cl.h, σ) +energy(σ::Vector, ig::MetaGraph) = energy(σ, get_prop(ig, :J)) + energy(σ, get_prop(ig, :h)) -This is equivalent of taking the upper -diagonal of the adjacency matrix -""" -function unique_neighbors(ig::MetaGraph, i::Int) - nbrs = neighbors(ig::MetaGraph, i::Int) - filter(j -> j > i, nbrs) -end +function energy(fg::MetaDiGraph, edge::Edge) + v, w = edge.tag + vSp = get_prop(fg, v, :spectrum).states + wSp = get_prop(fg, w, :spectrum).states + m = prod(size(vSp)) + n = prod(size(wSp)) -function update_cells!(ig::MetaGraph; rule::Dict) - for v ∈ vertices(ig) - w = get_prop(ig, v, :cell) - set_prop!(ig, v, :cell, rule[w]) + en = zeros(m, n) + for (j, η) ∈ enumerate(vec(wSp)) + en[:, j] = energy.(vec(vSp), Ref(edge.J), Ref(η)) end + en end diff --git a/src/network.jl b/src/network.jl new file mode 100644 index 00000000..a0aab3b3 --- /dev/null +++ b/src/network.jl @@ -0,0 +1,60 @@ +export NetworkGraph, generate_tensor + +mutable struct NetworkGraph + factor_graph::MetaDiGraph + nbrs::Dict + β::Number + + function NetworkGraph(factor_graph::MetaDiGraph, nbrs::Dict, β::Number) + ng = new(factor_graph, nbrs, β) + + count = 0 + for v ∈ vertices(ng.factor_graph), w ∈ ng.nbrs[v] + if has_edge(ng.factor_graph, v, w) count += 1 end + end + + mc = ne(ng.factor_graph) + #TODO: + if count < mc + error("Error: $(count) < $(mc)") + end + ng + end +end + +function generate_tensor(ng::NetworkGraph, v::Int) + fg = ng.factor_graph + loc_exp = exp.(-ng.β .* get_prop(fg, v, :loc_en)) + + dim = [] + @cast tensor[_, i] := loc_exp[i] + + for w ∈ ng.nbrs[v] + if has_edge(fg, w, v) + _, _, pv = get_prop(fg, w, v, :split) + pv = pv' + elseif has_edge(fg, v, w) + pv, _, _ = get_prop(fg, v, w, :split) + else + pv = ones(length(loc_exp), 1) + end + + @cast tensor[(c, γ), σ] |= tensor[c, σ] * pv[σ, γ] + push!(dim, size(pv, 2)) + end + reshape(tensor, dim..., :) +end + +function generate_tensor(ng::NetworkGraph, v::Int, w::Int) + fg = ng.factor_graph + if has_edge(fg, w, v) + _, e, _ = get_prop(fg, w, v, :split) + tensor = exp.(-ng.β .* e') + elseif has_edge(fg, v, w) + _, e, _ = get_prop(fg, v, w, :split) + tensor = exp.(-ng.β .* e) + else + tensor = ones(1, 1) + end + tensor +end \ No newline at end of file diff --git a/src/utils.jl b/src/utils.jl index e87d9b3a..001c7ef4 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -1,7 +1,8 @@ export idx, ising, proj export HadamardMPS, rq -export all_states, local_basis, enum, state_to_ind, rank_vec +export all_states, local_basis, enum, state_to_ind export @state +export unique_neighbors using Base.Cartesian import Base.Prehashed @@ -213,8 +214,17 @@ end end end -function rank_vec(ig::MetaGraph) - rank = get_prop(ig, :rank) - L = get_prop(ig, :L) - Int[get(rank, i, 1) for i=1:L] +""" +$(TYPEDSIGNATURES) + +Calculate unique neighbors of node \$i\$ + +# Details + +This is equivalent of taking the upper +diagonal of the adjacency matrix +""" +function unique_neighbors(ig::MetaGraph, i::Int) + nbrs = neighbors(ig::MetaGraph, i::Int) + filter(j -> j > i, nbrs) end \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index 33e35eee..2c0be104 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -35,7 +35,7 @@ push!(my_tests, "utils.jl", "contractions.jl", "compressions.jl", - "ising.jl", + #"ising.jl", "indexing.jl", "searchMPS.jl", "spectrum.jl", From 0499aa9ae5cdc7e0bb546c6916acc4ee037084d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 2 Feb 2021 13:41:28 +0100 Subject: [PATCH 002/110] Custer not defined --- test/runtests.jl | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 2c0be104..9b257ade 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -31,22 +31,22 @@ if CUDA.functional() && CUDA.has_cutensor() && false end push!(my_tests, - "base.jl", - "utils.jl", - "contractions.jl", - "compressions.jl", - #"ising.jl", - "indexing.jl", - "searchMPS.jl", - "spectrum.jl", - "graph.jl", - "PEPS.jl", - "indexing.jl", - "notation_tests.jl", - "peps_tests.jl", - "mps_tests.jl", - "tests_full_graph.jl", - "tests_on_data.jl" + #"base.jl", + #"utils.jl", + #"contractions.jl", + #"compressions.jl", + "ising.jl", + #"indexing.jl", + #"searchMPS.jl", + #"spectrum.jl", + #"graph.jl", + #"PEPS.jl", + #"indexing.jl", + #"notation_tests.jl", + #"peps_tests.jl", + #"mps_tests.jl", + #"tests_full_graph.jl", + #"tests_on_data.jl" ) for my_test in my_tests From 6b1f62d8a2502724ec19ddc203928aa2106c6100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 2 Feb 2021 13:57:59 +0100 Subject: [PATCH 003/110] all tests pass --- src/SpinGlassPEPS.jl | 2 +- src/exact.jl | 20 ++++++-------------- src/factor.jl | 4 ++-- src/ising.jl | 6 +++--- src/network.jl | 1 - test/runtests.jl | 30 +++++++++++++++--------------- 6 files changed, 27 insertions(+), 36 deletions(-) diff --git a/src/SpinGlassPEPS.jl b/src/SpinGlassPEPS.jl index d39848e7..93e4cf31 100644 --- a/src/SpinGlassPEPS.jl +++ b/src/SpinGlassPEPS.jl @@ -14,11 +14,11 @@ module SpinGlassPEPS include("base.jl") include("utils.jl") - include("exact.jl") include("compressions.jl") include("contractions.jl") include("lattice.jl") include("ising.jl") + include("exact.jl") include("factor.jl") include("network.jl") include("PEPS.jl") diff --git a/src/exact.jl b/src/exact.jl index 233315bb..f40ec795 100644 --- a/src/exact.jl +++ b/src/exact.jl @@ -1,4 +1,5 @@ -export gibbs_tensor, brute_force, full_spectrum +export gibbs_tensor +export brute_force, full_spectrum """ $(TYPEDSIGNATURES) @@ -14,8 +15,7 @@ Calculates matrix elements (probabilities) of \$\\rho\$ for all possible configurations \$\\σ\$. """ function gibbs_tensor(ig::MetaGraph, β=Float64=1.0) - rank = get_prop(ig, :rank) - states = collect.(all_states(rank)) + states = collect.(all_states(rank_vec(ig))) ρ = exp.(-β .* energy.(states, Ref(ig))) ρ ./ sum(ρ) end @@ -31,16 +31,10 @@ Calculates \$k\$ lowest energy states together with the coresponding energies of a classical Ising Hamiltonian """ -function brute_force(ig::MetaGraph; num_states::Int=1) - cl = Cluster(ig, 0) - brute_force(cl, num_states=num_states) -end +brute_force(ig::MetaGraph; num_states::Int=1) = brute_force(Cluster(ig, 0), num_states=num_states) function brute_force(cl::Cluster; num_states::Int=1) - if isempty(cl.vertices) - return Spectrum(zeros(1), []) - end - + if isempty(cl.vertices) return Spectrum(zeros(1), []) end if num_states > prod(cl.rank) num_states = prod(cl.rank) end σ = collect.(all_states(cl.rank)) @@ -50,9 +44,7 @@ function brute_force(cl::Cluster; num_states::Int=1) end function full_spectrum(cl::Cluster; num_states::Int=prod(cl.rank)) - if isempty(cl.vertices) - return Spectrum(zeros(1), []) - end + if isempty(cl.vertices) return Spectrum(zeros(1), []) end σ = collect.(all_states(cl.rank)) energies = energy.(σ, Ref(cl)) Spectrum(energies[1:num_states], σ[1:num_states]) diff --git a/src/factor.jl b/src/factor.jl index dadb5732..68c16367 100644 --- a/src/factor.jl +++ b/src/factor.jl @@ -1,5 +1,5 @@ -export factor_graph, projectors -export rank_reveal +export factor_graph +export rank_reveal, projectors function _max_cell_num(ig::MetaGraph) L = 0 diff --git a/src/ising.jl b/src/ising.jl index 9eaea237..0d0e329b 100644 --- a/src/ising.jl +++ b/src/ising.jl @@ -1,5 +1,6 @@ export ising_graph, update_cells! -export energy, Cluster, rank_vec, Spectrum +export energy, rank_vec +export Cluster, Spectrum const Instance = Union{String, Dict} const SimpleEdge = LightGraphs.SimpleGraphs.SimpleEdge @@ -79,8 +80,7 @@ function ising_graph( if get_prop(ig, v, :active) rank[v] = get(rank_override, v, 2) end - end - + end set_prop!(ig, :rank, rank) set_prop!(ig, :J, J) diff --git a/src/network.jl b/src/network.jl index a0aab3b3..c5416519 100644 --- a/src/network.jl +++ b/src/network.jl @@ -14,7 +14,6 @@ mutable struct NetworkGraph end mc = ne(ng.factor_graph) - #TODO: if count < mc error("Error: $(count) < $(mc)") end diff --git a/test/runtests.jl b/test/runtests.jl index 9b257ade..33e35eee 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -31,22 +31,22 @@ if CUDA.functional() && CUDA.has_cutensor() && false end push!(my_tests, - #"base.jl", - #"utils.jl", - #"contractions.jl", - #"compressions.jl", + "base.jl", + "utils.jl", + "contractions.jl", + "compressions.jl", "ising.jl", - #"indexing.jl", - #"searchMPS.jl", - #"spectrum.jl", - #"graph.jl", - #"PEPS.jl", - #"indexing.jl", - #"notation_tests.jl", - #"peps_tests.jl", - #"mps_tests.jl", - #"tests_full_graph.jl", - #"tests_on_data.jl" + "indexing.jl", + "searchMPS.jl", + "spectrum.jl", + "graph.jl", + "PEPS.jl", + "indexing.jl", + "notation_tests.jl", + "peps_tests.jl", + "mps_tests.jl", + "tests_full_graph.jl", + "tests_on_data.jl" ) for my_test in my_tests From 454e13a658117c7981b5ce791e3997c4b537a6ec Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Tue, 2 Feb 2021 14:50:13 +0100 Subject: [PATCH 004/110] remove double tested rank_reveal --- test/graph.jl | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/test/graph.jl b/test/graph.jl index f64dedd8..0dd89ac9 100644 --- a/test/graph.jl +++ b/test/graph.jl @@ -3,23 +3,6 @@ using LightGraphs using GraphPlot using CSV -@testset "Rank reveal correctly decomposes energy row-wise" begin - energy = [[1 2 3]; [0 -1 0]; [1 2 3]] - P, E = rank_reveal(energy, :PE) - @test size(P) == (3, 2) - @test size(E) == (2, 3) - @test P * E ≈ energy -end - -@testset "Rank reveal correctly decomposes energy column-wise" begin - energy = [[1, 2, 3] [0, -1, 1] [1, 2, 3]] - E, P = rank_reveal(energy, :EP) - @test size(P) == (2, 3) - @test size(E) == (3, 2) - @test E * P ≈ energy -end - - @testset "Lattice graph" begin m = 4 n = 4 From a30d04fd39a9f13c9b2bf8f44fa2239a89a9fcae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 2 Feb 2021 15:43:54 +0100 Subject: [PATCH 005/110] Test custom settings, indexing, etc. --- src/lattice.jl | 5 ++++- src/network.jl | 14 +++++++------- test/PEPS.jl | 1 - test/indexing.jl | 34 ++++++++++++---------------------- test/runtests.jl | 30 +++++++++++++++--------------- 5 files changed, 38 insertions(+), 46 deletions(-) diff --git a/src/lattice.jl b/src/lattice.jl index 3c744b2b..3029fbae 100644 --- a/src/lattice.jl +++ b/src/lattice.jl @@ -1,4 +1,5 @@ export square_lattice +export cluster function square_lattice(size::NTuple{5, Int}) m, um, n, un, t = size @@ -15,4 +16,6 @@ end function square_lattice(size::NTuple{3, Int}) m, n, t = size square_lattice((m, 1, n, 1, t)) -end \ No newline at end of file +end + +cluster(i::Int, rule::Dict) = collect(keys(filter(kv -> kv.second == i, rule))) \ No newline at end of file diff --git a/src/network.jl b/src/network.jl index c5416519..f31db15e 100644 --- a/src/network.jl +++ b/src/network.jl @@ -5,17 +5,17 @@ mutable struct NetworkGraph nbrs::Dict β::Number - function NetworkGraph(factor_graph::MetaDiGraph, nbrs::Dict, β::Number) - ng = new(factor_graph, nbrs, β) + function NetworkGraph(fg::MetaDiGraph, nbrs::Dict, β::Number) + ng = new(fg, nbrs, β) count = 0 - for v ∈ vertices(ng.factor_graph), w ∈ ng.nbrs[v] - if has_edge(ng.factor_graph, v, w) count += 1 end + for v ∈ vertices(fg), w ∈ ng.nbrs[v] + if has_edge(fg, v, w) count += 1 end end - mc = ne(ng.factor_graph) - if count < mc - error("Error: $(count) < $(mc)") + mc = ne(fg) + if count < mc + error("Factor and Ising graphs are incompatible: $(count) < $(mc)") end ng end diff --git a/test/PEPS.jl b/test/PEPS.jl index 227bb585..e3527eb3 100644 --- a/test/PEPS.jl +++ b/test/PEPS.jl @@ -114,7 +114,6 @@ instance = "$(@__DIR__)/instances/$(L)_001.txt" ig = ising_graph(instance, L) -#states = collect.(all_states(get_prop(ig, :rank))) states = collect.(all_states(rank_vec(ig))) ρ = exp.(-β .* energy.(states, Ref(ig))) Z = sum(ρ) diff --git a/test/indexing.jl b/test/indexing.jl index b1ea95ac..c2852f86 100644 --- a/test/indexing.jl +++ b/test/indexing.jl @@ -1,5 +1,5 @@ -@testset "Factor graph correctly indexing states" begin +@testset "Custom settings work with factor graph" begin # A1 | A2 # | @@ -14,38 +14,28 @@ push!(instance, (3,3) => 0.592) push!(instance, (1, 2) => 0.652) push!(instance, (2, 3) => 0.730) -m = 1 -n = 2 -t = 2 +custom_rule = Dict(1 => 1, 2 => 1, 3 => 2) +custom_spec = Dict(1 => 3, 2 => 1) -β = 1 - -L = m * n * t - -ig = ising_graph(instance, L) +ig = ising_graph(instance, 3) update_cells!( ig, - rule = square_lattice((m, n, t)), + rule = custom_rule, ) fg = factor_graph( ig, - Dict(1=>4, 2=>2), + custom_spec, energy=energy, spectrum=full_spectrum, ) -fg_bf = factor_graph( - ig, - Dict(1=>4, 2=>2), - energy=energy, - spectrum=brute_force, -) - -sp = get_prop(fg, 1, :spectrum) -sp_bf = get_prop(fg_bf, 1, :spectrum) +for v in vertices(fg) + cl = get_prop(fg, v, :cluster) + sp = get_prop(fg, v, :spectrum) -display(sp.states) -display(sp_bf.states) + @test length(sp.energies) == length(sp.states) == custom_spec[v] + @test collect(keys(cl.vertices)) == cluster(v, custom_rule) +end end \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index 33e35eee..ff018634 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -31,22 +31,22 @@ if CUDA.functional() && CUDA.has_cutensor() && false end push!(my_tests, - "base.jl", - "utils.jl", - "contractions.jl", - "compressions.jl", - "ising.jl", + #"base.jl", + #"utils.jl", + #"contractions.jl", + #"compressions.jl", + #"ising.jl", "indexing.jl", - "searchMPS.jl", - "spectrum.jl", - "graph.jl", - "PEPS.jl", - "indexing.jl", - "notation_tests.jl", - "peps_tests.jl", - "mps_tests.jl", - "tests_full_graph.jl", - "tests_on_data.jl" + #"searchMPS.jl", + #"spectrum.jl", + #"graph.jl", + #"PEPS.jl", + #"indexing.jl", + #"notation_tests.jl", + #"peps_tests.jl", + #"mps_tests.jl", + #"tests_full_graph.jl", + #"tests_on_data.jl" ) for my_test in my_tests From 1a0f34a3896f79ab3b0b9456297e88f7f034ae06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 2 Feb 2021 16:54:56 +0100 Subject: [PATCH 006/110] improve error msg in NetworkGraph --- src/lattice.jl | 2 +- src/network.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lattice.jl b/src/lattice.jl index 3029fbae..1d4d97a5 100644 --- a/src/lattice.jl +++ b/src/lattice.jl @@ -18,4 +18,4 @@ function square_lattice(size::NTuple{3, Int}) square_lattice((m, 1, n, 1, t)) end -cluster(i::Int, rule::Dict) = collect(keys(filter(kv -> kv.second == i, rule))) \ No newline at end of file +cluster(i::Int, rule::Dict{Int, Int}) = collect(keys(filter(kv -> kv.second == i, rule))) \ No newline at end of file diff --git a/src/network.jl b/src/network.jl index f31db15e..dd27ef1e 100644 --- a/src/network.jl +++ b/src/network.jl @@ -14,8 +14,8 @@ mutable struct NetworkGraph end mc = ne(fg) - if count < mc - error("Factor and Ising graphs are incompatible: $(count) < $(mc)") + if count < mc + error("Factor and Ising graphs are incompatible. Edges: $(count) vs $(mc).") end ng end From 330b26d99e9e88e2cc10ca6753289c3e2abe348b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 2 Feb 2021 17:05:15 +0100 Subject: [PATCH 007/110] add MPS from row --- src/PEPS.jl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 38284b20..74f9117d 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -79,4 +79,13 @@ function MPO(::Type{T}, peps::PepsNetwork, i::Int, k::Int) where {T <: Number} end ψ end -MPO(peps::PepsNetwork, i::Int, k::Int) = MPO(Float64, peps, i, k) \ No newline at end of file +MPO(peps::PepsNetwork, i::Int, k::Int) = MPO(Float64, peps, i, k) + +function MPS(::Type{T}, peps::PepsNetwork, i::Int, k::Int) where {T <: Number} + W = MPO(T, peps, i, k) + ψ = MPS(T, length(W)) + for (O, i) ∈ enumerate(W) + ψ[i] = dropdims(O, dims=(2, 4)) + end + ψ +end \ No newline at end of file From c9ed5956ee155051c9bf3819caa394cf81decfde Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Tue, 2 Feb 2021 17:10:51 +0100 Subject: [PATCH 008/110] add configurations' energy --- src/ising.jl | 28 ++++++++++++++++ test/ising.jl | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) diff --git a/src/ising.jl b/src/ising.jl index 0d0e329b..1d566121 100644 --- a/src/ising.jl +++ b/src/ising.jl @@ -204,3 +204,31 @@ function energy(fg::MetaDiGraph, edge::Edge) end en end + +function energy(configurations::Dict, couplings::Dict, cedges::Dict, n::Int) + eng = zeros(1,n) + for (i, j) ∈ keys(cedges) + for (k, l) ∈ values(cedges[i, j]) + for m ∈ 1:length(configurations[k]) + s = configurations[k][m] + r = configurations[l][m] + J = couplings[k, l] + if k == l + eng[m] += dot(s,J) + else + eng[m] += dot(s, J, r) + end + end + end + end + eng +end + +function energy(ig::MetaGraph, configurations::Array) + s = size(configurations,1) + eng = zeros(s) + for i ∈ 1:s + eng[i] = energy(configurations[i,:], ig) + end + eng +end \ No newline at end of file diff --git a/test/ising.jl b/test/ising.jl index 8482ec7c..eae33398 100644 --- a/test/ising.jl +++ b/test/ising.jl @@ -109,3 +109,94 @@ using CSV @test gibbs_tensor(ig) ≈ gibbs_tensor(ig_dict) end end + +@testset "Ground state energy for pathological instance " begin +m = 3 +n = 4 +t = 3 + +β = 1 +L = n * m * t + +instance = "$(@__DIR__)/instances/pathological/test_$(m)_$(n)_$(t).txt" + +ising = CSV.File(instance, types=[Int, Int, Float64], header=0, comment = "#") +ig = ising_graph(instance, L) +conf = [-1 0 0 1 1 -1 -1 -1 1 0 0 0 1 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 1 1 -1 1 -1 1 0 0 0; +-1 0 0 1 1 -1 -1 -1 1 0 0 0 1 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 1 1 -1 1 -1 -1 0 0 0; +-1 0 0 1 1 -1 -1 1 1 0 0 0 1 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 1 1 -1 1 -1 1 0 0 0; +-1 0 0 1 1 -1 -1 1 1 0 0 0 1 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 1 1 -1 1 -1 -1 0 0 0] + +eng = energy(ig, conf) + +couplings = Dict() +for (i, j, v) ∈ ising + push!(couplings, (i, j) => v) +end + +cedges = Dict() +push!(cedges, (1, 2) => [(1, 4), (1, 5), (1, 6)]) +push!(cedges, (1, 5) => [(1, 13)]) + +push!(cedges, (2, 3) => [(4, 7), (5, 7), (6, 8), (6, 9)]) +push!(cedges, (2, 6) => [(6, 16), (6, 18), (5, 16)]) + +push!(cedges, (5, 6) => [(13, 16), (13, 18)]) + +push!(cedges, (6, 10) => [(18, 28)]) +push!(cedges, (10, 11) => [(28, 31), (28, 32), (28, 33), (29, 31), (29, 32), (29, 33), (30, 31), (30, 32), (30, 33)]) + +push!(cedges, (2, 2) => [(4, 5), (4, 6), (5, 6), (6, 6)]) +push!(cedges, (3, 3) => [(7, 8), (7, 9)]) +push!(cedges, (6, 6) => [(16, 18), (16, 16)]) +push!(cedges, (10, 10) => [(28, 29), (28, 30), (29, 30)]) + +configurations = Dict() +push!(configurations, 1 => [-1, -1, -1, -1]) +push!(configurations, 2 => [0, 0, 0, 0]) +push!(configurations, 3 => [0, 0, 0, 0]) +push!(configurations, 4 => [1, 1, 1, 1]) +push!(configurations, 5 => [1, 1, 1, 1]) +push!(configurations, 6 => [-1, -1, -1, -1]) +push!(configurations, 7 => [-1, -1, -1, -1]) +push!(configurations, 8 => [-1, -1, 1, 1]) +push!(configurations, 9 => [1, 1, 1, 1]) +push!(configurations, 10 => [0, 0, 0, 0]) +push!(configurations, 11 => [0, 0, 0, 0]) +push!(configurations, 12 => [0, 0, 0, 0]) +push!(configurations, 13 => [1, 1, 1, 1]) +push!(configurations, 14 => [0, 0, 0, 0]) +push!(configurations, 15 => [0, 0, 0, 0]) +push!(configurations, 16 => [1, 1, 1, 1]) +push!(configurations, 17 => [0, 0, 0, 0]) +push!(configurations, 18 => [-1, -1, -1, -1]) +push!(configurations, 19 => [0, 0, 0, 0]) +push!(configurations, 20 => [0, 0, 0, 0]) +push!(configurations, 21 => [0, 0, 0, 0]) +push!(configurations, 22 => [0, 0, 0, 0]) +push!(configurations, 23 => [0, 0, 0, 0]) +push!(configurations, 24 => [0, 0, 0, 0]) +push!(configurations, 25 => [0, 0, 0, 0]) +push!(configurations, 26 => [0, 0, 0, 0]) +push!(configurations, 27 => [0, 0, 0, 0]) +push!(configurations, 28 => [1, 1, 1, 1]) +push!(configurations, 29 => [1, 1, 1, 1]) +push!(configurations, 30 => [-1, -1, -1, -1]) +push!(configurations, 31 => [1, 1, 1, 1]) +push!(configurations, 32 => [-1, -1, -1, -1]) +push!(configurations, 33 => [1,-1, 1, -1]) +push!(configurations, 34 => [0, 0, 0, 0]) +push!(configurations, 35 => [0, 0, 0, 0]) +push!(configurations, 36 => [0, 0, 0, 0]) + +j = length(configurations[1]) +e = energy(configurations, couplings, cedges, j) + +low_energies = [-16.4, -16.4, -16.4, -16.4, -16.1, -16.1, -16.1, -16.1, -15.9, -15.9, -15.9, -15.9, -15.9, -15.9, -15.6, -15.6, -15.6, -15.6, -15.6, -15.6, -15.4, -15.4] + +for i ∈ 1:j + @test e[i] == low_energies[i] == eng[i] +end +println("low energies from BF: ", e) +println("low energies from ig: ", eng) +end \ No newline at end of file From a1b59289c771a4822c92d8c1c827aac27dc09cc5 Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Tue, 2 Feb 2021 18:14:04 +0100 Subject: [PATCH 009/110] make_lower_MPS not working yet --- src/PEPS.jl | 23 ++++++++++++++++++++++- test/PEPS.jl | 36 ++++++++++++++++++++++++++++++++++++ test/runtests.jl | 4 ++-- 3 files changed, 60 insertions(+), 3 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 74f9117d..37607237 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -1,5 +1,6 @@ export PepsNetwork -export MPO +export MPO, MPS +export make_lower_MPS mutable struct PepsNetwork size::NTuple{2, Int} @@ -88,4 +89,24 @@ function MPS(::Type{T}, peps::PepsNetwork, i::Int, k::Int) where {T <: Number} ψ[i] = dropdims(O, dims=(2, 4)) end ψ +end +MPS(peps::PepsNetwork, i::Int, k::Int) = MPS(Float64, peps, i, k) + +function make_lower_MPS(peps::PepsNetwork, i::Int, k::Int, s::Int, Dcut::Int, tol::Number=1E-8, max_sweeps=4) + ψ = MPO(PEPSRow(peps, 1)) + #ψ = MPS(peps, i, k) + + for i ∈ s:peps.i_max + + R = PEPSRow(peps, i) + W = MPO(R) + M = MPO(peps, i-1, i) + + ψ = (ψ * M) * W + + if (tol > 0.) & (Dcut < size(ψ[1], 3)) + ψ = compress(ψ, Dcut, tol, max_sweeps) + end + end + ψ end \ No newline at end of file diff --git a/test/PEPS.jl b/test/PEPS.jl index e3527eb3..7c83fac9 100644 --- a/test/PEPS.jl +++ b/test/PEPS.jl @@ -201,3 +201,39 @@ for origin ∈ (:NW,)# :SW, :WS, :WN, :NE, :EN, :SE, :ES) end end + +@testset "Make_lower_MPS" begin + m = 3 + n = 4 + t = 3 + i = 3 + k = 4 + s = 2 + Dcut = 2 + tol = 1E-4 + max_sweeps = 4 + β = 1 + + L = m * n * t + + instance = "$(@__DIR__)/instances/pathological/test_$(m)_$(n)_$(t).txt" + + ig = ising_graph(instance, L) + update_cells!( + ig, + rule = square_lattice((m, n, t)), + ) + + fg = factor_graph( + ig, + energy=energy, + spectrum=full_spectrum, + ) + + x, y = m, n + origin = :NW + peps = PepsNetwork(x, y, fg, β, origin) + @test typeof(peps) == PepsNetwork + ψ = MPS(peps, i, k) + #ψ = make_lower_MPS(peps, i, k, s, Dcut, tol, max_sweeps) +end \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index ff018634..fce453a5 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -36,11 +36,11 @@ push!(my_tests, #"contractions.jl", #"compressions.jl", #"ising.jl", - "indexing.jl", + #"indexing.jl", #"searchMPS.jl", #"spectrum.jl", #"graph.jl", - #"PEPS.jl", + "PEPS.jl", #"indexing.jl", #"notation_tests.jl", #"peps_tests.jl", From e98060fd64bcdbaa678004ebd3f7d12b225df35a Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Tue, 2 Feb 2021 18:18:49 +0100 Subject: [PATCH 010/110] correction --- src/PEPS.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 37607237..2b0ca090 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -93,8 +93,7 @@ end MPS(peps::PepsNetwork, i::Int, k::Int) = MPS(Float64, peps, i, k) function make_lower_MPS(peps::PepsNetwork, i::Int, k::Int, s::Int, Dcut::Int, tol::Number=1E-8, max_sweeps=4) - ψ = MPO(PEPSRow(peps, 1)) - #ψ = MPS(peps, i, k) + ψ = MPS(peps, i, k) for i ∈ s:peps.i_max From 7b03842d738205aeda98070831715094acb0f55e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 2 Feb 2021 20:10:30 +0100 Subject: [PATCH 011/110] modify MPS --- src/PEPS.jl | 11 ++++++----- test/PEPS.jl | 7 ++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 2b0ca090..7cc73253 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -82,15 +82,16 @@ function MPO(::Type{T}, peps::PepsNetwork, i::Int, k::Int) where {T <: Number} end MPO(peps::PepsNetwork, i::Int, k::Int) = MPO(Float64, peps, i, k) -function MPS(::Type{T}, peps::PepsNetwork, i::Int, k::Int) where {T <: Number} - W = MPO(T, peps, i, k) +function MPS(::Type{T}, peps::PepsNetwork) where {T <: Number} + W = MPO(PEPSRow(peps, 1)) ψ = MPS(T, length(W)) + for (O, i) ∈ enumerate(W) - ψ[i] = dropdims(O, dims=(2, 4)) + ψ[i] = dropdims(O, dims=2) end ψ end -MPS(peps::PepsNetwork, i::Int, k::Int) = MPS(Float64, peps, i, k) +MPS(peps::PepsNetwork) = MPS(Float64, peps) function make_lower_MPS(peps::PepsNetwork, i::Int, k::Int, s::Int, Dcut::Int, tol::Number=1E-8, max_sweeps=4) ψ = MPS(peps, i, k) @@ -103,7 +104,7 @@ function make_lower_MPS(peps::PepsNetwork, i::Int, k::Int, s::Int, Dcut::Int, to ψ = (ψ * M) * W - if (tol > 0.) & (Dcut < size(ψ[1], 3)) + if tol > 0. & Dcut < size(ψ[1], 3) ψ = compress(ψ, Dcut, tol, max_sweeps) end end diff --git a/test/PEPS.jl b/test/PEPS.jl index 7c83fac9..da836ad1 100644 --- a/test/PEPS.jl +++ b/test/PEPS.jl @@ -54,11 +54,12 @@ for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) @info "contracting MPOs (up -> down)" - ψ = MPO(PEPSRow(peps, 1)) + #ψ = MPO(PEPSRow(peps, 1)) + ψ = MPS(peps) - for A ∈ ψ @test size(A, 2) == 1 end + #for A ∈ ψ @test size(A, 2) == 1 end - for i ∈ 2:peps.i_max + #for i ∈ 2:peps.i_max println("row -> ", i) R = PEPSRow(peps, i) From 7d7b595f3b80ac44cdfbf073d5342941bbc75e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 2 Feb 2021 20:29:19 +0100 Subject: [PATCH 012/110] =?UTF-8?q?gn=C3=B3j?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/PEPS.jl | 26 +++++++++++++++++--------- test/PEPS.jl | 17 ++++++++++------- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 7cc73253..a98b6186 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -83,28 +83,36 @@ end MPO(peps::PepsNetwork, i::Int, k::Int) = MPO(Float64, peps, i, k) function MPS(::Type{T}, peps::PepsNetwork) where {T <: Number} - W = MPO(PEPSRow(peps, 1)) + W = MPO(PEPSRow(peps, peps.i_max)) ψ = MPS(T, length(W)) - for (O, i) ∈ enumerate(W) - ψ[i] = dropdims(O, dims=2) + for (i, O) ∈ enumerate(W) + ψ[i] = dropdims(O, dims=4) end ψ end MPS(peps::PepsNetwork) = MPS(Float64, peps) -function make_lower_MPS(peps::PepsNetwork, i::Int, k::Int, s::Int, Dcut::Int, tol::Number=1E-8, max_sweeps=4) - ψ = MPS(peps, i, k) +# TODO: this is not good! WTF is i, k, s? +function MPS( + peps::PepsNetwork, + i::Int, + k::Int, + s::Int, + Dcut::Int, + tol::Number=1E-8, + max_sweeps=4) - for i ∈ s:peps.i_max + ψ = MPS(peps) + for i ∈ peps.i_max-1:-1:1 R = PEPSRow(peps, i) W = MPO(R) - M = MPO(peps, i-1, i) + M = MPO(peps, i, i+1) - ψ = (ψ * M) * W + ψ = W * (M * ψ) - if tol > 0. & Dcut < size(ψ[1], 3) + if tol > 0. & bond_dimension(ψ) > Dcut ψ = compress(ψ, Dcut, tol, max_sweeps) end end diff --git a/test/PEPS.jl b/test/PEPS.jl index da836ad1..d9464c0b 100644 --- a/test/PEPS.jl +++ b/test/PEPS.jl @@ -54,12 +54,11 @@ for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) @info "contracting MPOs (up -> down)" - #ψ = MPO(PEPSRow(peps, 1)) - ψ = MPS(peps) + ψ = MPO(PEPSRow(peps, 1)) - #for A ∈ ψ @test size(A, 2) == 1 end + for A ∈ ψ @test size(A, 2) == 1 end - #for i ∈ 2:peps.i_max + for i ∈ 2:peps.i_max println("row -> ", i) R = PEPSRow(peps, i) @@ -68,7 +67,7 @@ for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) ψ = (ψ * M) * W - for A ∈ ψ @test size(A, 2) == 1 end + #for A ∈ ψ @test size(A, 2) == 1 end @test size(ψ[1], 1) == 1 == size(ψ[peps.j_max], 3) end @@ -178,11 +177,12 @@ fg = factor_graph( spectrum=full_spectrum, ) -for origin ∈ (:NW,)# :SW, :WS, :WN, :NE, :EN, :SE, :ES) +for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) peps = PepsNetwork(m, n, fg, β, origin) ψ = MPO(PEPSRow(peps, 1)) + for i ∈ 2:peps.i_max W = MPO(PEPSRow(peps, i)) M = MPO(peps, i-1, i) @@ -203,6 +203,7 @@ end end +#= @testset "Make_lower_MPS" begin m = 3 n = 4 @@ -235,6 +236,8 @@ end origin = :NW peps = PepsNetwork(x, y, fg, β, origin) @test typeof(peps) == PepsNetwork + ψ = MPS(peps, i, k) #ψ = make_lower_MPS(peps, i, k, s, Dcut, tol, max_sweeps) -end \ No newline at end of file +end +=# From 1fff0c7d474e3c753525c58d12ced6222550257c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 2 Feb 2021 20:57:55 +0100 Subject: [PATCH 013/110] improve MPS for peps --- src/PEPS.jl | 21 ++++++++++++++------- test/PEPS.jl | 12 +++--------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index a98b6186..97c81a29 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -82,7 +82,7 @@ function MPO(::Type{T}, peps::PepsNetwork, i::Int, k::Int) where {T <: Number} end MPO(peps::PepsNetwork, i::Int, k::Int) = MPO(Float64, peps, i, k) -function MPS(::Type{T}, peps::PepsNetwork) where {T <: Number} +function _MPS(::Type{T}, peps::PepsNetwork) where {T <: Number} W = MPO(PEPSRow(peps, peps.i_max)) ψ = MPS(T, length(W)) @@ -91,21 +91,28 @@ function MPS(::Type{T}, peps::PepsNetwork) where {T <: Number} end ψ end + +function MPS(::Type{T}, peps::PepsNetwork) where {T <: Number} + ψ = MPS(T, peps.j_max) + for i ∈ 1:length(ψ) + ψ[i] = ones(1, 1, 1) + end + ψ +end MPS(peps::PepsNetwork) = MPS(Float64, peps) -# TODO: this is not good! WTF is i, k, s? +# TODO: WTF is i, k, s? function MPS( peps::PepsNetwork, - i::Int, - k::Int, - s::Int, + #i::Int, + #k::Int, + #s::Int, Dcut::Int, tol::Number=1E-8, max_sweeps=4) ψ = MPS(peps) - for i ∈ peps.i_max-1:-1:1 - + for i ∈ peps.i_max:-1:1 R = PEPSRow(peps, i) W = MPO(R) M = MPO(peps, i, i+1) diff --git a/test/PEPS.jl b/test/PEPS.jl index d9464c0b..179257bd 100644 --- a/test/PEPS.jl +++ b/test/PEPS.jl @@ -67,7 +67,7 @@ for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) ψ = (ψ * M) * W - #for A ∈ ψ @test size(A, 2) == 1 end + for A ∈ ψ @test size(A, 2) == 1 end @test size(ψ[1], 1) == 1 == size(ψ[peps.j_max], 3) end @@ -77,11 +77,8 @@ for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) @info "contracting MPOs (down -> up)" - ψ = MPO(PEPSRow(peps, peps.i_max)) - - for A ∈ ψ @test size(A, 4) == 1 end - - for i ∈ peps.i_max-1:-1:1 + ψ = MPS(peps) + for i ∈ peps.i_max:-1:1 println("row -> ", i) R = PEPSRow(peps, i) @@ -89,9 +86,6 @@ for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) M = MPO(peps, i, i+1) ψ = W * (M * ψ) - - for A ∈ ψ @test size(A, 4) == 1 end - @test size(ψ[1], 1) == 1 == size(ψ[peps.j_max], 3) end From 6416f5903573bc6ef0d90164f34fc21d651e23a2 Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Tue, 2 Feb 2021 21:37:05 +0100 Subject: [PATCH 014/110] add lower mps --- src/PEPS.jl | 6 +----- test/PEPS.jl | 10 +++------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 97c81a29..72b2981e 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -101,12 +101,8 @@ function MPS(::Type{T}, peps::PepsNetwork) where {T <: Number} end MPS(peps::PepsNetwork) = MPS(Float64, peps) -# TODO: WTF is i, k, s? function MPS( peps::PepsNetwork, - #i::Int, - #k::Int, - #s::Int, Dcut::Int, tol::Number=1E-8, max_sweeps=4) @@ -119,7 +115,7 @@ function MPS( ψ = W * (M * ψ) - if tol > 0. & bond_dimension(ψ) > Dcut + if tol > 0. && bond_dimension(ψ) > Dcut ψ = compress(ψ, Dcut, tol, max_sweeps) end end diff --git a/test/PEPS.jl b/test/PEPS.jl index 179257bd..14d877f6 100644 --- a/test/PEPS.jl +++ b/test/PEPS.jl @@ -197,14 +197,11 @@ end end -#= @testset "Make_lower_MPS" begin m = 3 n = 4 t = 3 - i = 3 - k = 4 - s = 2 + Dcut = 2 tol = 1E-4 max_sweeps = 4 @@ -231,7 +228,6 @@ end peps = PepsNetwork(x, y, fg, β, origin) @test typeof(peps) == PepsNetwork - ψ = MPS(peps, i, k) - #ψ = make_lower_MPS(peps, i, k, s, Dcut, tol, max_sweeps) + #ψ = MPS(peps) + ψ = MPS(peps, Dcut, tol, max_sweeps) end -=# From 85081f45691d78eb0e1839d271240684911f97d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 2 Feb 2021 22:03:10 +0100 Subject: [PATCH 015/110] add minor improvments --- src/PEPS.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PEPS.jl b/src/PEPS.jl index 97c81a29..17092ed8 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -114,6 +114,7 @@ function MPS( ψ = MPS(peps) for i ∈ peps.i_max:-1:1 R = PEPSRow(peps, i) + W = MPO(R) M = MPO(peps, i, i+1) From 3dc98971e62611768e385cc3fdb6b42c30d0a670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 2 Feb 2021 22:13:40 +0100 Subject: [PATCH 016/110] rm energies --- src/ising.jl | 9 ++++++--- test/ising.jl | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ising.jl b/src/ising.jl index 1d566121..4e4733fa 100644 --- a/src/ising.jl +++ b/src/ising.jl @@ -205,6 +205,8 @@ function energy(fg::MetaDiGraph, edge::Edge) en end +#todo: this is too complicated and inefficient to be in src +#= function energy(configurations::Dict, couplings::Dict, cedges::Dict, n::Int) eng = zeros(1,n) for (i, j) ∈ keys(cedges) @@ -214,7 +216,7 @@ function energy(configurations::Dict, couplings::Dict, cedges::Dict, n::Int) r = configurations[l][m] J = couplings[k, l] if k == l - eng[m] += dot(s,J) + eng[m] += dot(s, J) else eng[m] += dot(s, J, r) end @@ -225,10 +227,11 @@ function energy(configurations::Dict, couplings::Dict, cedges::Dict, n::Int) end function energy(ig::MetaGraph, configurations::Array) - s = size(configurations,1) + s = size(configurations, 1) eng = zeros(s) for i ∈ 1:s eng[i] = energy(configurations[i,:], ig) end eng -end \ No newline at end of file +end +=# \ No newline at end of file diff --git a/test/ising.jl b/test/ising.jl index eae33398..71f77e95 100644 --- a/test/ising.jl +++ b/test/ising.jl @@ -110,6 +110,7 @@ using CSV end end +#= @testset "Ground state energy for pathological instance " begin m = 3 n = 4 @@ -199,4 +200,5 @@ for i ∈ 1:j end println("low energies from BF: ", e) println("low energies from ig: ", eng) -end \ No newline at end of file +end +=# \ No newline at end of file From 44c590ccb3593351aac0a5b1543fb1e162046050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 2 Feb 2021 22:15:36 +0100 Subject: [PATCH 017/110] change tests in ising --- test/PEPS.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/PEPS.jl b/test/PEPS.jl index 14d877f6..eadae21b 100644 --- a/test/PEPS.jl +++ b/test/PEPS.jl @@ -197,7 +197,7 @@ end end -@testset "Make_lower_MPS" begin +@testset "Boundary MPS bulids correctly" begin m = 3 n = 4 t = 3 @@ -226,8 +226,8 @@ end x, y = m, n origin = :NW peps = PepsNetwork(x, y, fg, β, origin) + @test typeof(peps) == PepsNetwork - #ψ = MPS(peps) ψ = MPS(peps, Dcut, tol, max_sweeps) end From a3d8d4decf7c1d962e577e2aa33491470d7d648c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 2 Feb 2021 22:25:40 +0100 Subject: [PATCH 018/110] modify ising tests --- src/ising.jl | 31 ------------ test/ising.jl | 126 ++++++++++++++++++++++++++++------------------- test/runtests.jl | 2 +- 3 files changed, 75 insertions(+), 84 deletions(-) diff --git a/src/ising.jl b/src/ising.jl index 4e4733fa..0d0e329b 100644 --- a/src/ising.jl +++ b/src/ising.jl @@ -204,34 +204,3 @@ function energy(fg::MetaDiGraph, edge::Edge) end en end - -#todo: this is too complicated and inefficient to be in src -#= -function energy(configurations::Dict, couplings::Dict, cedges::Dict, n::Int) - eng = zeros(1,n) - for (i, j) ∈ keys(cedges) - for (k, l) ∈ values(cedges[i, j]) - for m ∈ 1:length(configurations[k]) - s = configurations[k][m] - r = configurations[l][m] - J = couplings[k, l] - if k == l - eng[m] += dot(s, J) - else - eng[m] += dot(s, J, r) - end - end - end - end - eng -end - -function energy(ig::MetaGraph, configurations::Array) - s = size(configurations, 1) - eng = zeros(s) - for i ∈ 1:s - eng[i] = energy(configurations[i,:], ig) - end - eng -end -=# \ No newline at end of file diff --git a/test/ising.jl b/test/ising.jl index 71f77e95..b18a8f5e 100644 --- a/test/ising.jl +++ b/test/ising.jl @@ -3,6 +3,34 @@ using LightGraphs using GraphPlot using CSV +function _energy(config::Dict, couplings::Dict, cedges::Dict, n::Int) + eng = zeros(1,n) + for (i, j) ∈ keys(cedges) + for (k, l) ∈ values(cedges[i, j]) + for m ∈ 1:length(config[k]) + s = config[k][m] + r = config[l][m] + J = couplings[k, l] + if k == l + eng[m] += dot(s, J) + else + eng[m] += dot(s, J, r) + end + end + end + end + eng +end + +function _energy(ig::MetaGraph, config::Array) + s = size(config, 1) + eng = zeros(s) + for i ∈ 1:s + eng[i] = energy(config[i, :], ig) + end + eng +end + @testset "Ising" begin L = 4 @@ -55,11 +83,6 @@ using CSV @test sp.energies ≈ energy.(sp.states, Ref(ig)) - # states, energies = brute_force(ig, num_states=k) - - # @test energies ≈ sp.energies - # @test states == sp.states - β = rand(Float64) ρ = gibbs_tensor(ig, β) @@ -110,7 +133,7 @@ using CSV end end -#= + @testset "Ground state energy for pathological instance " begin m = 3 n = 4 @@ -123,12 +146,13 @@ instance = "$(@__DIR__)/instances/pathological/test_$(m)_$(n)_$(t).txt" ising = CSV.File(instance, types=[Int, Int, Float64], header=0, comment = "#") ig = ising_graph(instance, L) + conf = [-1 0 0 1 1 -1 -1 -1 1 0 0 0 1 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 1 1 -1 1 -1 1 0 0 0; -1 0 0 1 1 -1 -1 -1 1 0 0 0 1 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 1 1 -1 1 -1 -1 0 0 0; -1 0 0 1 1 -1 -1 1 1 0 0 0 1 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 1 1 -1 1 -1 1 0 0 0; -1 0 0 1 1 -1 -1 1 1 0 0 0 1 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 1 1 -1 1 -1 -1 0 0 0] -eng = energy(ig, conf) +eng = _energy(ig, conf) couplings = Dict() for (i, j, v) ∈ ising @@ -152,53 +176,51 @@ push!(cedges, (3, 3) => [(7, 8), (7, 9)]) push!(cedges, (6, 6) => [(16, 18), (16, 16)]) push!(cedges, (10, 10) => [(28, 29), (28, 30), (29, 30)]) -configurations = Dict() -push!(configurations, 1 => [-1, -1, -1, -1]) -push!(configurations, 2 => [0, 0, 0, 0]) -push!(configurations, 3 => [0, 0, 0, 0]) -push!(configurations, 4 => [1, 1, 1, 1]) -push!(configurations, 5 => [1, 1, 1, 1]) -push!(configurations, 6 => [-1, -1, -1, -1]) -push!(configurations, 7 => [-1, -1, -1, -1]) -push!(configurations, 8 => [-1, -1, 1, 1]) -push!(configurations, 9 => [1, 1, 1, 1]) -push!(configurations, 10 => [0, 0, 0, 0]) -push!(configurations, 11 => [0, 0, 0, 0]) -push!(configurations, 12 => [0, 0, 0, 0]) -push!(configurations, 13 => [1, 1, 1, 1]) -push!(configurations, 14 => [0, 0, 0, 0]) -push!(configurations, 15 => [0, 0, 0, 0]) -push!(configurations, 16 => [1, 1, 1, 1]) -push!(configurations, 17 => [0, 0, 0, 0]) -push!(configurations, 18 => [-1, -1, -1, -1]) -push!(configurations, 19 => [0, 0, 0, 0]) -push!(configurations, 20 => [0, 0, 0, 0]) -push!(configurations, 21 => [0, 0, 0, 0]) -push!(configurations, 22 => [0, 0, 0, 0]) -push!(configurations, 23 => [0, 0, 0, 0]) -push!(configurations, 24 => [0, 0, 0, 0]) -push!(configurations, 25 => [0, 0, 0, 0]) -push!(configurations, 26 => [0, 0, 0, 0]) -push!(configurations, 27 => [0, 0, 0, 0]) -push!(configurations, 28 => [1, 1, 1, 1]) -push!(configurations, 29 => [1, 1, 1, 1]) -push!(configurations, 30 => [-1, -1, -1, -1]) -push!(configurations, 31 => [1, 1, 1, 1]) -push!(configurations, 32 => [-1, -1, -1, -1]) -push!(configurations, 33 => [1,-1, 1, -1]) -push!(configurations, 34 => [0, 0, 0, 0]) -push!(configurations, 35 => [0, 0, 0, 0]) -push!(configurations, 36 => [0, 0, 0, 0]) - -j = length(configurations[1]) -e = energy(configurations, couplings, cedges, j) +config = Dict() +push!(config, 1 => [-1, -1, -1, -1]) +push!(config, 2 => [0, 0, 0, 0]) +push!(config, 3 => [0, 0, 0, 0]) +push!(config, 4 => [1, 1, 1, 1]) +push!(config, 5 => [1, 1, 1, 1]) +push!(config, 6 => [-1, -1, -1, -1]) +push!(config, 7 => [-1, -1, -1, -1]) +push!(config, 8 => [-1, -1, 1, 1]) +push!(config, 9 => [1, 1, 1, 1]) +push!(config, 10 => [0, 0, 0, 0]) +push!(config, 11 => [0, 0, 0, 0]) +push!(config, 12 => [0, 0, 0, 0]) +push!(config, 13 => [1, 1, 1, 1]) +push!(config, 14 => [0, 0, 0, 0]) +push!(config, 15 => [0, 0, 0, 0]) +push!(config, 16 => [1, 1, 1, 1]) +push!(config, 17 => [0, 0, 0, 0]) +push!(config, 18 => [-1, -1, -1, -1]) +push!(config, 19 => [0, 0, 0, 0]) +push!(config, 20 => [0, 0, 0, 0]) +push!(config, 21 => [0, 0, 0, 0]) +push!(config, 22 => [0, 0, 0, 0]) +push!(config, 23 => [0, 0, 0, 0]) +push!(config, 24 => [0, 0, 0, 0]) +push!(config, 25 => [0, 0, 0, 0]) +push!(config, 26 => [0, 0, 0, 0]) +push!(config, 27 => [0, 0, 0, 0]) +push!(config, 28 => [1, 1, 1, 1]) +push!(config, 29 => [1, 1, 1, 1]) +push!(config, 30 => [-1, -1, -1, -1]) +push!(config, 31 => [1, 1, 1, 1]) +push!(config, 32 => [-1, -1, -1, -1]) +push!(config, 33 => [1,-1, 1, -1]) +push!(config, 34 => [0, 0, 0, 0]) +push!(config, 35 => [0, 0, 0, 0]) +push!(config, 36 => [0, 0, 0, 0]) + +num_config = length(config[1]) +exact_energy = _energy(config, couplings, cedges, num_config) low_energies = [-16.4, -16.4, -16.4, -16.4, -16.1, -16.1, -16.1, -16.1, -15.9, -15.9, -15.9, -15.9, -15.9, -15.9, -15.6, -15.6, -15.6, -15.6, -15.6, -15.6, -15.4, -15.4] -for i ∈ 1:j - @test e[i] == low_energies[i] == eng[i] +for i ∈ 1:num_config + @test exact_energy[i] == low_energies[i] == eng[i] end -println("low energies from BF: ", e) -println("low energies from ig: ", eng) + end -=# \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index fce453a5..edcd12bc 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -35,7 +35,7 @@ push!(my_tests, #"utils.jl", #"contractions.jl", #"compressions.jl", - #"ising.jl", + "ising.jl", #"indexing.jl", #"searchMPS.jl", #"spectrum.jl", From cd7fe0b19658d40014676b619acad3e2c359d867 Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Tue, 2 Feb 2021 22:25:47 +0100 Subject: [PATCH 019/110] improve tests --- src/PEPS.jl | 2 +- test/PEPS.jl | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 72b2981e..9dbb7c0d 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -114,7 +114,7 @@ function MPS( M = MPO(peps, i, i+1) ψ = W * (M * ψ) - + if tol > 0. && bond_dimension(ψ) > Dcut ψ = compress(ψ, Dcut, tol, max_sweeps) end diff --git a/test/PEPS.jl b/test/PEPS.jl index 14d877f6..beb652e9 100644 --- a/test/PEPS.jl +++ b/test/PEPS.jl @@ -197,12 +197,12 @@ end end -@testset "Make_lower_MPS" begin +@testset "Boundary MPS bulids correctly" begin m = 3 n = 4 t = 3 - Dcut = 2 + Dcut = 4 tol = 1E-4 max_sweeps = 4 β = 1 @@ -224,10 +224,13 @@ end ) x, y = m, n - origin = :NW - peps = PepsNetwork(x, y, fg, β, origin) - @test typeof(peps) == PepsNetwork + for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) + peps = PepsNetwork(x, y, fg, β, origin) + @test typeof(peps) == PepsNetwork - #ψ = MPS(peps) - ψ = MPS(peps, Dcut, tol, max_sweeps) + ψ = MPS(peps, Dcut, tol, max_sweeps) + @test typeof(ψ) == MPS{Float64} + for A ∈ ψ @test size(A, 2) == 1 end + @test bond_dimension(ψ) < Dcut + end end From b3beb93c6b24d66a6e9c596fd375e0a026ba7b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 2 Feb 2021 22:53:56 +0100 Subject: [PATCH 020/110] add some remarks --- src/PEPS.jl | 1 + test/runtests.jl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 0c6488dd..bba43c72 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -116,6 +116,7 @@ function MPS( ψ = W * (M * ψ) + #todo: why tol > 0? if tol > 0. && bond_dimension(ψ) > Dcut ψ = compress(ψ, Dcut, tol, max_sweeps) end diff --git a/test/runtests.jl b/test/runtests.jl index edcd12bc..fce453a5 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -35,7 +35,7 @@ push!(my_tests, #"utils.jl", #"contractions.jl", #"compressions.jl", - "ising.jl", + #"ising.jl", #"indexing.jl", #"searchMPS.jl", #"spectrum.jl", From f6fcda656ef3d7dabf674773299c798795183def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Wed, 3 Feb 2021 11:24:53 +0100 Subject: [PATCH 021/110] add boundaryMPS --- src/PEPS.jl | 27 +++++++++++++++++++++++++++ test/runtests.jl | 30 +++++++++++++++--------------- 2 files changed, 42 insertions(+), 15 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index bba43c72..2d90f905 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -122,4 +122,31 @@ function MPS( end end ψ +end + + +function boundaryMPS( + peps::PepsNetwork, + Dcut::Int, + tol::Number=1E-8, + max_sweeps=4) + + ψ = MPS(peps) + boundary_MPS = Vector{MPS}(undef, peps.i_max) + + for i ∈ peps.i_max:-1:1 + R = PEPSRow(peps, i) + + W = MPO(R) + M = MPO(peps, i, i+1) + + ψ = W * (M * ψ) + + if bond_dimension(ψ) > Dcut + ψ = compress(ψ, Dcut, tol, max_sweeps) + end + + boundary_MPS[i] = ψ + end + boundary_MPS end \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index fce453a5..33e35eee 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -31,22 +31,22 @@ if CUDA.functional() && CUDA.has_cutensor() && false end push!(my_tests, - #"base.jl", - #"utils.jl", - #"contractions.jl", - #"compressions.jl", - #"ising.jl", - #"indexing.jl", - #"searchMPS.jl", - #"spectrum.jl", - #"graph.jl", + "base.jl", + "utils.jl", + "contractions.jl", + "compressions.jl", + "ising.jl", + "indexing.jl", + "searchMPS.jl", + "spectrum.jl", + "graph.jl", "PEPS.jl", - #"indexing.jl", - #"notation_tests.jl", - #"peps_tests.jl", - #"mps_tests.jl", - #"tests_full_graph.jl", - #"tests_on_data.jl" + "indexing.jl", + "notation_tests.jl", + "peps_tests.jl", + "mps_tests.jl", + "tests_full_graph.jl", + "tests_on_data.jl" ) for my_test in my_tests From f25152ff5f506961108b584e5e5c124c4fff4c5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Wed, 3 Feb 2021 11:35:26 +0100 Subject: [PATCH 022/110] replace MPS with boundaryMPS --- src/PEPS.jl | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 2d90f905..a48c0403 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -101,39 +101,15 @@ function MPS(::Type{T}, peps::PepsNetwork) where {T <: Number} end MPS(peps::PepsNetwork) = MPS(Float64, peps) -function MPS( - peps::PepsNetwork, - Dcut::Int, - tol::Number=1E-8, - max_sweeps=4) - - ψ = MPS(peps) - for i ∈ peps.i_max:-1:1 - R = PEPSRow(peps, i) - - W = MPO(R) - M = MPO(peps, i, i+1) - - ψ = W * (M * ψ) - - #todo: why tol > 0? - if tol > 0. && bond_dimension(ψ) > Dcut - ψ = compress(ψ, Dcut, tol, max_sweeps) - end - end - ψ -end - - function boundaryMPS( peps::PepsNetwork, Dcut::Int, tol::Number=1E-8, max_sweeps=4) - ψ = MPS(peps) boundary_MPS = Vector{MPS}(undef, peps.i_max) + ψ = MPS(peps) for i ∈ peps.i_max:-1:1 R = PEPSRow(peps, i) From 04751891881e6f9694f2cac46da70aea43eecd60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Wed, 3 Feb 2021 12:05:55 +0100 Subject: [PATCH 023/110] export boundaryMPS --- src/PEPS.jl | 3 +-- test/PEPS.jl | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index a48c0403..9df2adea 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -1,6 +1,5 @@ export PepsNetwork -export MPO, MPS -export make_lower_MPS +export MPO, MPS, boundaryMPS mutable struct PepsNetwork size::NTuple{2, Int} diff --git a/test/PEPS.jl b/test/PEPS.jl index beb652e9..cf5867dc 100644 --- a/test/PEPS.jl +++ b/test/PEPS.jl @@ -228,9 +228,7 @@ end peps = PepsNetwork(x, y, fg, β, origin) @test typeof(peps) == PepsNetwork - ψ = MPS(peps, Dcut, tol, max_sweeps) - @test typeof(ψ) == MPS{Float64} - for A ∈ ψ @test size(A, 2) == 1 end - @test bond_dimension(ψ) < Dcut + ψ = bondaryMPS(peps, Dcut, tol, max_sweeps) + @test typeof(ψ) == Vector{MPS} end end From 3495b0293c8ce377c6aa93f6d02f3d2d50887450 Mon Sep 17 00:00:00 2001 From: kdomino Date: Wed, 3 Feb 2021 12:23:45 +0100 Subject: [PATCH 024/110] start implementing peps --- src/peps_no_types.jl | 21 ++++++++++++++------- test/peps_tests.jl | 14 +++++++------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/peps_no_types.jl b/src/peps_no_types.jl index e54eb06d..c95d5ada 100644 --- a/src/peps_no_types.jl +++ b/src/peps_no_types.jl @@ -299,9 +299,8 @@ Returns vector{Int} indexing of the boundary region (dX) given a grid. id has diagonals, diagonal bounds on the grid are taken into account """ -function dX_inds(grid::Matrix{Int}, j::Int; has_diagonals::Bool = false) +function dX_inds(s::Int, j::Int; has_diagonals::Bool = false) last = j-1 - s = size(grid, 2) first = maximum([1, j - s]) if (has_diagonals & (j%s != 1)) first = maximum([1, j - s - 1]) @@ -360,20 +359,28 @@ function solve(g::MetaGraph, peps::PepsNetwork, no_sols::Int = 2; node_size::Tup gg = graph4peps(g, node_size, spectrum_cutoff = spectrum_cutoff) + max_sweeps=4 + + boundary_mps = boundaryMPS(peps, χ, threshold, max_sweeps) grid = props(gg)[:grid] partial_s = Partial_sol{T}[Partial_sol{T}()] - for row ∈ 1:size(grid,1) + for row ∈ 1:peps.i_max @info "row of peps = " row - #this may be cashed + lower_mps = make_lower_mps(gg, row + 1, β, χ, threshold) vec_of_T = [compute_single_tensor(gg, j, β) for j ∈ grid[row,:]] - for j ∈ grid[row,:] + peps_row = PEPSRow(peps, row) + + a = (row-1)*peps.j_max+1 + b = row*peps.j_max + #println([x for x in a:1:b] - grid[row,:]) + for j ∈ a:1:b - dX = dX_inds(grid, j) + dX = dX_inds(peps.j_max, j) partial_s_temp = Partial_sol{T}[] # TODO better compare energies, think it over @@ -392,7 +399,7 @@ function solve(g::MetaGraph, peps::PepsNetwork, no_sols::Int = 2; node_size::Tup end partial_s = select_best_solutions(partial_s_temp, no_sols) - if j == maximum(grid) + if j == peps.i_max*peps.j_max return return_solutions(partial_s, gg) end end diff --git a/test/peps_tests.jl b/test/peps_tests.jl index 7a94c991..d8299d31 100644 --- a/test/peps_tests.jl +++ b/test/peps_tests.jl @@ -194,9 +194,9 @@ end @testset "droplet hepers" begin grid = [1 2 3 4; 5 6 7 8; 9 10 11 12] - i = dX_inds(grid, 2) + i = dX_inds(size(grid, 2), 2) @test i == [1] - i = dX_inds(grid, 1) + i = dX_inds(size(grid, 2), 1) @test i == Int[] # 1 2 3 4 @@ -206,10 +206,10 @@ end # 9 10 11 12 # - i = dX_inds(grid, 7) + i = dX_inds(size(grid, 2), 7) @test i == [3, 4, 5, 6] - i = dX_inds(grid, 7; has_diagonals = true) + i = dX_inds(size(grid, 2), 7; has_diagonals = true) @test i == [2, 3, 4, 5, 6] @@ -218,16 +218,16 @@ end # <9> 10 11 12 # #both cases the same - i = dX_inds(grid, 9) + i = dX_inds(size(grid, 2), 9) @test i == [5,6,7,8] - i = dX_inds(grid, 9; has_diagonals = true) + i = dX_inds(size(grid, 2), 9; has_diagonals = true) @test i == [5,6,7,8] # other grid grid1 = [1 2; 3 4; 5 6; 7 8] - i = dX_inds(grid1, 5) + i = dX_inds(size(grid1, 2), 5) @test i == [3,4] a = Partial_sol{Float64}([1,1,1], 0.2) From 209b9c0570af58cf8529fa51efb559c502a29891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Wed, 3 Feb 2021 12:26:11 +0100 Subject: [PATCH 025/110] fix small bughs --- test/PEPS.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/PEPS.jl b/test/PEPS.jl index cf5867dc..5cf50db6 100644 --- a/test/PEPS.jl +++ b/test/PEPS.jl @@ -228,7 +228,7 @@ end peps = PepsNetwork(x, y, fg, β, origin) @test typeof(peps) == PepsNetwork - ψ = bondaryMPS(peps, Dcut, tol, max_sweeps) + ψ = boundaryMPS(peps, Dcut, tol, max_sweeps) @test typeof(ψ) == Vector{MPS} end end From 35fbbf9520888d9eca36a5130f777710432e6c6c Mon Sep 17 00:00:00 2001 From: kdomino Date: Wed, 3 Feb 2021 13:22:43 +0100 Subject: [PATCH 026/110] start writing down conditional probability --- benchmarks/indexing_example_short.jl | 1 + src/peps_no_types.jl | 48 +++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/benchmarks/indexing_example_short.jl b/benchmarks/indexing_example_short.jl index e0c246f5..c23aa8dd 100644 --- a/benchmarks/indexing_example_short.jl +++ b/benchmarks/indexing_example_short.jl @@ -119,6 +119,7 @@ end @test en == [0.73 -0.73; -0.73 0.73] @test p2 == [1.0 0.0; 0.0 1.0] end + r1, rn, r2 = projectors(fg, 2, 1) @test p1 == r2 @test p2 == r1 diff --git a/src/peps_no_types.jl b/src/peps_no_types.jl index c95d5ada..f9baf63b 100644 --- a/src/peps_no_types.jl +++ b/src/peps_no_types.jl @@ -270,6 +270,52 @@ function spin_index_from_left(gg::MetaGraph, ps::Partial_sol, j::Int) 1 end + +function conditional_probabs1(peps, ps::Partial_sol{T}, j::Int, boundary_mps, + peps_row) where T <: Real + + ng = peps.network_graph + fg = ng.factor_graph + + + left_p, _, _ = projectors(fg, j-1, j) + + k = j % peps.j_max + if k == 0 + k = peps.j_max + end + + if k == 1 + spins = 1 + else + spins = ps.spins[end] + end + + @reduce A[a, b, c, d] := sum(x) left_p[$spins, x] * peps_row[$k][x, a, b, c, d] + + + #= + upper_left, upper_right = spin_indices_from_above(gg, ps, j) + left_s = spin_index_from_left(gg, ps, j) + l = props(gg, j)[:column] + grid = props(gg)[:grid] + + upper_mpo = set_spins_from_above(vec_of_T, upper_right) + upper_mps = set_spin_from_letf(upper_mpo, left_s) + re = right_env(MPS(lower_mps[l:end]), upper_mps)[1] + + weight = ones(T, 1,1) + if l > 1 + Mat = [lower_mps[i][:,upper_left[i],:] for i ∈ 1:l-1] + weight = prod(Mat) + end + probs_unnormed = re*transpose(weight) + + probs_unnormed./sum(probs_unnormed) + =# + 0 +end + function conditional_probabs(gg::MetaGraph, ps::Partial_sol{T}, j::Int, lower_mps::AbstractMPS{T}, vec_of_T::Vector{Array{T,5}}) where T <: Real @@ -377,7 +423,6 @@ function solve(g::MetaGraph, peps::PepsNetwork, no_sols::Int = 2; node_size::Tup a = (row-1)*peps.j_max+1 b = row*peps.j_max - #println([x for x in a:1:b] - grid[row,:]) for j ∈ a:1:b dX = dX_inds(peps.j_max, j) @@ -387,6 +432,7 @@ function solve(g::MetaGraph, peps::PepsNetwork, no_sols::Int = 2; node_size::Tup partial_s = merge_dX(partial_s, dX, δH) for ps ∈ partial_s + _ = conditional_probabs1(peps, ps, j, boundary_mps[row], peps_row) objectives = conditional_probabs(gg, ps, j, lower_mps, vec_of_T) for l ∈ eachindex(objectives) From 8eeeff0a58efe48ac78762795aac93ea25d9ef5b Mon Sep 17 00:00:00 2001 From: kdomino Date: Wed, 3 Feb 2021 13:29:59 +0100 Subject: [PATCH 027/110] some corrections --- src/peps_no_types.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/peps_no_types.jl b/src/peps_no_types.jl index f9baf63b..85918712 100644 --- a/src/peps_no_types.jl +++ b/src/peps_no_types.jl @@ -274,6 +274,9 @@ end function conditional_probabs1(peps, ps::Partial_sol{T}, j::Int, boundary_mps, peps_row) where T <: Real + + println(j- length(ps.spins)) + ng = peps.network_graph fg = ng.factor_graph @@ -422,8 +425,9 @@ function solve(g::MetaGraph, peps::PepsNetwork, no_sols::Int = 2; node_size::Tup peps_row = PEPSRow(peps, row) a = (row-1)*peps.j_max+1 - b = row*peps.j_max - for j ∈ a:1:b + + for k ∈ 1:peps.j_max + j = a + k dX = dX_inds(peps.j_max, j) From 1b9d90404cc7f6d15af921cca7718e8b682ea7a0 Mon Sep 17 00:00:00 2001 From: kdomino Date: Wed, 3 Feb 2021 13:32:33 +0100 Subject: [PATCH 028/110] correction --- src/peps_no_types.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peps_no_types.jl b/src/peps_no_types.jl index 85918712..7c8ce788 100644 --- a/src/peps_no_types.jl +++ b/src/peps_no_types.jl @@ -424,7 +424,7 @@ function solve(g::MetaGraph, peps::PepsNetwork, no_sols::Int = 2; node_size::Tup peps_row = PEPSRow(peps, row) - a = (row-1)*peps.j_max+1 + a = (row-1)*peps.j_max for k ∈ 1:peps.j_max j = a + k From 9d01fa803be1b46dd676b6f7d3e064279e7ffe8e Mon Sep 17 00:00:00 2001 From: kdomino Date: Wed, 3 Feb 2021 13:34:52 +0100 Subject: [PATCH 029/110] another correction --- src/peps_no_types.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/peps_no_types.jl b/src/peps_no_types.jl index 7c8ce788..7709e695 100644 --- a/src/peps_no_types.jl +++ b/src/peps_no_types.jl @@ -271,11 +271,11 @@ function spin_index_from_left(gg::MetaGraph, ps::Partial_sol, j::Int) end -function conditional_probabs1(peps, ps::Partial_sol{T}, j::Int, boundary_mps, +function conditional_probabs1(peps, ps::Partial_sol{T}, boundary_mps, peps_row) where T <: Real - println(j- length(ps.spins)) + j = length(ps.spins) + 1 ng = peps.network_graph fg = ng.factor_graph @@ -436,7 +436,7 @@ function solve(g::MetaGraph, peps::PepsNetwork, no_sols::Int = 2; node_size::Tup partial_s = merge_dX(partial_s, dX, δH) for ps ∈ partial_s - _ = conditional_probabs1(peps, ps, j, boundary_mps[row], peps_row) + _ = conditional_probabs1(peps, ps, boundary_mps[row], peps_row) objectives = conditional_probabs(gg, ps, j, lower_mps, vec_of_T) for l ∈ eachindex(objectives) From badcd01a60b5a542835897dbf0f4d6ad70832bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Wed, 3 Feb 2021 14:08:13 +0100 Subject: [PATCH 030/110] change order MPS --- src/PEPS.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 9df2adea..c666320d 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -121,7 +121,7 @@ function boundaryMPS( ψ = compress(ψ, Dcut, tol, max_sweeps) end - boundary_MPS[i] = ψ + boundary_MPS[peps.i_max - i + 1] = ψ end boundary_MPS end \ No newline at end of file From ea74abef3421a852a2d7ab26b6128331eb32cfaa Mon Sep 17 00:00:00 2001 From: kdomino Date: Wed, 3 Feb 2021 14:15:19 +0100 Subject: [PATCH 031/110] correction --- src/peps_no_types.jl | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/peps_no_types.jl b/src/peps_no_types.jl index 7709e695..63284ee7 100644 --- a/src/peps_no_types.jl +++ b/src/peps_no_types.jl @@ -276,11 +276,9 @@ function conditional_probabs1(peps, ps::Partial_sol{T}, boundary_mps, j = length(ps.spins) + 1 - ng = peps.network_graph fg = ng.factor_graph - left_p, _, _ = projectors(fg, j-1, j) k = j % peps.j_max From e6fdc2ab828ed2771f7047345d558819b8631b9f Mon Sep 17 00:00:00 2001 From: kdomino Date: Wed, 3 Feb 2021 18:25:43 +0100 Subject: [PATCH 032/110] implementation of the probability computation, not tested yet --- src/peps_no_types.jl | 69 +++++++++++++++++++++++++++++++------------- test/peps_tests.jl | 4 ++- 2 files changed, 52 insertions(+), 21 deletions(-) diff --git a/src/peps_no_types.jl b/src/peps_no_types.jl index 63284ee7..e059ef93 100644 --- a/src/peps_no_types.jl +++ b/src/peps_no_types.jl @@ -271,50 +271,78 @@ function spin_index_from_left(gg::MetaGraph, ps::Partial_sol, j::Int) end -function conditional_probabs1(peps, ps::Partial_sol{T}, boundary_mps, - peps_row) where T <: Real +function set_mps_el_from_above(up_p::Array{T,2}, spins::Int64, mps_el::Array{T,3}) where T <: Real + @reduce B[a, b] := sum(x) up_p[$spins, x] * mps_el[a, x, b] + B +end + +function set_mpo_el_from_above(up_p::Array{T,2}, spins::Int64, mpo_el::Array{T,4}) where T <: Real + @reduce B[a, d, c] := sum(x) up_p[$spins, x] * mpo_el[a, x, c, d] + B +end + +function conditional_probabs1(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps::MPS{T}, + peps_row::PEPSRow{T}) where T <: Real j = length(ps.spins) + 1 ng = peps.network_graph fg = ng.factor_graph - left_p, _, _ = projectors(fg, j-1, j) k = j % peps.j_max if k == 0 k = peps.j_max end + # set from above left + # not in last row + if j > peps.j_max*(peps.i_max-1) + spins = [1 for _ in 1:k-1] + else + spins = [ps.spins[i] for i in j-k+1:j-1] + end + up_p = [projectors(fg, i, i+peps.j_max)[1] for i in j-k+1:j-1] + + BB = [set_mps_el_from_above(up_p[i], spins[i], boundary_mps[i]) for i in 1:k-1] + + weight = ones(T, 1,1) + if k > 1 + weight = prod(BB) + end + + # set form left if k == 1 spins = 1 else spins = ps.spins[end] end + left_p, _, _ = projectors(fg, j-1, j) + @reduce A[d, a, b, c] := sum(x) left_p[$spins, x] * peps_row[$k][x, a, b, c, d] + + r = j-k+peps.j_max + if j <= peps.j_max + spins = [1 for _ in j:r] + else + spins = [ps.spins[i-peps.j_max] for i in j:r] + end + up_p = [projectors(fg, i-peps.j_max, i)[1] for i in j:r] - @reduce A[a, b, c, d] := sum(x) left_p[$spins, x] * peps_row[$k][x, a, b, c, d] + mpo = MPO(peps_row)[k+1:end] + mpo = MPO(vcat([A], mpo)) + #println(length(spins) == length(up_p) == length(mpo)) - #= - upper_left, upper_right = spin_indices_from_above(gg, ps, j) - left_s = spin_index_from_left(gg, ps, j) - l = props(gg, j)[:column] - grid = props(gg)[:grid] + CC = [set_mpo_el_from_above(up_p[i], spins[i], mpo[i]) for i in 1:length(mpo)] - upper_mpo = set_spins_from_above(vec_of_T, upper_right) - upper_mps = set_spin_from_letf(upper_mpo, left_s) - re = right_env(MPS(lower_mps[l:end]), upper_mps)[1] + upper_mps = MPS(CC) - weight = ones(T, 1,1) - if l > 1 - Mat = [lower_mps[i][:,upper_left[i],:] for i ∈ 1:l-1] - weight = prod(Mat) - end + lower_mps = MPS(boundary_mps[k:end]) + + re = right_env(lower_mps, upper_mps)[1] probs_unnormed = re*transpose(weight) probs_unnormed./sum(probs_unnormed) - =# - 0 end function conditional_probabs(gg::MetaGraph, ps::Partial_sol{T}, j::Int, lower_mps::AbstractMPS{T}, @@ -434,7 +462,8 @@ function solve(g::MetaGraph, peps::PepsNetwork, no_sols::Int = 2; node_size::Tup partial_s = merge_dX(partial_s, dX, δH) for ps ∈ partial_s - _ = conditional_probabs1(peps, ps, boundary_mps[row], peps_row) + o1 = conditional_probabs1(peps, ps, boundary_mps[row], peps_row) + objectives = conditional_probabs(gg, ps, j, lower_mps, vec_of_T) for l ∈ eachindex(objectives) diff --git a/test/peps_tests.jl b/test/peps_tests.jl index d8299d31..5b2cd6b3 100644 --- a/test/peps_tests.jl +++ b/test/peps_tests.jl @@ -604,7 +604,8 @@ end end end - +# TODO chech different types of Float +#= @testset "test an exemple instance on Float32" begin δH = 1e-6 g = make_interactions_case2() @@ -643,3 +644,4 @@ end @test spins[i] == spins_l[i] end end +=# From e658cfa2ad3f12a17e555b3a8f190961eb794520 Mon Sep 17 00:00:00 2001 From: kdomino Date: Thu, 4 Feb 2021 10:30:35 +0100 Subject: [PATCH 033/110] correction --- src/peps_no_types.jl | 61 +++++++----- test/peps_tests.jl | 225 ++++++++++++++++++++++++------------------- test/runtests.jl | 24 ++--- 3 files changed, 177 insertions(+), 133 deletions(-) diff --git a/src/peps_no_types.jl b/src/peps_no_types.jl index e059ef93..76efe44c 100644 --- a/src/peps_no_types.jl +++ b/src/peps_no_types.jl @@ -271,17 +271,32 @@ function spin_index_from_left(gg::MetaGraph, ps::Partial_sol, j::Int) end -function set_mps_el_from_above(up_p::Array{T,2}, spins::Int64, mps_el::Array{T,3}) where T <: Real - @reduce B[a, b] := sum(x) up_p[$spins, x] * mps_el[a, x, b] +function project_spin_from_above(projector::Array{T,2}, spin::Int64, mps_el::Array{T,3}) where T <: Real + @reduce B[a, b] := sum(x) projector[$spin, x] * mps_el[a, x, b] B end -function set_mpo_el_from_above(up_p::Array{T,2}, spins::Int64, mpo_el::Array{T,4}) where T <: Real - @reduce B[a, d, c] := sum(x) up_p[$spins, x] * mpo_el[a, x, c, d] +function project_spin_from_above(projector::Array{T,2}, spin::Int64, mpo_el::Array{T,4}) where T <: Real + @reduce B[a, d, c] := sum(x) projector[$spin, x] * mpo_el[a, x, c, d] B end -function conditional_probabs1(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps::MPS{T}, + +""" +.... + + +b_m - boundary mps +p_r - peps row + + physical . + . upper_right + . | | + upper_left from_left-- p_r3 -- p_r4 -- 1 + | | | | +1 --b_m1 --b_m2 -- b_m -- b_m -- 1 +""" +function conditional_probabs(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps::MPS{T}, peps_row::PEPSRow{T}) where T <: Real @@ -295,16 +310,18 @@ function conditional_probabs1(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mp k = peps.j_max end - # set from above left + # set from above # not in last row if j > peps.j_max*(peps.i_max-1) - spins = [1 for _ in 1:k-1] + spin = [1 for _ in 1:k-1] else - spins = [ps.spins[i] for i in j-k+1:j-1] + spin = [ps.spins[i] for i in j-k+1:j-1] end - up_p = [projectors(fg, i, i+peps.j_max)[1] for i in j-k+1:j-1] - BB = [set_mps_el_from_above(up_p[i], spins[i], boundary_mps[i]) for i in 1:k-1] + proj_u = [projectors(fg, i, i+peps.j_max)[1] for i in j-k+1:j-1] + + + BB = [project_spin_from_above(proj_u[i], spin[i], boundary_mps[i]) for i in 1:k-1] weight = ones(T, 1,1) if k > 1 @@ -313,36 +330,36 @@ function conditional_probabs1(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mp # set form left if k == 1 - spins = 1 + spin = 1 else - spins = ps.spins[end] + spin = ps.spins[end] end - left_p, _, _ = projectors(fg, j-1, j) - @reduce A[d, a, b, c] := sum(x) left_p[$spins, x] * peps_row[$k][x, a, b, c, d] + proj_l, _, _ = projectors(fg, j-1, j) + @reduce A[d, a, b, c] := sum(x) proj_l[$spin, x] * peps_row[$k][x, a, b, c, d] r = j-k+peps.j_max if j <= peps.j_max - spins = [1 for _ in j:r] + spin = [1 for _ in j:r] else - spins = [ps.spins[i-peps.j_max] for i in j:r] + spin = [ps.spins[i-peps.j_max] for i in j:r] end - up_p = [projectors(fg, i-peps.j_max, i)[1] for i in j:r] + proj_u = [projectors(fg, i-peps.j_max, i)[1] for i in j:r] mpo = MPO(peps_row)[k+1:end] mpo = MPO(vcat([A], mpo)) - #println(length(spins) == length(up_p) == length(mpo)) - - CC = [set_mpo_el_from_above(up_p[i], spins[i], mpo[i]) for i in 1:length(mpo)] + CC = [project_spin_from_above(proj_u[i], spin[i], mpo[i]) for i in 1:length(mpo)] upper_mps = MPS(CC) lower_mps = MPS(boundary_mps[k:end]) re = right_env(lower_mps, upper_mps)[1] + #println(re) probs_unnormed = re*transpose(weight) - probs_unnormed./sum(probs_unnormed) + objective = probs_unnormed./sum(probs_unnormed) + dropdims(objective; dims = 2) end function conditional_probabs(gg::MetaGraph, ps::Partial_sol{T}, j::Int, lower_mps::AbstractMPS{T}, @@ -462,7 +479,7 @@ function solve(g::MetaGraph, peps::PepsNetwork, no_sols::Int = 2; node_size::Tup partial_s = merge_dX(partial_s, dX, δH) for ps ∈ partial_s - o1 = conditional_probabs1(peps, ps, boundary_mps[row], peps_row) + o1 = conditional_probabs(peps, ps, boundary_mps[row], peps_row) objectives = conditional_probabs(gg, ps, j, lower_mps, vec_of_T) diff --git a/test/peps_tests.jl b/test/peps_tests.jl index 5b2cd6b3..7b90cf5e 100644 --- a/test/peps_tests.jl +++ b/test/peps_tests.jl @@ -5,7 +5,6 @@ import SpinGlassPEPS: make_lower_mps, M2graph, graph4peps, fullM2grid! import SpinGlassPEPS: set_spin_from_letf, spin_index_from_left, spin_indices_from_above import SpinGlassPEPS: energy, solve import SpinGlassPEPS: dX_inds, merge_dX -import SpinGlassPEPS: reshape_row Random.seed!(1234) @@ -91,8 +90,7 @@ end M = ones(9,9) #this is grid of size 3x3 fullM2grid!(M, (3,3)) - display(M) - println() + # change it to Ising g = M2graph(M) @@ -132,29 +130,100 @@ end @test peps.size == (2,2) end +@testset "partial solution type" begin + ps = Partial_sol{Float64}() + @test ps.spins == [] + @test ps.objective == 1. + ps1 = Partial_sol{Float64}([1,1], 1.) + @test ps1.spins == [1,1] + @test ps1.objective == 1. -@testset "PEPS - axiliary functions" begin + ps2 = update_partial_solution(ps1, 2, 1.) + @test ps2.spins == [1,1,2] + @test ps2.objective == 1. - @testset "partial solution type" begin - ps = Partial_sol{Float64}() - @test ps.spins == [] - @test ps.objective == 1. + ps3 = Partial_sol{Float64}([1,1,1], .2) - ps1 = Partial_sol{Float64}([1,1], 1.) - @test ps1.spins == [1,1] - @test ps1.objective == 1. + b = select_best_solutions([ps3, ps2], 1) + @test b[1].spins == [1, 1, 2] + @test b[1].objective == 1. +end - ps2 = update_partial_solution(ps1, 2, 1.) - @test ps2.spins == [1,1,2] - @test ps2.objective == 1. - ps3 = Partial_sol{Float64}([1,1,1], .2) +@testset "droplet hepers" begin + + grid = [1 2 3 4; 5 6 7 8; 9 10 11 12] + i = dX_inds(size(grid, 2), 2) + @test i == [1] + i = dX_inds(size(grid, 2), 1) + @test i == Int[] + + # 1 2 3 4 + # ? | | + # 5 6 <7> 8 + # | | + # 9 10 11 12 + # + + i = dX_inds(size(grid, 2), 7) + @test i == [3, 4, 5, 6] + + i = dX_inds(size(grid, 2), 7; has_diagonals = true) + @test i == [2, 3, 4, 5, 6] + + + # 5 6 7 8 + # | | | | + # <9> 10 11 12 + # + #both cases the same + i = dX_inds(size(grid, 2), 9) + @test i == [5,6,7,8] + + i = dX_inds(size(grid, 2), 9; has_diagonals = true) + @test i == [5,6,7,8] + + # other grid + + grid1 = [1 2; 3 4; 5 6; 7 8] + i = dX_inds(size(grid1, 2), 5) + @test i == [3,4] + + a = Partial_sol{Float64}([1,1,1], 0.2) + b = Partial_sol{Float64}([2,1,1], 0.18) + c = Partial_sol{Float64}([1,1,2], 1.) + d = Partial_sol{Float64}([2,1,2], .1) + + vps = [a,b,c,d] + + boundary = [2,3] + + #ratio of objectives + + # 0.18/0.2 = 0.9 + # 0.1/1. = 0.1 + thershold = 0.15 + + ps1 = merge_dX(vps, boundary, thershold) + @test ps1 == [a,b,c] + + thershold = 0.95 + + ps1 = merge_dX(vps, boundary, thershold) + + @test ps1 == [a,c] + + thershold = 0. + + ps1 = merge_dX(vps, boundary, thershold) + @test ps1 == [a,b,c,d] +end + +#= +@testset "PEPS - axiliary functions" begin + - b = select_best_solutions([ps3, ps2], 1) - @test b[1].spins == [1, 1, 2] - @test b[1].objective == 1. - end @testset "functions of graph" begin @@ -191,76 +260,10 @@ end end - @testset "droplet hepers" begin - - grid = [1 2 3 4; 5 6 7 8; 9 10 11 12] - i = dX_inds(size(grid, 2), 2) - @test i == [1] - i = dX_inds(size(grid, 2), 1) - @test i == Int[] - - # 1 2 3 4 - # ? | | - # 5 6 <7> 8 - # | | - # 9 10 11 12 - # - - i = dX_inds(size(grid, 2), 7) - @test i == [3, 4, 5, 6] - - i = dX_inds(size(grid, 2), 7; has_diagonals = true) - @test i == [2, 3, 4, 5, 6] - - - # 5 6 7 8 - # | | | | - # <9> 10 11 12 - # - #both cases the same - i = dX_inds(size(grid, 2), 9) - @test i == [5,6,7,8] - i = dX_inds(size(grid, 2), 9; has_diagonals = true) - @test i == [5,6,7,8] - - # other grid - - grid1 = [1 2; 3 4; 5 6; 7 8] - i = dX_inds(size(grid1, 2), 5) - @test i == [3,4] - - a = Partial_sol{Float64}([1,1,1], 0.2) - b = Partial_sol{Float64}([2,1,1], 0.18) - c = Partial_sol{Float64}([1,1,2], 1.) - d = Partial_sol{Float64}([2,1,2], .1) - - vps = [a,b,c,d] - - boundary = [2,3] - - #ratio of objectives - - # 0.18/0.2 = 0.9 - # 0.1/1. = 0.1 - thershold = 0.15 - - ps1 = merge_dX(vps, boundary, thershold) - @test ps1 == [a,b,c] - - thershold = 0.95 - - ps1 = merge_dX(vps, boundary, thershold) - - @test ps1 == [a,c] - - thershold = 0. - - ps1 = merge_dX(vps, boundary, thershold) - @test ps1 == [a,b,c,d] - end end + ### creation a matrix of interactions step by step as an example Mq = ones(4,4) fullM2grid!(Mq, (2,2)) @@ -352,7 +355,7 @@ fullM2grid!(Mq, (2,2)) p = [2,3,1,4] @test vec(T1) ≈ vec(T2)[p] end - +=# Mq = zeros(9,9) Mq[1,1] = 1. @@ -377,7 +380,7 @@ Mq[6,9] = Mq[9,6] = -0.52 Mq[7,8] = Mq[8,7] = 0.5 Mq[8,9] = Mq[9,8] = -0.05 - +#= @testset "whole peps tensor" begin g = M2graph(Mq, -1) @@ -452,6 +455,7 @@ Mq[8,9] = Mq[9,8] = -0.05 println(size(vec(cc))) @test sum(cc) ≈ sum(B) end +=# # TODO this will be the ilustative step by step how does the probability computation work @@ -459,15 +463,8 @@ end #### conditional probability implementation - - mpo = MPO([ones(2,2,2,2), ones(2,2,2,2)]) - mps = set_spin_from_letf(mpo, 1) - @test mps[1] == ones(2,2,2) - @test mps[2] == 2*ones(2,2,2) - β = 3. g = M2graph(Mq, -1) - gg = graph4peps(g, (1,1)) fg = factor_graph( g, @@ -478,15 +475,45 @@ end origin = :NW peps = PepsNetwork(3, 3, fg, β, origin) + + mpo1 = MPO(PEPSRow(peps, 1)) mpo2 = MPO(PEPSRow(peps, 2)) mpo3 = MPO(PEPSRow(peps, 3)) + boundary_mps = boundaryMPS(peps, 10, 0., 4) + + println("....") + println(dot(mpo1, boundary_mps[1])) + println("....") + + ps = Partial_sol{Float64}(Int[], 0.) + + println("probs") + ng = peps.network_graph + fg = ng.factor_graph + + obj = conditional_probabs(peps, ps, boundary_mps[1], PEPSRow(peps, 1)) + println("..............") + + _, i = findmax(obj) + @test (props(fg, 1)[:spectrum]).states[i] == [1] + println(i) + ps1 = update_partial_solution(ps, i, obj[i]) + println(ps1) + obj1 = conditional_probabs(peps, ps1, boundary_mps[1], PEPSRow(peps, 1)) + println(obj[i].*obj1) + _, j = findmax(obj[i].*obj1) + println(j) + println((props(fg, 2)[:spectrum]).states[j]) + + gg = graph4peps(g, (1,1)) M = form_peps(gg, β) #TODO make something with dimensionality cc = contract3x3by_ncon(M) su = sum(cc) - + p1 = sum(cc[1,:,:,:,:,:,:,:,:])/su + p2 = sum(cc[2,:,:,:,:,:,:,:,:])/su # first row A = M[1,:] @@ -499,7 +526,7 @@ end #AA = MPO(peps, 1, false) - println(size(A[1])) + #println(size(A[1])) #println(size(AA[1])) # marginal prob @@ -507,7 +534,7 @@ end j = 1 objective = conditional_probabs(gg, sol, j, lower_mps, A) println(objective) - + println(props(gg, 1)[:spectrum]) #objective1 = conditional_probabs(gg, sol, j, l_mps, AA) #println(objective1) @@ -525,7 +552,7 @@ end p12 = sum(cc[1,2,:,:,:,:,:,:,:])/su # approx due to numerical accuracy @test objective ≈ [p11/p1, p12/p1] - + println([p11/p1, p12/p1]) j = 5 row = 2 lower_mps = make_lower_mps(gg, row+1, β, 10, 0.) diff --git a/test/runtests.jl b/test/runtests.jl index c1b8e5f1..b80f6aed 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -24,18 +24,18 @@ if CUDA.functional() && CUDA.has_cutensor() && false end push!(my_tests, - "base.jl", - "utils.jl", - "contractions.jl", - "compressions.jl", - "ising.jl", - "indexing.jl", - "searchMPS.jl", - "spectrum.jl", - "graph.jl", - "PEPS.jl", - "indexing.jl", - "notation_tests.jl", + #"base.jl", + #"utils.jl", + #"contractions.jl", + #"compressions.jl", + #"ising.jl", + #"indexing.jl", + #"searchMPS.jl", + #"spectrum.jl", + #"graph.jl", + #"PEPS.jl", + #"indexing.jl", + #"notation_tests.jl", "peps_tests.jl", "mps_tests.jl", "tests_full_graph.jl", From afe887e1cde84d663c4a895c419ec87ee4832b06 Mon Sep 17 00:00:00 2001 From: kdomino Date: Thu, 4 Feb 2021 12:57:34 +0100 Subject: [PATCH 034/110] some tests on pepsrow --- src/peps_no_types.jl | 8 ++- test/peps_tests.jl | 126 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 109 insertions(+), 25 deletions(-) diff --git a/src/peps_no_types.jl b/src/peps_no_types.jl index 76efe44c..f0f27e3e 100644 --- a/src/peps_no_types.jl +++ b/src/peps_no_types.jl @@ -334,6 +334,7 @@ function conditional_probabs(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps else spin = ps.spins[end] end + proj_l, _, _ = projectors(fg, j-1, j) @reduce A[d, a, b, c] := sum(x) proj_l[$spin, x] * peps_row[$k][x, a, b, c, d] @@ -343,11 +344,13 @@ function conditional_probabs(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps else spin = [ps.spins[i-peps.j_max] for i in j:r] end + proj_u = [projectors(fg, i-peps.j_max, i)[1] for i in j:r] mpo = MPO(peps_row)[k+1:end] mpo = MPO(vcat([A], mpo)) + CC = [project_spin_from_above(proj_u[i], spin[i], mpo[i]) for i in 1:length(mpo)] upper_mps = MPS(CC) @@ -355,10 +358,11 @@ function conditional_probabs(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps lower_mps = MPS(boundary_mps[k:end]) re = right_env(lower_mps, upper_mps)[1] - #println(re) + probs_unnormed = re*transpose(weight) objective = probs_unnormed./sum(probs_unnormed) + dropdims(objective; dims = 2) end @@ -372,6 +376,8 @@ function conditional_probabs(gg::MetaGraph, ps::Partial_sol{T}, j::Int, lower_mp upper_mpo = set_spins_from_above(vec_of_T, upper_right) upper_mps = set_spin_from_letf(upper_mpo, left_s) + + re = right_env(MPS(lower_mps[l:end]), upper_mps)[1] weight = ones(T, 1,1) diff --git a/test/peps_tests.jl b/test/peps_tests.jl index 7b90cf5e..963459f4 100644 --- a/test/peps_tests.jl +++ b/test/peps_tests.jl @@ -459,6 +459,44 @@ end # TODO this will be the ilustative step by step how does the probability computation work +@testset "peps row" begin + + g = M2graph(Mq, -1) + β = 3. + + fg = factor_graph( + g, + energy=energy, + spectrum=full_spectrum, + ) + + origin = :NW + + peps = PepsNetwork(3,3, fg, β, origin) + + println("particular tensors") + println("node 1 ....") + display(PEPSRow(peps, 1)[1]) + println() + println("node 2 .....") + display(PEPSRow(peps, 1)[2]) + println() + println("node 3 .....") + display(PEPSRow(peps, 1)[3]) + println() + println("node 4 ......") + display(PEPSRow(peps, 2)[1]) + println() + println("node 5 .......") + display(PEPSRow(peps, 2)[2]) + println() + println("node 6........") + display(PEPSRow(peps, 2)[3]) + + +end + +#= @testset "testing marginal/conditional probabilities" begin #### conditional probability implementation @@ -466,6 +504,16 @@ end β = 3. g = M2graph(Mq, -1) + bf = brute_force(g; num_states = 1) + println(bf.states) + + rule = Dict{Any,Any}(1 => 1, 2 => 1, 4 => 1, 5 => 1, 3=>2, 6 => 2, 7 => 3, 8 => 3, 9 => 4) + + update_cells!( + g, + rule = rule, + ) + fg = factor_graph( g, energy=energy, @@ -474,37 +522,64 @@ end origin = :NW - peps = PepsNetwork(3, 3, fg, β, origin) + peps = PepsNetwork(2,2, fg, β, origin) - mpo1 = MPO(PEPSRow(peps, 1)) - mpo2 = MPO(PEPSRow(peps, 2)) - mpo3 = MPO(PEPSRow(peps, 3)) + Dcut = 4 + tol = 0. + swep = 4 + boundary_mps = boundaryMPS(peps, Dcut, tol, swep) - boundary_mps = boundaryMPS(peps, 10, 0., 4) + ps1 = Partial_sol{Float64}(Int[], 0.) - println("....") - println(dot(mpo1, boundary_mps[1])) - println("....") + obj1 = conditional_probabs(peps, ps1, boundary_mps[1], PEPSRow(peps, 1)) + _, i = findmax(obj1) + @test (props(fg, 1)[:spectrum]).states[i] == [bf.states[1][a] for a in [1,2,4,5]] - ps = Partial_sol{Float64}(Int[], 0.) + ps2 = update_partial_solution(ps1, i, obj1[i]) + obj2 = conditional_probabs(peps, ps2, boundary_mps[1], PEPSRow(peps, 1)) + obj2 = obj1[i].*obj2 - println("probs") - ng = peps.network_graph - fg = ng.factor_graph + _, j = findmax(obj2) + @test (props(fg, 2)[:spectrum]).states[j] == [bf.states[1][a] for a in [3,6]] - obj = conditional_probabs(peps, ps, boundary_mps[1], PEPSRow(peps, 1)) - println("..............") + ps3 = update_partial_solution(ps2, j, obj2[j]) + println(ps3) + obj3 = conditional_probabs(peps, ps3, boundary_mps[2], PEPSRow(peps, 2)) - _, i = findmax(obj) - @test (props(fg, 1)[:spectrum]).states[i] == [1] - println(i) - ps1 = update_partial_solution(ps, i, obj[i]) - println(ps1) - obj1 = conditional_probabs(peps, ps1, boundary_mps[1], PEPSRow(peps, 1)) - println(obj[i].*obj1) - _, j = findmax(obj[i].*obj1) - println(j) - println((props(fg, 2)[:spectrum]).states[j]) + println(obj3) + obj3 = obj3[j].*obj3 + println(obj3) + + _, k = findmax(obj3) + + println(k) + + println((props(fg, 3)[:spectrum]).states) + #@test (props(fg, 3)[:spectrum]).states[k] == [bf.states[1][a] for a in [7,8]] + + g = M2graph(Mq, -1) + + fg = factor_graph( + g, + energy=energy, + spectrum=full_spectrum, + ) + + origin = :NW + + peps = PepsNetwork(3,3, fg, β, origin) + + println("............") + display(PEPSRow(peps, 1)[1]) + println("........") + display(PEPSRow(peps, 1)[2]) + println("............") + + @test 1 == 2 + + mpo1 = MPO(PEPSRow(peps, 1)) + mpo2 = MPO(PEPSRow(peps, 2)) + mpo3 = MPO(PEPSRow(peps, 3)) gg = graph4peps(g, (1,1)) M = form_peps(gg, β) @@ -553,6 +628,8 @@ end # approx due to numerical accuracy @test objective ≈ [p11/p1, p12/p1] println([p11/p1, p12/p1]) + + println(props(gg, 2)[:spectrum]) j = 5 row = 2 lower_mps = make_lower_mps(gg, row+1, β, 10, 0.) @@ -672,3 +749,4 @@ end end end =# +=# From 5159a132008f5cad2b98566037687f3c1f57c810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Thu, 4 Feb 2021 14:54:05 +0100 Subject: [PATCH 035/110] add contract --- src/PEPS.jl | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index c666320d..7182b52c 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -124,4 +124,33 @@ function boundaryMPS( boundary_MPS[peps.i_max - i + 1] = ψ end boundary_MPS -end \ No newline at end of file +end + +function contract(peps::PepsNetwork, config::Dict{Int, Int}, args::Dict=Dict()) + ψ = MPS(peps) + + for i ∈ peps.i_max:-1:1 + R = PEPSRow(peps, i) + ψ = MPO(typeof(ψ), peps.j_max) + + for (j, A) ∈ enumerate(R) + v = j + peps.j_max * (i - 1) + + if haskey(config, v) + @cast B[l, u, r, d] |= A[l, u, r, d, config[v]] + else + @reduce B[l, u, r, d] |= sum(σ) A[l, u, r, d, σ] + end + ψ[j] = B + end + + M = MPO(peps, i, i+1) + ψ = W * (M * ψ) + + if bond_dimension(ψ) > Dcut + ψ = compress(ψ, args...) + end + end + prod(ψ)[] +end + From 76f116536edfe8cad1216f44d32ad41ca5292d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Thu, 4 Feb 2021 14:54:58 +0100 Subject: [PATCH 036/110] fix a small --- src/PEPS.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 7182b52c..98bcc1c7 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -1,5 +1,6 @@ export PepsNetwork -export MPO, MPS, boundaryMPS +export MPO, MPS +export boundaryMPS, contract mutable struct PepsNetwork size::NTuple{2, Int} From 6607c1f96cb899de1704a76ab6bdb884900c4634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Thu, 4 Feb 2021 15:06:15 +0100 Subject: [PATCH 037/110] use nothing in contract --- src/PEPS.jl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 98bcc1c7..b1e0744d 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -135,10 +135,9 @@ function contract(peps::PepsNetwork, config::Dict{Int, Int}, args::Dict=Dict()) ψ = MPO(typeof(ψ), peps.j_max) for (j, A) ∈ enumerate(R) - v = j + peps.j_max * (i - 1) - - if haskey(config, v) - @cast B[l, u, r, d] |= A[l, u, r, d, config[v]] + v = get(config, j + peps.j_max * (i - 1), nothing) + if v !== nothing + @cast B[l, u, r, d] |= A[l, u, r, d, v] else @reduce B[l, u, r, d] |= sum(σ) A[l, u, r, d, σ] end From 5453cd5ececebeed4bcb9c79014ac1950612dab4 Mon Sep 17 00:00:00 2001 From: kdomino Date: Thu, 4 Feb 2021 15:07:05 +0100 Subject: [PATCH 038/110] correction --- test/peps_tests.jl | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/test/peps_tests.jl b/test/peps_tests.jl index 963459f4..1844ce86 100644 --- a/test/peps_tests.jl +++ b/test/peps_tests.jl @@ -61,7 +61,7 @@ Random.seed!(1234) D = props(fg, 1)[:cluster].vertices - println(sort([v for v in values(D)]) == [1,2,3,4]) + @test sort([v for v in values(D)]) == [1,2,3,4] nodes = [e for e in keys(D)] @test sort(nodes) == sort(vec(ns[1:2, 1:2])) @@ -459,6 +459,7 @@ end # TODO this will be the ilustative step by step how does the probability computation work +#= @testset "peps row" begin g = M2graph(Mq, -1) @@ -476,27 +477,27 @@ end println("particular tensors") println("node 1 ....") - display(PEPSRow(peps, 1)[1]) + display(reshape(PEPSRow(peps, 1)[1], (4, 2))) println() println("node 2 .....") - display(PEPSRow(peps, 1)[2]) + display(reshape(PEPSRow(peps, 1)[2], (8, 2))) println() println("node 3 .....") - display(PEPSRow(peps, 1)[3]) + display(reshape(PEPSRow(peps, 1)[3], (4, 2))) println() println("node 4 ......") - display(PEPSRow(peps, 2)[1]) + display(reshape(PEPSRow(peps, 2)[1], (8,2))) println() println("node 5 .......") - display(PEPSRow(peps, 2)[2]) + display(reshape(PEPSRow(peps, 2)[2], (16,2))) println() println("node 6........") - display(PEPSRow(peps, 2)[3]) + display(reshape(PEPSRow(peps, 2)[3], (8,2))) end +=# -#= @testset "testing marginal/conditional probabilities" begin #### conditional probability implementation @@ -517,14 +518,14 @@ end fg = factor_graph( g, energy=energy, - spectrum=full_spectrum, + spectrum=brute_force, ) origin = :NW peps = PepsNetwork(2,2, fg, β, origin) - Dcut = 4 + Dcut = 8 tol = 0. swep = 4 boundary_mps = boundaryMPS(peps, Dcut, tol, swep) @@ -554,6 +555,9 @@ end println(k) + display(reshape(PEPSRow(peps, 2)[1], (4,2,4))) + println() + println((props(fg, 3)[:spectrum]).states) #@test (props(fg, 3)[:spectrum]).states[k] == [bf.states[1][a] for a in [7,8]] @@ -569,14 +573,6 @@ end peps = PepsNetwork(3,3, fg, β, origin) - println("............") - display(PEPSRow(peps, 1)[1]) - println("........") - display(PEPSRow(peps, 1)[2]) - println("............") - - @test 1 == 2 - mpo1 = MPO(PEPSRow(peps, 1)) mpo2 = MPO(PEPSRow(peps, 2)) mpo3 = MPO(PEPSRow(peps, 3)) @@ -707,7 +703,7 @@ end @test spins[i] == spins_s[i] end end - +#= # TODO chech different types of Float #= @testset "test an exemple instance on Float32" begin From ac09e4f7f5742f08e56a3b8c52219b702560bba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Thu, 4 Feb 2021 15:09:17 +0100 Subject: [PATCH 039/110] fix a bug in contract --- src/PEPS.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index b1e0744d..eec806d6 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -131,13 +131,13 @@ function contract(peps::PepsNetwork, config::Dict{Int, Int}, args::Dict=Dict()) ψ = MPS(peps) for i ∈ peps.i_max:-1:1 - R = PEPSRow(peps, i) + row = PEPSRow(peps, i) ψ = MPO(typeof(ψ), peps.j_max) - for (j, A) ∈ enumerate(R) + for (j, A) ∈ enumerate(row) v = get(config, j + peps.j_max * (i - 1), nothing) if v !== nothing - @cast B[l, u, r, d] |= A[l, u, r, d, v] + @cast B[l, u, r, d] |= A[l, u, r, d, $(v)] else @reduce B[l, u, r, d] |= sum(σ) A[l, u, r, d, σ] end From 3726e5e50ceff785d47009493191b1df19fb6963 Mon Sep 17 00:00:00 2001 From: kdomino Date: Thu, 4 Feb 2021 15:18:36 +0100 Subject: [PATCH 040/110] merge --- src/PEPS.jl | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 98bcc1c7..179a2f24 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -49,7 +49,7 @@ function PEPSRow(::Type{T}, peps::PepsNetwork, i::Int) where {T <: Number} for j ∈ 2:n ten = generate_tensor(peps, (i, j-1), (i, j)) A = ψ[j] - @tensor B[l, u, r, d, σ] := ten[l, l̃] * A[l̃, u, r, d, σ] + @tensor B[l, u, r, d, σ] := ten[l, l̃] * A[l̃, u, r, d, σ] ψ[j] = B end ψ @@ -75,7 +75,7 @@ function MPO(::Type{T}, peps::PepsNetwork, i::Int, k::Int) where {T <: Number} en = ones(1, 1) end - @cast A[_, u, _, d] |= exp(-ng.β * en[u, d]) + @cast A[_, u, _, d] |= exp(-ng.β * en[u, d]) ψ[j] = A end ψ @@ -86,8 +86,8 @@ function _MPS(::Type{T}, peps::PepsNetwork) where {T <: Number} W = MPO(PEPSRow(peps, peps.i_max)) ψ = MPS(T, length(W)) - for (i, O) ∈ enumerate(W) - ψ[i] = dropdims(O, dims=4) + for (i, O) ∈ enumerate(W) + ψ[i] = dropdims(O, dims=4) end ψ end @@ -95,7 +95,7 @@ end function MPS(::Type{T}, peps::PepsNetwork) where {T <: Number} ψ = MPS(T, peps.j_max) for i ∈ 1:length(ψ) - ψ[i] = ones(1, 1, 1) + ψ[i] = ones(1, 1, 1) end ψ end @@ -103,7 +103,7 @@ MPS(peps::PepsNetwork) = MPS(Float64, peps) function boundaryMPS( peps::PepsNetwork, - Dcut::Int, + Dcut::Int, tol::Number=1E-8, max_sweeps=4) @@ -112,12 +112,12 @@ function boundaryMPS( ψ = MPS(peps) for i ∈ peps.i_max:-1:1 R = PEPSRow(peps, i) - + W = MPO(R) M = MPO(peps, i, i+1) ψ = W * (M * ψ) - + if bond_dimension(ψ) > Dcut ψ = compress(ψ, Dcut, tol, max_sweeps) end @@ -131,10 +131,10 @@ function contract(peps::PepsNetwork, config::Dict{Int, Int}, args::Dict=Dict()) ψ = MPS(peps) for i ∈ peps.i_max:-1:1 - R = PEPSRow(peps, i) + R = PEPSRow(peps, i) ψ = MPO(typeof(ψ), peps.j_max) - for (j, A) ∈ enumerate(R) + for (j, A) ∈ enumerate(R) v = j + peps.j_max * (i - 1) if haskey(config, v) @@ -147,11 +147,10 @@ function contract(peps::PepsNetwork, config::Dict{Int, Int}, args::Dict=Dict()) M = MPO(peps, i, i+1) ψ = W * (M * ψ) - + if bond_dimension(ψ) > Dcut ψ = compress(ψ, args...) end end prod(ψ)[] end - From 5e1187261ac6c4a33a0503335b5d28c76e8ff7e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Thu, 4 Feb 2021 16:04:13 +0100 Subject: [PATCH 041/110] add contract.jl and fix bug in contract function --- src/PEPS.jl | 22 ++++++++++++++++------ test/contract.jl | 39 +++++++++++++++++++++++++++++++++++++++ test/runtests.jl | 33 +++++++++++++++++---------------- 3 files changed, 72 insertions(+), 22 deletions(-) create mode 100644 test/contract.jl diff --git a/src/PEPS.jl b/src/PEPS.jl index eec806d6..12f6abf7 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -1,6 +1,6 @@ export PepsNetwork export MPO, MPS -export boundaryMPS, contract +export boundaryMPS, peps_contract mutable struct PepsNetwork size::NTuple{2, Int} @@ -127,12 +127,19 @@ function boundaryMPS( boundary_MPS end -function contract(peps::PepsNetwork, config::Dict{Int, Int}, args::Dict=Dict()) +function peps_contract( + peps::PepsNetwork, + config::Dict{Int, Int} = Dict(), + Dcut::Int=typemax(Int), + tol::Number=1E-8, + max_sweeps=4, + ) + ψ = MPS(peps) for i ∈ peps.i_max:-1:1 row = PEPSRow(peps, i) - ψ = MPO(typeof(ψ), peps.j_max) + W = MPO(eltype(ψ), peps.j_max) for (j, A) ∈ enumerate(row) v = get(config, j + peps.j_max * (i - 1), nothing) @@ -141,16 +148,19 @@ function contract(peps::PepsNetwork, config::Dict{Int, Int}, args::Dict=Dict()) else @reduce B[l, u, r, d] |= sum(σ) A[l, u, r, d, σ] end - ψ[j] = B + W[j] = B end M = MPO(peps, i, i+1) ψ = W * (M * ψ) if bond_dimension(ψ) > Dcut - ψ = compress(ψ, args...) + ψ = compress(ψ, Dcut, tol, max_sweeps) end end - prod(ψ)[] + + Z = [] + for A ∈ ψ push!(Z, dropdims(A, dims=2)) end + prod(Z)[] end diff --git a/test/contract.jl b/test/contract.jl new file mode 100644 index 00000000..9a8ed4c5 --- /dev/null +++ b/test/contract.jl @@ -0,0 +1,39 @@ +@testset "contract correctly collapse the peps network" begin + + # Grid + # A1 | A2 + # | + # 1 -- 2 -|- 3 + + D = Dict((1, 2) => -0.9049, + (2, 3) => 0.2838, + (3, 3) => -0.7928, + (2, 2) => 0.1208, + (1, 1) => -0.3342 + ) + + m, n, t = 1, 2, 2 + L = 3 + β = 2. + + ig = ising_graph(D, L) + + update_cells!( + ig, + rule = Dict(1 => 1, 2 => 1, 3 => 2), + ) + + fg = factor_graph( + ig, + Dict(1 => 4, 2 => 2), + energy = energy, + spectrum = brute_force, + ) + + config = Dict(1 => 2, 2 => 1) + + for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) + peps = PepsNetwork(m, n, fg, β, origin) + p = peps_contract(peps, config) + end +end \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index 33e35eee..6728649f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -31,22 +31,23 @@ if CUDA.functional() && CUDA.has_cutensor() && false end push!(my_tests, - "base.jl", - "utils.jl", - "contractions.jl", - "compressions.jl", - "ising.jl", - "indexing.jl", - "searchMPS.jl", - "spectrum.jl", - "graph.jl", - "PEPS.jl", - "indexing.jl", - "notation_tests.jl", - "peps_tests.jl", - "mps_tests.jl", - "tests_full_graph.jl", - "tests_on_data.jl" + #"base.jl", + #"utils.jl", + #"contractions.jl", + #"compressions.jl", + #"ising.jl", + #"indexing.jl", + #"searchMPS.jl", + #"spectrum.jl", + #"graph.jl", + #"PEPS.jl", + "contract.jl", + #"indexing.jl", + #"notation_tests.jl", + #"peps_tests.jl", + #"mps_tests.jl", + #"tests_full_graph.jl", + #"tests_on_data.jl" ) for my_test in my_tests From 08f6f3071d6f2e247e048d2e28a9ae326acbd9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Thu, 4 Feb 2021 20:58:28 +0100 Subject: [PATCH 042/110] fix a critical bug in MPO --- src/PEPS.jl | 54 +++++++++++++++++++++++++++++++++--------------- test/contract.jl | 43 ++++++++++++++++++++++++++++---------- test/runtests.jl | 32 ++++++++++++++-------------- 3 files changed, 85 insertions(+), 44 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 12f6abf7..eaafb115 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -72,7 +72,7 @@ function MPO(::Type{T}, peps::PepsNetwork, i::Int, k::Int) where {T <: Number} _, en, _ = get_prop(fg, w, v, :split) en = en' else - en = ones(1, 1) + en = zeros(1, 1) end @cast A[_, u, _, d] |= exp(-ng.β * en[u, d]) @@ -127,33 +127,53 @@ function boundaryMPS( boundary_MPS end +function MPO( + ::Type{T}, + peps::PepsNetwork, + i::Int, + config::Dict{Int, Int} = Dict{Int, Int}() + ) where {T <: Number} + + W = MPO(T, peps.j_max) + + for (j, A) ∈ enumerate(PEPSRow(peps, i)) + ij = j + peps.j_max * (i - 1) + v = get(config, ij, nothing) + + if v !== nothing + @cast B[l, u, r, d] |= A[l, u, r, d, $(v)] + else + @reduce B[l, u, r, d] |= sum(σ) A[l, u, r, d, σ] + end + W[j] = B + end + W +end +MPO( + peps::PepsNetwork, + i::Int, + config::Dict{Int, Int} = Dict{Int, Int}() + ) = MPO(Float64, peps, i, config) + function peps_contract( peps::PepsNetwork, - config::Dict{Int, Int} = Dict(), + config::Dict{Int, Int} = Dict{Int, Int}(), Dcut::Int=typemax(Int), tol::Number=1E-8, max_sweeps=4, ) ψ = MPS(peps) + T = eltype(ψ) for i ∈ peps.i_max:-1:1 - row = PEPSRow(peps, i) - W = MPO(eltype(ψ), peps.j_max) - - for (j, A) ∈ enumerate(row) - v = get(config, j + peps.j_max * (i - 1), nothing) - if v !== nothing - @cast B[l, u, r, d] |= A[l, u, r, d, $(v)] - else - @reduce B[l, u, r, d] |= sum(σ) A[l, u, r, d, σ] - end - W[j] = B - end - - M = MPO(peps, i, i+1) + println(i) + W = MPO(T, peps, i, config) + M = MPO(T, peps, i, i+1) + ψ = W * (M * ψ) - + #ψ = W * ψ + if bond_dimension(ψ) > Dcut ψ = compress(ψ, Dcut, tol, max_sweeps) end diff --git a/test/contract.jl b/test/contract.jl index 9a8ed4c5..d2f93eab 100644 --- a/test/contract.jl +++ b/test/contract.jl @@ -1,20 +1,21 @@ -@testset "contract correctly collapse the peps network" begin +@testset "peps_contract correctly collapse the peps network" begin # Grid # A1 | A2 # | # 1 -- 2 -|- 3 - D = Dict((1, 2) => -0.9049, - (2, 3) => 0.2838, - (3, 3) => -0.7928, - (2, 2) => 0.1208, - (1, 1) => -0.3342 + D = Dict((1, 2) => 0., #-0.9049, + (2, 3) => 0., # 0.2838, + + (3, 3) => 0., #-0.7928, + (2, 2) => 0., # 0.1208, + (1, 1) => 0., #-0.3342 ) - m, n, t = 1, 2, 2 + m, n = 1, 2 L = 3 - β = 2. + β = 1. ig = ising_graph(D, L) @@ -30,10 +31,30 @@ spectrum = brute_force, ) - config = Dict(1 => 2, 2 => 1) + config = Dict{Int, Int}() #Dict(1 => 2, 2 => 1) - for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) + Z = [] + for origin ∈ (:NW,)# :SW, :WS, :WN, :NE, :EN, :SE, :ES) peps = PepsNetwork(m, n, fg, β, origin) - p = peps_contract(peps, config) + + #= + ψ = MPO(PEPSRow(peps, 1)) + ZZ = [] + for A ∈ ψ push!(ZZ, dropdims(A, dims=(2, 4))) end + Z = prod(ZZ)[] + =# + + push!(Z, peps_contract(peps, config)) end + + println(Z) + + if isempty(config) + states = collect.(all_states(rank_vec(ig))) + ρ = exp.(-β .* energy.(states, Ref(ig))) + ZZ = sum(ρ) + println(ZZ) + end + + #@test all(x -> x == first(Z), Z) end \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index 6728649f..4f5c5a40 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -31,23 +31,23 @@ if CUDA.functional() && CUDA.has_cutensor() && false end push!(my_tests, - #"base.jl", - #"utils.jl", - #"contractions.jl", - #"compressions.jl", - #"ising.jl", - #"indexing.jl", - #"searchMPS.jl", - #"spectrum.jl", - #"graph.jl", - #"PEPS.jl", + "base.jl", + "utils.jl", + "contractions.jl", + "compressions.jl", + "ising.jl", + "indexing.jl", + "searchMPS.jl", + "spectrum.jl", + "graph.jl", + "PEPS.jl", "contract.jl", - #"indexing.jl", - #"notation_tests.jl", - #"peps_tests.jl", - #"mps_tests.jl", - #"tests_full_graph.jl", - #"tests_on_data.jl" + "indexing.jl", + "notation_tests.jl", + "peps_tests.jl", + "mps_tests.jl", + "tests_full_graph.jl", + "tests_on_data.jl" ) for my_test in my_tests From bb6bcb215951c3c6b9c03b13a71f588092e841d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Thu, 4 Feb 2021 22:07:50 +0100 Subject: [PATCH 043/110] add use case for Krzysiek --- src/PEPS.jl | 1 - test/contract.jl | 29 ++++++++++------------------- test/runtests.jl | 32 ++++++++++++++++---------------- 3 files changed, 26 insertions(+), 36 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index eaafb115..e45128fe 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -167,7 +167,6 @@ function peps_contract( T = eltype(ψ) for i ∈ peps.i_max:-1:1 - println(i) W = MPO(T, peps, i, config) M = MPO(T, peps, i, i+1) diff --git a/test/contract.jl b/test/contract.jl index d2f93eab..a24e160b 100644 --- a/test/contract.jl +++ b/test/contract.jl @@ -5,12 +5,12 @@ # | # 1 -- 2 -|- 3 - D = Dict((1, 2) => 0., #-0.9049, - (2, 3) => 0., # 0.2838, + D = Dict((1, 2) => -0.9049, + (2, 3) => 0.2838, - (3, 3) => 0., #-0.7928, - (2, 2) => 0., # 0.1208, - (1, 1) => 0., #-0.3342 + (3, 3) => -0.7928, + (2, 2) => 0.1208, + (1, 1) => -0.3342 ) m, n = 1, 2 @@ -34,27 +34,18 @@ config = Dict{Int, Int}() #Dict(1 => 2, 2 => 1) Z = [] - for origin ∈ (:NW,)# :SW, :WS, :WN, :NE, :EN, :SE, :ES) + for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) peps = PepsNetwork(m, n, fg, β, origin) - - #= - ψ = MPO(PEPSRow(peps, 1)) - ZZ = [] - for A ∈ ψ push!(ZZ, dropdims(A, dims=(2, 4))) end - Z = prod(ZZ)[] - =# - - push!(Z, peps_contract(peps, config)) + p = peps_contract(peps, config) + push!(Z, p) end - println(Z) + @test all(x -> x ≈ first(Z), Z) if isempty(config) states = collect.(all_states(rank_vec(ig))) ρ = exp.(-β .* energy.(states, Ref(ig))) ZZ = sum(ρ) - println(ZZ) + @test first(Z) ≈ ZZ end - - #@test all(x -> x == first(Z), Z) end \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index 4f5c5a40..6728649f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -31,23 +31,23 @@ if CUDA.functional() && CUDA.has_cutensor() && false end push!(my_tests, - "base.jl", - "utils.jl", - "contractions.jl", - "compressions.jl", - "ising.jl", - "indexing.jl", - "searchMPS.jl", - "spectrum.jl", - "graph.jl", - "PEPS.jl", + #"base.jl", + #"utils.jl", + #"contractions.jl", + #"compressions.jl", + #"ising.jl", + #"indexing.jl", + #"searchMPS.jl", + #"spectrum.jl", + #"graph.jl", + #"PEPS.jl", "contract.jl", - "indexing.jl", - "notation_tests.jl", - "peps_tests.jl", - "mps_tests.jl", - "tests_full_graph.jl", - "tests_on_data.jl" + #"indexing.jl", + #"notation_tests.jl", + #"peps_tests.jl", + #"mps_tests.jl", + #"tests_full_graph.jl", + #"tests_on_data.jl" ) for my_test in my_tests From bf9fb8f241375c097b203d50f6dd9f257ec657f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Thu, 4 Feb 2021 22:49:36 +0100 Subject: [PATCH 044/110] improve use case for Krzysiek --- src/PEPS.jl | 1 - test/contract.jl | 37 +++++++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index e45128fe..be9afabb 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -171,7 +171,6 @@ function peps_contract( M = MPO(T, peps, i, i+1) ψ = W * (M * ψ) - #ψ = W * ψ if bond_dimension(ψ) > Dcut ψ = compress(ψ, Dcut, tol, max_sweeps) diff --git a/test/contract.jl b/test/contract.jl index a24e160b..b1854dd7 100644 --- a/test/contract.jl +++ b/test/contract.jl @@ -28,24 +28,33 @@ ig, Dict(1 => 4, 2 => 2), energy = energy, - spectrum = brute_force, + spectrum = full_spectrum, ) - config = Dict{Int, Int}() #Dict(1 => 2, 2 => 1) + for i ∈ 1:4, j ∈ 1:2 + + cfg = Dict(1 => i, 2 => j) - Z = [] - for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) - peps = PepsNetwork(m, n, fg, β, origin) - p = peps_contract(peps, config) - push!(Z, p) - end + Z = [] + for origin ∈ (:NW, :SW, :WS, :WN) + peps = PepsNetwork(m, n, fg, β, origin) + p = peps_contract(peps, cfg) + push!(Z, p) + end - @test all(x -> x ≈ first(Z), Z) + # they all should be the same + @test all(x -> x ≈ first(Z), Z) - if isempty(config) + # the exact Gibbs state states = collect.(all_states(rank_vec(ig))) - ρ = exp.(-β .* energy.(states, Ref(ig))) - ZZ = sum(ρ) - @test first(Z) ≈ ZZ - end + ρ = exp.(-β .* energy.(states, Ref(ig))) + ϱ = reshape(ρ, (4, 2)) + + # probabilities should agree + if isempty(cfg) + @test first(Z) ≈ sum(ρ) + else + @test first(Z) ≈ ϱ[cfg[1], cfg[2]] + end + end end \ No newline at end of file From abeb70b9e241919e3ccafa896a4ad3bb15729eed Mon Sep 17 00:00:00 2001 From: kdomino Date: Fri, 5 Feb 2021 09:34:12 +0100 Subject: [PATCH 045/110] new testing file --- test/peps_tests.jl | 109 -------------------------- test/runtests.jl | 3 +- test/testing_probabilities.jl | 143 ++++++++++++++++++++++++++++++++++ 3 files changed, 145 insertions(+), 110 deletions(-) create mode 100644 test/testing_probabilities.jl diff --git a/test/peps_tests.jl b/test/peps_tests.jl index 7252587c..77aa8eb0 100644 --- a/test/peps_tests.jl +++ b/test/peps_tests.jl @@ -499,115 +499,6 @@ end end =# -@testset "testing marginal/conditional probabilities" begin - - #### conditional probability implementation - - - β = 3. - g = M2graph(Mq, -1) - - bf = brute_force(g; num_states = 1) - - rule = Dict{Any,Any}(1 => 1, 2 => 1, 4 => 1, 5 => 1, 3=>2, 6 => 2, 7 => 3, 8 => 3, 9 => 4) - - update_cells!( - g, - rule = rule, - ) - - fg = factor_graph( - g, - energy=energy, - spectrum=brute_force, - ) - - origin = :NW - states = collect.(all_states(rank_vec(g))) - ρ = exp.(-β .* energy.(states, Ref(g))) - Z = sum(ρ) - - println("grid of nodes") - display([1 2 ; 3 4]) - println() - - peps = PepsNetwork(2,2, fg, β, origin) - Dcut = 8 - tol = 0. - swep = 4 - z = peps_contract(peps, Dict{Int, Int}()) - @test z ≈ Z - - boundary_mps = boundaryMPS(peps, Dcut, tol, swep) - - # initialize - ps = Partial_sol{Float64}(Int[], 0.) - - #node 1 - obj1 = conditional_probabs(peps, ps, boundary_mps[1], PEPSRow(peps, 1)) - _, i = findmax(obj1) - ps1 = update_partial_solution(ps, i, obj1[i]) - - # test all - for i_1 in 1:16 - @test obj1[i_1] ≈ peps_contract(peps, Dict{Int, Int}(1 => i_1))/z atol = 1e-3 - end - # test chosen - @test (props(fg, 1)[:spectrum]).states[i] == [bf.states[1][a] for a in [1,2,4,5]] - - # node 2 - obj2 = conditional_probabs(peps, ps1, boundary_mps[1], PEPSRow(peps, 1)) - obj2 = obj1[i].*obj2 - _, j = findmax(obj2) - ps2 = update_partial_solution(ps1, j, obj2[j]) - - - @test (props(fg, 2)[:spectrum]).states[j] == [bf.states[1][a] for a in [3,6]] - - for i_2 in 1:4 - @test obj2[i_2] ≈ peps_contract(peps, Dict{Int, Int}(1 => i, 2 =>i_2))/z atol = 1e-3 - end - - println(" ............. node 3 ......") - println("tensor") - display(reshape(PEPSRow(peps, 2)[1], (4,2,4))) - println() - println("done from 2 spins, 2 bounds up and 1 left") - println("shoud be constructed of one couplung matrix (up) and projector (left)") - println("only 4 non-zero elements suggests 2 projectors or lacking elements") - println() - # node 3 - obj3 = conditional_probabs(peps, ps2, boundary_mps[2], PEPSRow(peps, 2)) - obj3 = obj2[j].*obj3 - - _, k = findmax(obj3) - ps3 = update_partial_solution(ps2, k, obj3[k]) - - for i_3 in 1:4 - @test obj3[i_3] ≈ peps_contract(peps, Dict{Int, Int}(1 => i, 2 =>j, 3 => i_3))/z atol = 1e-3 - end - - @test (props(fg, 3)[:spectrum]).states[k] == [bf.states[1][a] for a in [7,8]] - - #node 4 - - obj4 = conditional_probabs(peps, ps3, boundary_mps[2], PEPSRow(peps, 2)) - obj4 = obj3[k].*obj4 - - _, l = findmax(obj4) - - for i_4 in 1:2 - @test obj4[i_4] ≈ peps_contract(peps, Dict{Int, Int}(1 => i, 2 =>j, 3 => k, 4 => i_4))/z atol = 1e-3 - end - - @test (props(fg, 4)[:spectrum]).states[l] == [bf.states[1][a] for a in [9]] - - println(props(fg, 4)[:spectrum]) - - println(" .............. node 4 .............") - println("tensor should have no non-zero elements, should be composed of two coupling matrices") - display(reshape(PEPSRow(peps, 2)[2], (2,2,2))) -end @testset "test an exemple instance" begin diff --git a/test/runtests.jl b/test/runtests.jl index 45ed0048..9675ed2a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -33,7 +33,8 @@ push!(my_tests, #"searchMPS.jl", #"spectrum.jl", #"graph.jl", - "PEPS.jl", + #"PEPS.jl", + "testing_probabilities.jl", #"contract.jl", #"indexing.jl", #"notation_tests.jl", diff --git a/test/testing_probabilities.jl b/test/testing_probabilities.jl new file mode 100644 index 00000000..d88c0890 --- /dev/null +++ b/test/testing_probabilities.jl @@ -0,0 +1,143 @@ +include("test_helpers.jl") +import SpinGlassPEPS: Partial_sol, update_partial_solution, select_best_solutions, return_solutions +import SpinGlassPEPS: compute_single_tensor, conditional_probabs, get_parameters_for_T +import SpinGlassPEPS: make_lower_mps, M2graph, graph4peps, fullM2grid! +import SpinGlassPEPS: set_spin_from_letf, spin_index_from_left, spin_indices_from_above +import SpinGlassPEPS: energy, solve +import SpinGlassPEPS: dX_inds, merge_dX +import SpinGlassPEPS: peps_contract +Random.seed!(1234) + + +Mq = zeros(9,9) +Mq[1,1] = 1. +Mq[2,2] = 1.4 +Mq[3,3] = -0.2 +Mq[4,4] = -1. +Mq[5,5] = 0.2 +Mq[6,6] = -2.2 +Mq[7,7] = 0.2 +Mq[8,8] = -0.2 +Mq[9,9] = -0.8 +Mq[1,2] = Mq[2,1] = 2. +Mq[1,4] = Mq[4,1] = -1. +Mq[2,3] = Mq[3,2] = 1.1 +Mq[4,5] = Mq[5,4] = 0.5 +Mq[4,7] = Mq[7,4] = -1. +Mq[2,5] = Mq[5,2] = -.75 +Mq[3,6] = Mq[6,3] = 1.5 +Mq[5,6] = Mq[6,5] = 2.1 +Mq[5,8] = Mq[8,5] = 0.12 +Mq[6,9] = Mq[9,6] = -0.52 +Mq[7,8] = Mq[8,7] = 0.5 +Mq[8,9] = Mq[9,8] = -0.05 + +@testset "testing marginal/conditional probabilities" begin + + #### conditional probability implementation + + + β = 3. + g = M2graph(Mq, -1) + + bf = brute_force(g; num_states = 1) + + rule = Dict{Any,Any}(1 => 1, 2 => 1, 4 => 1, 5 => 1, 3=>2, 6 => 2, 7 => 3, 8 => 3, 9 => 4) + + update_cells!( + g, + rule = rule, + ) + + fg = factor_graph( + g, + energy=energy, + spectrum=brute_force, + ) + + origin = :NW + states = collect.(all_states(rank_vec(g))) + ρ = exp.(-β .* energy.(states, Ref(g))) + Z = sum(ρ) + + println("grid of nodes") + display([1 2 ; 3 4]) + println() + + peps = PepsNetwork(2,2, fg, β, origin) + Dcut = 8 + tol = 0. + swep = 4 + z = peps_contract(peps, Dict{Int, Int}()) + @test z ≈ Z + + boundary_mps = boundaryMPS(peps, Dcut, tol, swep) + + # initialize + ps = Partial_sol{Float64}(Int[], 0.) + + #node 1 + obj1 = conditional_probabs(peps, ps, boundary_mps[1], PEPSRow(peps, 1)) + _, i = findmax(obj1) + ps1 = update_partial_solution(ps, i, obj1[i]) + + # test all + for i_1 in 1:16 + @test obj1[i_1] ≈ peps_contract(peps, Dict{Int, Int}(1 => i_1))/z atol = 1e-3 + end + # test chosen + @test (props(fg, 1)[:spectrum]).states[i] == [bf.states[1][a] for a in [1,2,4,5]] + + # node 2 + obj2 = conditional_probabs(peps, ps1, boundary_mps[1], PEPSRow(peps, 1)) + obj2 = obj1[i].*obj2 + _, j = findmax(obj2) + ps2 = update_partial_solution(ps1, j, obj2[j]) + + + @test (props(fg, 2)[:spectrum]).states[j] == [bf.states[1][a] for a in [3,6]] + + for i_2 in 1:4 + @test obj2[i_2] ≈ peps_contract(peps, Dict{Int, Int}(1 => i, 2 =>i_2))/z atol = 1e-3 + end + + println(" ............. node 3 ......") + println("tensor") + display(reshape(PEPSRow(peps, 2)[1], (4,2,4))) + println() + println("done from 2 spins, 2 bounds up and 1 left") + println("shoud be constructed of one couplung matrix (up) and projector (left)") + println("only 4 non-zero elements suggests 2 projectors or lacking elements") + println() + # node 3 + obj3 = conditional_probabs(peps, ps2, boundary_mps[2], PEPSRow(peps, 2)) + obj3 = obj2[j].*obj3 + + _, k = findmax(obj3) + ps3 = update_partial_solution(ps2, k, obj3[k]) + + for i_3 in 1:4 + @test obj3[i_3] ≈ peps_contract(peps, Dict{Int, Int}(1 => i, 2 =>j, 3 => i_3))/z atol = 1e-3 + end + + @test (props(fg, 3)[:spectrum]).states[k] == [bf.states[1][a] for a in [7,8]] + + #node 4 + + obj4 = conditional_probabs(peps, ps3, boundary_mps[2], PEPSRow(peps, 2)) + obj4 = obj3[k].*obj4 + + _, l = findmax(obj4) + + for i_4 in 1:2 + @test obj4[i_4] ≈ peps_contract(peps, Dict{Int, Int}(1 => i, 2 =>j, 3 => k, 4 => i_4))/z atol = 1e-3 + end + + @test (props(fg, 4)[:spectrum]).states[l] == [bf.states[1][a] for a in [9]] + + println(props(fg, 4)[:spectrum]) + + println(" .............. node 4 .............") + println("tensor should have no non-zero elements, should be composed of two coupling matrices") + display(reshape(PEPSRow(peps, 2)[2], (2,2,2))) +end From 4917e926efe4accc987c9bdaecef95ced50f7e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Fri, 5 Feb 2021 10:30:11 +0100 Subject: [PATCH 046/110] update contract.jl slightly --- src/ising.jl | 2 +- test/contract.jl | 4 ++-- test/runtests.jl | 6 +++--- test/testing_probabilities.jl | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ising.jl b/src/ising.jl index 0d0e329b..def3d2e4 100644 --- a/src/ising.jl +++ b/src/ising.jl @@ -95,7 +95,7 @@ end function update_cells!(ig::MetaGraph; rule::Dict) for v ∈ vertices(ig) - w = get_prop(ig, v, :cell) + w = get_prop(ig, v, :cell) set_prop!(ig, v, :cell, rule[w]) end end diff --git a/test/contract.jl b/test/contract.jl index b1854dd7..df04841f 100644 --- a/test/contract.jl +++ b/test/contract.jl @@ -14,14 +14,14 @@ ) m, n = 1, 2 - L = 3 + L = 4 β = 1. ig = ising_graph(D, L) update_cells!( ig, - rule = Dict(1 => 1, 2 => 1, 3 => 2), + rule = Dict(1 => 1, 2 => 1, 3 => 2, 4 => 2), ) fg = factor_graph( diff --git a/test/runtests.jl b/test/runtests.jl index 9675ed2a..92fa6830 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -34,11 +34,11 @@ push!(my_tests, #"spectrum.jl", #"graph.jl", #"PEPS.jl", - "testing_probabilities.jl", - #"contract.jl", + #"testing_probabilities.jl", + "contract.jl", #"indexing.jl", #"notation_tests.jl", - "peps_tests.jl", + #"peps_tests.jl", #"mps_tests.jl", #"tests_full_graph.jl", #"tests_on_data.jl" diff --git a/test/testing_probabilities.jl b/test/testing_probabilities.jl index d88c0890..777e0c49 100644 --- a/test/testing_probabilities.jl +++ b/test/testing_probabilities.jl @@ -64,7 +64,7 @@ Mq[8,9] = Mq[9,8] = -0.05 display([1 2 ; 3 4]) println() - peps = PepsNetwork(2,2, fg, β, origin) + peps = PepsNetwork(2, 2, fg, β, origin) Dcut = 8 tol = 0. swep = 4 From 3935bcdebe0cc59b93aae5296e8ba497e948907a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Fri, 5 Feb 2021 10:45:29 +0100 Subject: [PATCH 047/110] update contract --- src/PEPS.jl | 17 ++++++----------- test/contract.jl | 2 +- test/testing_probabilities.jl | 12 ++++++------ 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 0a9892bc..1dfcb758 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -1,6 +1,6 @@ export PepsNetwork export MPO, MPS -export boundaryMPS, peps_contract +export boundaryMPS, contract mutable struct PepsNetwork size::NTuple{2, Int} @@ -101,8 +101,7 @@ function MPS(::Type{T}, peps::PepsNetwork) where {T <: Number} end MPS(peps::PepsNetwork) = MPS(Float64, peps) -function boundaryMPS( - peps::PepsNetwork, +function boundaryMPS(peps::PepsNetwork, Dcut::Int, tol::Number=1E-8, max_sweeps=4) @@ -127,8 +126,7 @@ function boundaryMPS( boundary_MPS end -function MPO( - ::Type{T}, +function MPO(::Type{T}, peps::PepsNetwork, i::Int, config::Dict{Int, Int} = Dict{Int, Int}() @@ -149,13 +147,12 @@ function MPO( end W end -MPO( - peps::PepsNetwork, +MPO(peps::PepsNetwork, i::Int, config::Dict{Int, Int} = Dict{Int, Int}() ) = MPO(Float64, peps, i, config) -function peps_contract( +function LightGraphs.contract( peps::PepsNetwork, config::Dict{Int, Int} = Dict{Int, Int}(), Dcut::Int=typemax(Int), @@ -169,15 +166,13 @@ function peps_contract( for i ∈ peps.i_max:-1:1 W = MPO(T, peps, i, config) M = MPO(T, peps, i, i+1) - ψ = W * (M * ψ) - if bond_dimension(ψ) > Dcut ψ = compress(ψ, Dcut, tol, max_sweeps) end end - Z = [] + Z = Array{T, 2}[] for A ∈ ψ push!(Z, dropdims(A, dims=2)) end prod(Z)[] end diff --git a/test/contract.jl b/test/contract.jl index df04841f..2ee738a1 100644 --- a/test/contract.jl +++ b/test/contract.jl @@ -38,7 +38,7 @@ Z = [] for origin ∈ (:NW, :SW, :WS, :WN) peps = PepsNetwork(m, n, fg, β, origin) - p = peps_contract(peps, cfg) + p = contract(peps, cfg) push!(Z, p) end diff --git a/test/testing_probabilities.jl b/test/testing_probabilities.jl index 777e0c49..8147d561 100644 --- a/test/testing_probabilities.jl +++ b/test/testing_probabilities.jl @@ -5,7 +5,7 @@ import SpinGlassPEPS: make_lower_mps, M2graph, graph4peps, fullM2grid! import SpinGlassPEPS: set_spin_from_letf, spin_index_from_left, spin_indices_from_above import SpinGlassPEPS: energy, solve import SpinGlassPEPS: dX_inds, merge_dX -import SpinGlassPEPS: peps_contract +import SpinGlassPEPS: contract Random.seed!(1234) @@ -68,7 +68,7 @@ Mq[8,9] = Mq[9,8] = -0.05 Dcut = 8 tol = 0. swep = 4 - z = peps_contract(peps, Dict{Int, Int}()) + z = contract(peps, Dict{Int, Int}()) @test z ≈ Z boundary_mps = boundaryMPS(peps, Dcut, tol, swep) @@ -83,7 +83,7 @@ Mq[8,9] = Mq[9,8] = -0.05 # test all for i_1 in 1:16 - @test obj1[i_1] ≈ peps_contract(peps, Dict{Int, Int}(1 => i_1))/z atol = 1e-3 + @test obj1[i_1] ≈ contract(peps, Dict{Int, Int}(1 => i_1))/z atol = 1e-3 end # test chosen @test (props(fg, 1)[:spectrum]).states[i] == [bf.states[1][a] for a in [1,2,4,5]] @@ -98,7 +98,7 @@ Mq[8,9] = Mq[9,8] = -0.05 @test (props(fg, 2)[:spectrum]).states[j] == [bf.states[1][a] for a in [3,6]] for i_2 in 1:4 - @test obj2[i_2] ≈ peps_contract(peps, Dict{Int, Int}(1 => i, 2 =>i_2))/z atol = 1e-3 + @test obj2[i_2] ≈ contract(peps, Dict{Int, Int}(1 => i, 2 =>i_2))/z atol = 1e-3 end println(" ............. node 3 ......") @@ -117,7 +117,7 @@ Mq[8,9] = Mq[9,8] = -0.05 ps3 = update_partial_solution(ps2, k, obj3[k]) for i_3 in 1:4 - @test obj3[i_3] ≈ peps_contract(peps, Dict{Int, Int}(1 => i, 2 =>j, 3 => i_3))/z atol = 1e-3 + @test obj3[i_3] ≈ contract(peps, Dict{Int, Int}(1 => i, 2 =>j, 3 => i_3))/z atol = 1e-3 end @test (props(fg, 3)[:spectrum]).states[k] == [bf.states[1][a] for a in [7,8]] @@ -130,7 +130,7 @@ Mq[8,9] = Mq[9,8] = -0.05 _, l = findmax(obj4) for i_4 in 1:2 - @test obj4[i_4] ≈ peps_contract(peps, Dict{Int, Int}(1 => i, 2 =>j, 3 => k, 4 => i_4))/z atol = 1e-3 + @test obj4[i_4] ≈ contract(peps, Dict{Int, Int}(1 => i, 2 =>j, 3 => k, 4 => i_4))/z atol = 1e-3 end @test (props(fg, 4)[:spectrum]).states[l] == [bf.states[1][a] for a in [9]] From 1ebe7cf1c708ccbc0caa6d9c2b683b209ae011c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Fri, 5 Feb 2021 10:59:02 +0100 Subject: [PATCH 048/110] update Krzysiek's example --- test/runtests.jl | 4 ++-- test/testing_probabilities.jl | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 92fa6830..8f0b4b7b 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -34,8 +34,8 @@ push!(my_tests, #"spectrum.jl", #"graph.jl", #"PEPS.jl", - #"testing_probabilities.jl", - "contract.jl", + "testing_probabilities.jl", + #"contract.jl", #"indexing.jl", #"notation_tests.jl", #"peps_tests.jl", diff --git a/test/testing_probabilities.jl b/test/testing_probabilities.jl index 8147d561..b11de92d 100644 --- a/test/testing_probabilities.jl +++ b/test/testing_probabilities.jl @@ -67,11 +67,11 @@ Mq[8,9] = Mq[9,8] = -0.05 peps = PepsNetwork(2, 2, fg, β, origin) Dcut = 8 tol = 0. - swep = 4 + sweep = 4 z = contract(peps, Dict{Int, Int}()) @test z ≈ Z - boundary_mps = boundaryMPS(peps, Dcut, tol, swep) + boundary_mps = boundaryMPS(peps, Dcut, tol, sweep) # initialize ps = Partial_sol{Float64}(Int[], 0.) @@ -109,6 +109,7 @@ Mq[8,9] = Mq[9,8] = -0.05 println("shoud be constructed of one couplung matrix (up) and projector (left)") println("only 4 non-zero elements suggests 2 projectors or lacking elements") println() + # node 3 obj3 = conditional_probabs(peps, ps2, boundary_mps[2], PEPSRow(peps, 2)) obj3 = obj2[j].*obj3 From 5859dfd303f8c194506f6c6c3c56a6e9744bdb3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Fri, 5 Feb 2021 11:20:10 +0100 Subject: [PATCH 049/110] modify krzysiek's example --- src/peps_no_types.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/peps_no_types.jl b/src/peps_no_types.jl index f0f27e3e..346e6453 100644 --- a/src/peps_no_types.jl +++ b/src/peps_no_types.jl @@ -297,10 +297,10 @@ p_r - peps row 1 --b_m1 --b_m2 -- b_m -- b_m -- 1 """ function conditional_probabs(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps::MPS{T}, - peps_row::PEPSRow{T}) where T <: Real + peps_row::PEPSRow{T}) where T <: Number - j = length(ps.spins) + 1 + j = length(ps.spins) + 1 ng = peps.network_graph fg = ng.factor_graph From 6ee63d0b1d27962c0d0de41179dc6e54bc0b27a7 Mon Sep 17 00:00:00 2001 From: kdomino Date: Fri, 5 Feb 2021 11:47:10 +0100 Subject: [PATCH 050/110] add simpler example to testing_probabilities.jl --- test/testing_probabilities.jl | 78 +++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/test/testing_probabilities.jl b/test/testing_probabilities.jl index d88c0890..41f27a07 100644 --- a/test/testing_probabilities.jl +++ b/test/testing_probabilities.jl @@ -9,6 +9,84 @@ import SpinGlassPEPS: peps_contract Random.seed!(1234) +Mq = zeros(4,4) +Mq[1,1] = 1. +Mq[2,2] = 1.4 +Mq[3,3] = -0.2 +Mq[4,4] = -1. + +Mq[1,2] = Mq[2,1] = 0.590 +Mq[1,3] = Mq[3,1] = 0.766 +Mq[2,4] = Mq[4,2] = 0.566 +Mq[3,4] = Mq[4,3] = 0.460 + + +@testset "testing marginal/conditional probabilities" begin + + #### conditional probability implementation + + + β = 3. + g = M2graph(Mq, -1) + + bf = brute_force(g; num_states = 1) + + update_cells!( + g, + rule = square_lattice((1, 1, 2, 1, 2)), + ) + + fg = factor_graph( + g, + energy=energy, + spectrum=brute_force, + ) + + origin = :NW + states = collect.(all_states(rank_vec(g))) + ρ = exp.(-β .* energy.(states, Ref(g))) + Z = sum(ρ) + + println("grid of nodes") + display([1; 2]) + println() + + peps = PepsNetwork(2,1, fg, β, origin) + Dcut = 8 + tol = 0. + swep = 4 + z = peps_contract(peps, Dict{Int, Int}()) + @test z ≈ Z + println(peps) + + boundary_mps = boundaryMPS(peps, Dcut, tol, swep) + + # initialize + ps = Partial_sol{Float64}(Int[], 0.) + + #node 1 + obj1 = conditional_probabs(peps, ps, boundary_mps[1], PEPSRow(peps, 1)) + _, i = findmax(obj1) + ps1 = update_partial_solution(ps, i, obj1[i]) + + # test all + for i_1 in 1:4 + @test obj1[i_1] ≈ peps_contract(peps, Dict{Int, Int}(1 => i_1))/z atol = 1e-3 + end + + obj2 = conditional_probabs(peps, ps1, boundary_mps[2], PEPSRow(peps, 2)) + obj2 = obj1[i].*obj2 + _, j = findmax(obj2) + ps2 = update_partial_solution(ps1, j, obj2[j]) + + + for i_2 in 1:4 + @test obj2[i_2] ≈ peps_contract(peps, Dict{Int, Int}(1 => i, 2 =>i_2))/z atol = 1e-3 + end + +end + + Mq = zeros(9,9) Mq[1,1] = 1. Mq[2,2] = 1.4 From 39a6b0d6beb1a151557db5ab5a12a6b6d1297151 Mon Sep 17 00:00:00 2001 From: kdomino Date: Fri, 5 Feb 2021 11:51:37 +0100 Subject: [PATCH 051/110] correction --- test/testing_probabilities.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/testing_probabilities.jl b/test/testing_probabilities.jl index 708ed97a..491743ed 100644 --- a/test/testing_probabilities.jl +++ b/test/testing_probabilities.jl @@ -55,7 +55,7 @@ Mq[3,4] = Mq[4,3] = 0.460 Dcut = 8 tol = 0. swep = 4 - z = peps_contract(peps, Dict{Int, Int}()) + z = contract(peps, Dict{Int, Int}()) @test z ≈ Z println(peps) @@ -71,7 +71,7 @@ Mq[3,4] = Mq[4,3] = 0.460 # test all for i_1 in 1:4 - @test obj1[i_1] ≈ peps_contract(peps, Dict{Int, Int}(1 => i_1))/z atol = 1e-3 + @test obj1[i_1] ≈ contract(peps, Dict{Int, Int}(1 => i_1))/z atol = 1e-3 end obj2 = conditional_probabs(peps, ps1, boundary_mps[2], PEPSRow(peps, 2)) @@ -81,7 +81,7 @@ Mq[3,4] = Mq[4,3] = 0.460 for i_2 in 1:4 - @test obj2[i_2] ≈ peps_contract(peps, Dict{Int, Int}(1 => i, 2 =>i_2))/z atol = 1e-3 + @test obj2[i_2] ≈ contract(peps, Dict{Int, Int}(1 => i, 2 =>i_2))/z atol = 1e-3 end end @@ -187,7 +187,7 @@ Mq[8,9] = Mq[9,8] = -0.05 println("shoud be constructed of one couplung matrix (up) and projector (left)") println("only 4 non-zero elements suggests 2 projectors or lacking elements") println() - + # node 3 obj3 = conditional_probabs(peps, ps2, boundary_mps[2], PEPSRow(peps, 2)) obj3 = obj2[j].*obj3 From a7442b6250d1df9b9bcba041d94ba7c76ae92fca Mon Sep 17 00:00:00 2001 From: kdomino Date: Fri, 5 Feb 2021 12:06:11 +0100 Subject: [PATCH 052/110] split test files --- test/runtests.jl | 1 + test/testing_probabilities.jl | 89 +---------------------------- test/testing_probabilities_short.jl | 68 ++++++++++++++++++++++ 3 files changed, 71 insertions(+), 87 deletions(-) create mode 100644 test/testing_probabilities_short.jl diff --git a/test/runtests.jl b/test/runtests.jl index 8f0b4b7b..cbd530c4 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -34,6 +34,7 @@ push!(my_tests, #"spectrum.jl", #"graph.jl", #"PEPS.jl", + "testing_probabilities_short.jl", "testing_probabilities.jl", #"contract.jl", #"indexing.jl", diff --git a/test/testing_probabilities.jl b/test/testing_probabilities.jl index 491743ed..bf1c8f60 100644 --- a/test/testing_probabilities.jl +++ b/test/testing_probabilities.jl @@ -1,91 +1,6 @@ include("test_helpers.jl") -import SpinGlassPEPS: Partial_sol, update_partial_solution, select_best_solutions, return_solutions -import SpinGlassPEPS: compute_single_tensor, conditional_probabs, get_parameters_for_T -import SpinGlassPEPS: make_lower_mps, M2graph, graph4peps, fullM2grid! -import SpinGlassPEPS: set_spin_from_letf, spin_index_from_left, spin_indices_from_above -import SpinGlassPEPS: energy, solve -import SpinGlassPEPS: dX_inds, merge_dX -import SpinGlassPEPS: contract -Random.seed!(1234) - - -Mq = zeros(4,4) -Mq[1,1] = 1. -Mq[2,2] = 1.4 -Mq[3,3] = -0.2 -Mq[4,4] = -1. - -Mq[1,2] = Mq[2,1] = 0.590 -Mq[1,3] = Mq[3,1] = 0.766 -Mq[2,4] = Mq[4,2] = 0.566 -Mq[3,4] = Mq[4,3] = 0.460 - - -@testset "testing marginal/conditional probabilities" begin - - #### conditional probability implementation - - - β = 3. - g = M2graph(Mq, -1) - - bf = brute_force(g; num_states = 1) - - update_cells!( - g, - rule = square_lattice((1, 1, 2, 1, 2)), - ) - - fg = factor_graph( - g, - energy=energy, - spectrum=brute_force, - ) - - origin = :NW - states = collect.(all_states(rank_vec(g))) - ρ = exp.(-β .* energy.(states, Ref(g))) - Z = sum(ρ) - - println("grid of nodes") - display([1; 2]) - println() - - peps = PepsNetwork(2,1, fg, β, origin) - Dcut = 8 - tol = 0. - swep = 4 - z = contract(peps, Dict{Int, Int}()) - @test z ≈ Z - println(peps) - - boundary_mps = boundaryMPS(peps, Dcut, tol, swep) - - # initialize - ps = Partial_sol{Float64}(Int[], 0.) - - #node 1 - obj1 = conditional_probabs(peps, ps, boundary_mps[1], PEPSRow(peps, 1)) - _, i = findmax(obj1) - ps1 = update_partial_solution(ps, i, obj1[i]) - - # test all - for i_1 in 1:4 - @test obj1[i_1] ≈ contract(peps, Dict{Int, Int}(1 => i_1))/z atol = 1e-3 - end - - obj2 = conditional_probabs(peps, ps1, boundary_mps[2], PEPSRow(peps, 2)) - obj2 = obj1[i].*obj2 - _, j = findmax(obj2) - ps2 = update_partial_solution(ps1, j, obj2[j]) - - - for i_2 in 1:4 - @test obj2[i_2] ≈ contract(peps, Dict{Int, Int}(1 => i, 2 =>i_2))/z atol = 1e-3 - end - -end - +import SpinGlassPEPS: Partial_sol, update_partial_solution +import SpinGlassPEPS: energy, solve, contract Mq = zeros(9,9) Mq[1,1] = 1. diff --git a/test/testing_probabilities_short.jl b/test/testing_probabilities_short.jl new file mode 100644 index 00000000..42bd5343 --- /dev/null +++ b/test/testing_probabilities_short.jl @@ -0,0 +1,68 @@ +include("test_helpers.jl") +import SpinGlassPEPS: Partial_sol, update_partial_solution +import SpinGlassPEPS: energy, solve, contract + +Mq = zeros(4,4) +Mq[1,1] = 1. +Mq[2,2] = 1.4 +Mq[3,3] = -0.2 +Mq[4,4] = -1. + +Mq[1,2] = Mq[2,1] = 0.590 +Mq[1,3] = Mq[3,1] = 0.766 +Mq[2,4] = Mq[4,2] = 0.566 +Mq[3,4] = Mq[4,3] = 0.460 + + +@testset "testing marginal/conditional probabilities" begin + β = 3. + g = M2graph(Mq, -1) + + update_cells!( + g, + rule = square_lattice((1, 1, 2, 1, 2)), + ) + + fg = factor_graph( + g, + energy=energy, + spectrum=brute_force, + ) + + states = collect.(all_states(rank_vec(g))) + ρ = exp.(-β .* energy.(states, Ref(g))) + Z = sum(ρ) + + println("grid of nodes") + display([1; 2]) + println() + + peps = PepsNetwork(2,1, fg, β, :NW) + Dcut = 8 + tol = 0. + swep = 4 + z = contract(peps, Dict{Int, Int}()) + @test z ≈ Z + + boundary_mps = boundaryMPS(peps, Dcut, tol, swep) + + # initialize + ps = Partial_sol{Float64}(Int[], 0.) + + obj1 = conditional_probabs(peps, ps, boundary_mps[1], PEPSRow(peps, 1)) + _, i = findmax(obj1) + ps1 = update_partial_solution(ps, i, obj1[i]) + + for i_1 in 1:4 + @test obj1[i_1] ≈ contract(peps, Dict{Int, Int}(1 => i_1))/z atol = 1e-3 + end + + obj2 = conditional_probabs(peps, ps1, boundary_mps[2], PEPSRow(peps, 2)) + obj2 = obj1[i].*obj2 + _, j = findmax(obj2) + ps2 = update_partial_solution(ps1, j, obj2[j]) + + for i_2 in 1:4 + @test obj2[i_2] ≈ contract(peps, Dict{Int, Int}(1 => i, 2 =>i_2))/z atol = 1e-3 + end +end From e3c444890063e30baa8c7af3e1e2c17237d934ae Mon Sep 17 00:00:00 2001 From: kdomino Date: Fri, 5 Feb 2021 12:07:44 +0100 Subject: [PATCH 053/110] correction --- test/testing_probabilities.jl | 3 +-- test/testing_probabilities_short.jl | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test/testing_probabilities.jl b/test/testing_probabilities.jl index bf1c8f60..693a7771 100644 --- a/test/testing_probabilities.jl +++ b/test/testing_probabilities.jl @@ -1,5 +1,4 @@ -include("test_helpers.jl") -import SpinGlassPEPS: Partial_sol, update_partial_solution +import SpinGlassPEPS: Partial_sol, update_partial_solution, M2graph import SpinGlassPEPS: energy, solve, contract Mq = zeros(9,9) diff --git a/test/testing_probabilities_short.jl b/test/testing_probabilities_short.jl index 42bd5343..4904cee8 100644 --- a/test/testing_probabilities_short.jl +++ b/test/testing_probabilities_short.jl @@ -1,5 +1,4 @@ -include("test_helpers.jl") -import SpinGlassPEPS: Partial_sol, update_partial_solution +import SpinGlassPEPS: Partial_sol, update_partial_solution, M2graph import SpinGlassPEPS: energy, solve, contract Mq = zeros(4,4) From 5cf5f429424fc7fd79491f64e25bd71ae604fd16 Mon Sep 17 00:00:00 2001 From: kdomino Date: Fri, 5 Feb 2021 12:09:13 +0100 Subject: [PATCH 054/110] correction --- test/testing_probabilities.jl | 2 +- test/testing_probabilities_short.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/testing_probabilities.jl b/test/testing_probabilities.jl index 693a7771..a5176871 100644 --- a/test/testing_probabilities.jl +++ b/test/testing_probabilities.jl @@ -1,5 +1,5 @@ import SpinGlassPEPS: Partial_sol, update_partial_solution, M2graph -import SpinGlassPEPS: energy, solve, contract +import SpinGlassPEPS: energy, solve, contract, conditional_probabs Mq = zeros(9,9) Mq[1,1] = 1. diff --git a/test/testing_probabilities_short.jl b/test/testing_probabilities_short.jl index 4904cee8..6e3cf0b5 100644 --- a/test/testing_probabilities_short.jl +++ b/test/testing_probabilities_short.jl @@ -1,5 +1,5 @@ import SpinGlassPEPS: Partial_sol, update_partial_solution, M2graph -import SpinGlassPEPS: energy, solve, contract +import SpinGlassPEPS: energy, solve, contract, conditional_probabs Mq = zeros(4,4) Mq[1,1] = 1. From e9bfa000e986d6799a1d09a57cfb9e6970938eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Sat, 6 Feb 2021 09:05:00 +0100 Subject: [PATCH 055/110] cleaning up --- src/PEPS.jl | 19 +++++++++---------- src/contractions.jl | 6 +++--- test/contract.jl | 2 +- test/runtests.jl | 6 +++--- test/testing_probabilities_short.jl | 2 +- 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 1dfcb758..f7e645b9 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -42,9 +42,11 @@ MPO(ψ::PEPSRow) = MPO(Float64, ψ) function PEPSRow(::Type{T}, peps::PepsNetwork, i::Int) where {T <: Number} n = peps.j_max - ψ = PEPSRow(T, n) - for j ∈ 1:n ψ[j] = generate_tensor(peps, (i, j)) end + ψ = PEPSRow(T, n) + for j ∈ 1:n + ψ[j] = generate_tensor(peps, (i, j)) + end for j ∈ 2:n ten = generate_tensor(peps, (i, j-1), (i, j)) @@ -102,28 +104,25 @@ end MPS(peps::PepsNetwork) = MPS(Float64, peps) function boundaryMPS(peps::PepsNetwork, - Dcut::Int, + Dcut::Int=typemax(Int), tol::Number=1E-8, max_sweeps=4) - boundary_MPS = Vector{MPS}(undef, peps.i_max) + MPS_vec = Vector{MPS}(undef, peps.i_max) ψ = MPS(peps) for i ∈ peps.i_max:-1:1 - R = PEPSRow(peps, i) - - W = MPO(R) + W = MPO(PEPSRow(peps, i)) M = MPO(peps, i, i+1) - ψ = W * (M * ψ) if bond_dimension(ψ) > Dcut ψ = compress(ψ, Dcut, tol, max_sweeps) end - boundary_MPS[peps.i_max - i + 1] = ψ + MPS_vec[peps.i_max - i + 1] = ψ end - boundary_MPS + MPS_vec end function MPO(::Type{T}, diff --git a/src/contractions.jl b/src/contractions.jl index 0403b4e4..9f26ef57 100644 --- a/src/contractions.jl +++ b/src/contractions.jl @@ -11,12 +11,12 @@ export left_env, right_env, dot! function LinearAlgebra.dot(ψ::AbstractMPS, state::Union{Vector, NTuple}) C = I - + for (M, σ) ∈ zip(ψ, state) i = idx(σ) C = M[:, i, :]' * (C * M[:, i, :]) end - tr(C) + C[] end function LinearAlgebra.dot(ϕ::AbstractMPS, ψ::AbstractMPS) @@ -28,7 +28,7 @@ function LinearAlgebra.dot(ϕ::AbstractMPS, ψ::AbstractMPS) M̃ = conj(ϕ[i]) @tensor C[x, y] := M̃[β, σ, x] * C[β, α] * M[α, σ, y] order = (α, β, σ) end - tr(C) + C[] end function left_env(ϕ::AbstractMPS, ψ::AbstractMPS) diff --git a/test/contract.jl b/test/contract.jl index 2ee738a1..c0b75673 100644 --- a/test/contract.jl +++ b/test/contract.jl @@ -32,7 +32,7 @@ ) for i ∈ 1:4, j ∈ 1:2 - + cfg = Dict(1 => i, 2 => j) Z = [] diff --git a/test/runtests.jl b/test/runtests.jl index cbd530c4..8b56340a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -34,9 +34,9 @@ push!(my_tests, #"spectrum.jl", #"graph.jl", #"PEPS.jl", - "testing_probabilities_short.jl", - "testing_probabilities.jl", - #"contract.jl", + #"testing_probabilities_short.jl", + #"testing_probabilities.jl", + "contract.jl", #"indexing.jl", #"notation_tests.jl", #"peps_tests.jl", diff --git a/test/testing_probabilities_short.jl b/test/testing_probabilities_short.jl index 6e3cf0b5..cc226de1 100644 --- a/test/testing_probabilities_short.jl +++ b/test/testing_probabilities_short.jl @@ -36,7 +36,7 @@ Mq[3,4] = Mq[4,3] = 0.460 display([1; 2]) println() - peps = PepsNetwork(2,1, fg, β, :NW) + peps = PepsNetwork(2, 1, fg, β, :NW) Dcut = 8 tol = 0. swep = 4 From aaa041b1d56c47917dbe3f3db4fd106f854f7af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Sun, 7 Feb 2021 12:02:25 +0100 Subject: [PATCH 056/110] simplifications and new functions to contract peps --- src/PEPS.jl | 121 ++++++++----------------------- src/base.jl | 13 +++- test/PEPS.jl | 180 ++--------------------------------------------- test/runtests.jl | 4 +- 4 files changed, 49 insertions(+), 269 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index f7e645b9..5bdb4b23 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -25,104 +25,55 @@ mutable struct PepsNetwork end end -generate_tensor(pn::PepsNetwork, m::NTuple{2,Int}) = generate_tensor(pn.network_graph, pn.map[m]) -generate_tensor(pn::PepsNetwork, m::NTuple{2,Int}, n::NTuple{2,Int}) = generate_tensor(pn.network_graph, pn.map[m], pn.map[n]) +generate_tensor(pn::PepsNetwork, + m::NTuple{2,Int} + ) = generate_tensor(pn.network_graph, pn.map[m]) -function MPO(::Type{T}, Ψ::PEPSRow) where {T <: Number} - n = length(Ψ) - ϕ = MPO(T, n) - for i=1:n - A = Ψ[i] - @reduce B[l, u, r, d] |= sum(σ) A[l, u, r, d, σ] - ϕ[i] = B - end - ϕ -end -MPO(ψ::PEPSRow) = MPO(Float64, ψ) +generate_tensor(pn::PepsNetwork, + m::NTuple{2,Int}, + n::NTuple{2,Int} + ) = generate_tensor(pn.network_graph, pn.map[m], pn.map[n]) function PEPSRow(::Type{T}, peps::PepsNetwork, i::Int) where {T <: Number} - n = peps.j_max + ψ = PEPSRow(T, peps.j_max) - ψ = PEPSRow(T, n) - for j ∈ 1:n + # generate tensors from projectors + for j ∈ 1:length(ψ) ψ[j] = generate_tensor(peps, (i, j)) end - for j ∈ 2:n - ten = generate_tensor(peps, (i, j-1), (i, j)) + # include energy + for j ∈ 1:peps.j_max A = ψ[j] - @tensor B[l, u, r, d, σ] := ten[l, l̃] * A[l̃, u, r, d, σ] + h = generate_tensor(peps, (i, j-1), (i, j)) + v = generate_tensor(peps, (i-1, j), (i, j)) + @tensor B[l, u, r, d, σ] := h[l, l̃] * v[u, ũ] * A[l̃, ũ, r, d, σ] ψ[j] = B end ψ end PEPSRow(peps::PepsNetwork, i::Int) = PEPSRow(Float64, peps, i) -function MPO(::Type{T}, peps::PepsNetwork, i::Int, k::Int) where {T <: Number} - n = peps.j_max - - ψ = MPO(T, n) - ng = peps.network_graph - fg = ng.factor_graph - - for j ∈ 1:n - v, w = peps.map[i, j], peps.map[k, j] - - if has_edge(fg, v, w) - _, en, _ = get_prop(fg, v, w, :split) - elseif has_edge(fg, w, v) - _, en, _ = get_prop(fg, w, v, :split) - en = en' - else - en = zeros(1, 1) - end - - @cast A[_, u, _, d] |= exp(-ng.β * en[u, d]) - ψ[j] = A - end - ψ -end -MPO(peps::PepsNetwork, i::Int, k::Int) = MPO(Float64, peps, i, k) - -function _MPS(::Type{T}, peps::PepsNetwork) where {T <: Number} - W = MPO(PEPSRow(peps, peps.i_max)) - ψ = MPS(T, length(W)) - - for (i, O) ∈ enumerate(W) - ψ[i] = dropdims(O, dims=4) - end - ψ -end - -function MPS(::Type{T}, peps::PepsNetwork) where {T <: Number} - ψ = MPS(T, peps.j_max) - for i ∈ 1:length(ψ) - ψ[i] = ones(1, 1, 1) - end - ψ -end -MPS(peps::PepsNetwork) = MPS(Float64, peps) - -function boundaryMPS(peps::PepsNetwork, +function boundaryMPS( + peps::PepsNetwork, Dcut::Int=typemax(Int), tol::Number=1E-8, - max_sweeps=4) + max_sweeps=4; + reversed::Bool=true + ) - MPS_vec = Vector{MPS}(undef, peps.i_max) + vec = [] + ψ = idMPS(peps.j_max) - ψ = MPS(peps) for i ∈ peps.i_max:-1:1 - W = MPO(PEPSRow(peps, i)) - M = MPO(peps, i, i+1) - ψ = W * (M * ψ) - + ψ = MPO(eltype(ψ), peps, i) * ψ if bond_dimension(ψ) > Dcut ψ = compress(ψ, Dcut, tol, max_sweeps) end - - MPS_vec[peps.i_max - i + 1] = ψ + push!(vec, ψ) end - MPS_vec + + if reversed reverse(vec) else vec end end function MPO(::Type{T}, @@ -130,13 +81,10 @@ function MPO(::Type{T}, i::Int, config::Dict{Int, Int} = Dict{Int, Int}() ) where {T <: Number} - + W = MPO(T, peps.j_max) - for (j, A) ∈ enumerate(PEPSRow(peps, i)) - ij = j + peps.j_max * (i - 1) - v = get(config, ij, nothing) - + v = get(config, j + peps.j_max * (i - 1), nothing) if v !== nothing @cast B[l, u, r, d] |= A[l, u, r, d, $(v)] else @@ -159,19 +107,12 @@ function LightGraphs.contract( max_sweeps=4, ) - ψ = MPS(peps) - T = eltype(ψ) - + ψ = idMPS(peps.j_max) for i ∈ peps.i_max:-1:1 - W = MPO(T, peps, i, config) - M = MPO(T, peps, i, i+1) - ψ = W * (M * ψ) + ψ = MPO(eltype(ψ), peps, i, config) * ψ if bond_dimension(ψ) > Dcut ψ = compress(ψ, Dcut, tol, max_sweeps) end end - - Z = Array{T, 2}[] - for A ∈ ψ push!(Z, dropdims(A, dims=2)) end - prod(Z)[] + prod(dropdims(ψ))[] end diff --git a/src/base.jl b/src/base.jl index 8c5e4bf3..71216aa5 100644 --- a/src/base.jl +++ b/src/base.jl @@ -1,6 +1,6 @@ export bond_dimension, is_left_normalized, is_right_normalized export verify_bonds, verify_physical_dims, tensor, rank -export State +export State, idMPS const State = Union{Vector, NTuple} @@ -49,6 +49,16 @@ end @inline MPS(A::AbstractArray, ::Val{:right}, Dcut::Int, args...) = _left_sweep_SVD(A, Dcut, args...) @inline MPS(A::AbstractArray, ::Val{:left}, Dcut::Int, args...) = _right_sweep_SVD(A, Dcut, args...) +@inline Base.dropdims(ψ::MPS, i::Int) = (dropdims(A, dims=i) for A ∈ ψ) +@inline Base.dropdims(ψ::MPS) = Base.dropdims(ψ, 2) + +function idMPS(::Type{T}, L::Int) where {T <: Number} + ψ = MPS(T, L) + for i ∈ 1:length(ψ) ψ[i] = ones(1, 1, 1) end + ψ +end +idMPS(L::Int) = idMPS(Float64, L) + function _right_sweep_SVD(Θ::AbstractArray{T}, Dcut::Int=typemax(Int), args...) where {T} rank = ndims(Θ) ψ = MPS(T, rank) @@ -150,6 +160,7 @@ function MPS(O::MPO) ψ end + function Base.randn(::Type{MPS{T}}, D::Int, rank::Union{Vector, NTuple}) where {T} L = length(rank) ψ = MPS(T, L) diff --git a/test/PEPS.jl b/test/PEPS.jl index 5cf50db6..c00dd56d 100644 --- a/test/PEPS.jl +++ b/test/PEPS.jl @@ -47,188 +47,16 @@ x, y = m, n for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) - @info "testing peps" origin - peps = PepsNetwork(x, y, fg, β, origin) @test typeof(peps) == PepsNetwork - @info "contracting MPOs (up -> down)" - - ψ = MPO(PEPSRow(peps, 1)) - - for A ∈ ψ @test size(A, 2) == 1 end - - for i ∈ 2:peps.i_max - println("row -> ", i) - - R = PEPSRow(peps, i) - W = MPO(R) - M = MPO(peps, i-1, i) - - ψ = (ψ * M) * W - - for A ∈ ψ @test size(A, 2) == 1 end - - @test size(ψ[1], 1) == 1 == size(ψ[peps.j_max], 3) - end - - for A ∈ ψ @test size(A, 4) == 1 end - println(ψ) + ψ = idMPS(peps.j_max) + ψ_all = boundaryMPS(peps) - @info "contracting MPOs (down -> up)" - - ψ = MPS(peps) for i ∈ peps.i_max:-1:1 - println("row -> ", i) - - R = PEPSRow(peps, i) - W = MPO(R) - M = MPO(peps, i, i+1) - - ψ = W * (M * ψ) - @test size(ψ[1], 1) == 1 == size(ψ[peps.j_max], 3) - end - - for A ∈ ψ @test size(A, 4) == 1 end - println(ψ) -end -end - -@testset "Partition function from PEPS network" begin - -m = 3 -n = 3 -t = 1 - -β = 1 - -L = m * n * t - -instance = "$(@__DIR__)/instances/$(L)_001.txt" - -ig = ising_graph(instance, L) - -states = collect.(all_states(rank_vec(ig))) -ρ = exp.(-β .* energy.(states, Ref(ig))) -Z = sum(ρ) - -@test gibbs_tensor(ig, β) ≈ ρ ./ Z - -fg = factor_graph( - ig, - energy=energy, - spectrum=full_spectrum, -) - -for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) - - peps = PepsNetwork(m, n, fg, β, origin) - - ψ = MPO(PEPSRow(peps, 1)) - - for i ∈ 2:peps.i_max - W = MPO(PEPSRow(peps, i)) - M = MPO(peps, i-1, i) - - ψ = (ψ * M) * W - - @test length(W) == peps.j_max - for A ∈ ψ @test size(A, 2) == 1 end - @test size(ψ[1], 1) == 1 == size(ψ[peps.j_max], 3) - end - for A ∈ ψ @test size(A, 4) == 1 end - println(ψ) - - ZZ = [] - for A ∈ ψ push!(ZZ, dropdims(A, dims=(2, 4))) end - @test Z ≈ prod(ZZ)[] -end -end - -@testset "Partition function from PEPS network" begin - -m = 3 -n = 3 -t = 1 - -β = 1 - -L = m * n * t - -instance = "$(@__DIR__)/instances/$(L)_001.txt" - -ig = ising_graph(instance, L) - -states = collect.(all_states(rank_vec(ig))) -ρ = exp.(-β .* energy.(states, Ref(ig))) -Z = sum(ρ) - -@test gibbs_tensor(ig, β) ≈ ρ ./ Z - -fg = factor_graph( - ig, - energy=energy, - spectrum=full_spectrum, -) - -for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) - - peps = PepsNetwork(m, n, fg, β, origin) - - ψ = MPO(PEPSRow(peps, 1)) - - for i ∈ 2:peps.i_max - W = MPO(PEPSRow(peps, i)) - M = MPO(peps, i-1, i) - ψ = (ψ * M) * W - - @test length(W) == peps.j_max - for A ∈ ψ @test size(A, 2) == 1 end - - @test size(ψ[1], 1) == 1 == size(ψ[peps.j_max], 3) + ψ = MPO(eltype(ψ), peps, i) * ψ + @test ψ_all[i] ≈ ψ end - for A ∈ ψ @test size(A, 4) == 1 end - println(ψ) - - ZZ = [] - for A ∈ ψ push!(ZZ, dropdims(A, dims=(2, 4))) end - @test Z ≈ prod(ZZ)[] end end - -@testset "Boundary MPS bulids correctly" begin - m = 3 - n = 4 - t = 3 - - Dcut = 4 - tol = 1E-4 - max_sweeps = 4 - β = 1 - - L = m * n * t - - instance = "$(@__DIR__)/instances/pathological/test_$(m)_$(n)_$(t).txt" - - ig = ising_graph(instance, L) - update_cells!( - ig, - rule = square_lattice((m, n, t)), - ) - - fg = factor_graph( - ig, - energy=energy, - spectrum=full_spectrum, - ) - - x, y = m, n - for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) - peps = PepsNetwork(x, y, fg, β, origin) - @test typeof(peps) == PepsNetwork - - ψ = boundaryMPS(peps, Dcut, tol, max_sweeps) - @test typeof(ψ) == Vector{MPS} - end -end diff --git a/test/runtests.jl b/test/runtests.jl index 8b56340a..206bc01d 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -33,10 +33,10 @@ push!(my_tests, #"searchMPS.jl", #"spectrum.jl", #"graph.jl", - #"PEPS.jl", + "PEPS.jl", #"testing_probabilities_short.jl", #"testing_probabilities.jl", - "contract.jl", + #"contract.jl", #"indexing.jl", #"notation_tests.jl", #"peps_tests.jl", From ccda24bd39028c4f139ce6e314afd667021e0ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Sun, 7 Feb 2021 12:31:09 +0100 Subject: [PATCH 057/110] all test but Krzysieks pass --- src/PEPS.jl | 6 ++---- test/runtests.jl | 36 ++++++++++++++++++------------------ 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 5bdb4b23..0686460c 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -1,6 +1,5 @@ -export PepsNetwork -export MPO, MPS -export boundaryMPS, contract +export PepsNetwork, contract +export MPO, MPS, boundaryMPS mutable struct PepsNetwork size::NTuple{2, Int} @@ -72,7 +71,6 @@ function boundaryMPS( end push!(vec, ψ) end - if reversed reverse(vec) else vec end end diff --git a/test/runtests.jl b/test/runtests.jl index 206bc01d..4ed22e19 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -24,25 +24,25 @@ if CUDA.functional() && CUDA.has_cutensor() && false end push!(my_tests, - #"base.jl", - #"utils.jl", - #"contractions.jl", - #"compressions.jl", - #"ising.jl", - #"indexing.jl", - #"searchMPS.jl", - #"spectrum.jl", - #"graph.jl", + "base.jl", + "utils.jl", + "contractions.jl", + "compressions.jl", + "ising.jl", + "indexing.jl", + "searchMPS.jl", + "spectrum.jl", + "graph.jl", "PEPS.jl", - #"testing_probabilities_short.jl", - #"testing_probabilities.jl", - #"contract.jl", - #"indexing.jl", - #"notation_tests.jl", - #"peps_tests.jl", - #"mps_tests.jl", - #"tests_full_graph.jl", - #"tests_on_data.jl" + #"testing_probabilities_short.jl", # NO + #"testing_probabilities.jl", # NO + "contract.jl", + "indexing.jl", + "notation_tests.jl", + #"peps_tests.jl", # NO + #"mps_tests.jl", # NO + "tests_full_graph.jl", + "tests_on_data.jl" ) for my_test in my_tests From 51bf9287d67e67cc6174f7c1227f95fb1b7fcbd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Sun, 7 Feb 2021 14:35:17 +0100 Subject: [PATCH 058/110] start coding conditional_pdo --- src/PEPS.jl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/PEPS.jl b/src/PEPS.jl index 0686460c..c055b9ab 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -15,6 +15,7 @@ mutable struct PepsNetwork nbrs = Dict() for i ∈ 1:pn.i_max, j ∈ 1:pn.j_max + # v => (l, u, r, d) push!(nbrs, pn.map[i, j] => (pn.map[i, j-1], pn.map[i-1, j], pn.map[i, j+1], pn.map[i+1, j])) @@ -114,3 +115,14 @@ function LightGraphs.contract( end prod(dropdims(ψ))[] end + + +function conditional_pdo( + peps::PepsNetwork, + v::Int, + ∂v::Dict{Int, Int}, + config::Dict, + ) + + +end \ No newline at end of file From 0bad0f2b50767ba1aa6440d39184999e1c03c6d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Sun, 7 Feb 2021 20:08:00 +0100 Subject: [PATCH 059/110] testing Krzysiek's examples - no luck --- src/PEPS.jl | 55 +++++++++++++++++------------ test/peps_tests.jl | 2 +- test/runtests.jl | 28 +++++++-------- test/testing_probabilities_short.jl | 2 +- 4 files changed, 48 insertions(+), 39 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index c055b9ab..55b4845f 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -26,13 +26,13 @@ mutable struct PepsNetwork end generate_tensor(pn::PepsNetwork, - m::NTuple{2,Int} + m::NTuple{2,Int}, ) = generate_tensor(pn.network_graph, pn.map[m]) generate_tensor(pn::PepsNetwork, m::NTuple{2,Int}, - n::NTuple{2,Int} - ) = generate_tensor(pn.network_graph, pn.map[m], pn.map[n]) + n::NTuple{2,Int}, + ) = generate_tensor(pn.network_graph, pn.map[m], pn.map[n]) function PEPSRow(::Type{T}, peps::PepsNetwork, i::Int) where {T <: Number} ψ = PEPSRow(T, peps.j_max) @@ -54,26 +54,15 @@ function PEPSRow(::Type{T}, peps::PepsNetwork, i::Int) where {T <: Number} end PEPSRow(peps::PepsNetwork, i::Int) = PEPSRow(Float64, peps, i) -function boundaryMPS( - peps::PepsNetwork, - Dcut::Int=typemax(Int), - tol::Number=1E-8, - max_sweeps=4; - reversed::Bool=true - ) - - vec = [] - ψ = idMPS(peps.j_max) - - for i ∈ peps.i_max:-1:1 - ψ = MPO(eltype(ψ), peps, i) * ψ - if bond_dimension(ψ) > Dcut - ψ = compress(ψ, Dcut, tol, max_sweeps) - end - push!(vec, ψ) +function MPO(::Type{T}, R::PEPSRow) where {T <: Number} + W = MPO(T, length(R)) + for (j, A) ∈ enumerate(R) + @reduce B[l, u, r, d] |= sum(σ) A[l, u, r, d, σ] + W[j] = B end - if reversed reverse(vec) else vec end + W end +MPO(R::PEPSRow) = MPO(Float64, R) function MPO(::Type{T}, peps::PepsNetwork, @@ -98,6 +87,27 @@ MPO(peps::PepsNetwork, config::Dict{Int, Int} = Dict{Int, Int}() ) = MPO(Float64, peps, i, config) + function boundaryMPS( + peps::PepsNetwork, + Dcut::Int=typemax(Int), + tol::Number=1E-8, + max_sweeps=4; + reversed::Bool=true + ) + + vec = [] + ψ = idMPS(peps.j_max) + + for i ∈ peps.i_max:-1:1 + ψ = MPO(eltype(ψ), peps, i) * ψ + if bond_dimension(ψ) > Dcut + ψ = compress(ψ, Dcut, tol, max_sweeps) + end + push!(vec, ψ) + end + if reversed reverse(vec) else vec end + end + function LightGraphs.contract( peps::PepsNetwork, config::Dict{Int, Int} = Dict{Int, Int}(), @@ -121,8 +131,7 @@ function conditional_pdo( peps::PepsNetwork, v::Int, ∂v::Dict{Int, Int}, - config::Dict, + args::Dict, ) - end \ No newline at end of file diff --git a/test/peps_tests.jl b/test/peps_tests.jl index 77aa8eb0..f418e781 100644 --- a/test/peps_tests.jl +++ b/test/peps_tests.jl @@ -5,7 +5,7 @@ import SpinGlassPEPS: make_lower_mps, M2graph, graph4peps, fullM2grid! import SpinGlassPEPS: set_spin_from_letf, spin_index_from_left, spin_indices_from_above import SpinGlassPEPS: energy, solve import SpinGlassPEPS: dX_inds, merge_dX -import SpinGlassPEPS: peps_contract +import SpinGlassPEPS: contract Random.seed!(1234) diff --git a/test/runtests.jl b/test/runtests.jl index 4ed22e19..b687157a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -24,25 +24,25 @@ if CUDA.functional() && CUDA.has_cutensor() && false end push!(my_tests, - "base.jl", - "utils.jl", - "contractions.jl", - "compressions.jl", - "ising.jl", - "indexing.jl", - "searchMPS.jl", - "spectrum.jl", - "graph.jl", - "PEPS.jl", + #"base.jl", + #"utils.jl", + #"contractions.jl", + #"compressions.jl", + #"ising.jl", + #"indexing.jl", + #"searchMPS.jl", + #"spectrum.jl", + #"graph.jl", + #"PEPS.jl", #"testing_probabilities_short.jl", # NO #"testing_probabilities.jl", # NO "contract.jl", - "indexing.jl", - "notation_tests.jl", + #"indexing.jl", + #"notation_tests.jl", #"peps_tests.jl", # NO #"mps_tests.jl", # NO - "tests_full_graph.jl", - "tests_on_data.jl" + #"tests_full_graph.jl", + #"tests_on_data.jl" ) for my_test in my_tests diff --git a/test/testing_probabilities_short.jl b/test/testing_probabilities_short.jl index cc226de1..9c991c16 100644 --- a/test/testing_probabilities_short.jl +++ b/test/testing_probabilities_short.jl @@ -13,7 +13,7 @@ Mq[2,4] = Mq[4,2] = 0.566 Mq[3,4] = Mq[4,3] = 0.460 -@testset "testing marginal/conditional probabilities" begin + @testset "testing marginal/conditional probabilities" begin β = 3. g = M2graph(Mq, -1) From 54988df8507548d716c7b29df56e80cb00b34b12 Mon Sep 17 00:00:00 2001 From: kdomino Date: Mon, 8 Feb 2021 09:06:15 +0100 Subject: [PATCH 060/110] problematic tests --- src/peps_no_types.jl | 17 +++++++++++++++++ test/runtests.jl | 8 ++++---- test/testing_probabilities_short.jl | 6 ++++++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/peps_no_types.jl b/src/peps_no_types.jl index 346e6453..e9f8cb2e 100644 --- a/src/peps_no_types.jl +++ b/src/peps_no_types.jl @@ -350,6 +350,10 @@ function conditional_probabs(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps mpo = MPO(peps_row)[k+1:end] mpo = MPO(vcat([A], mpo)) + println("mpo") + for e in mpo + println(size(e)) + end CC = [project_spin_from_above(proj_u[i], spin[i], mpo[i]) for i in 1:length(mpo)] @@ -357,8 +361,21 @@ function conditional_probabs(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps lower_mps = MPS(boundary_mps[k:end]) + println("low") + for e in lower_mps + println(size(e)) + end + + println("up") + for e in upper_mps + println(size(e)) + end + println("...........") + + re = right_env(lower_mps, upper_mps)[1] + probs_unnormed = re*transpose(weight) objective = probs_unnormed./sum(probs_unnormed) diff --git a/test/runtests.jl b/test/runtests.jl index b687157a..8a1e0351 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -34,13 +34,13 @@ push!(my_tests, #"spectrum.jl", #"graph.jl", #"PEPS.jl", - #"testing_probabilities_short.jl", # NO - #"testing_probabilities.jl", # NO + "testing_probabilities_short.jl", # NO + "testing_probabilities.jl", # NO "contract.jl", #"indexing.jl", #"notation_tests.jl", - #"peps_tests.jl", # NO - #"mps_tests.jl", # NO + "peps_tests.jl", # NO + "mps_tests.jl", # NO #"tests_full_graph.jl", #"tests_on_data.jl" ) diff --git a/test/testing_probabilities_short.jl b/test/testing_probabilities_short.jl index 9c991c16..b6839367 100644 --- a/test/testing_probabilities_short.jl +++ b/test/testing_probabilities_short.jl @@ -45,6 +45,12 @@ Mq[3,4] = Mq[4,3] = 0.460 boundary_mps = boundaryMPS(peps, Dcut, tol, swep) + mb = boundary_mps[1] + pr = PEPSRow(peps, 1) + for i in 1:length(boundary_mps[1]) + @test size(mb[i], 2) == size(pr[i] ,4) + end + # initialize ps = Partial_sol{Float64}(Int[], 0.) From e50b1c86e338aad253ebb1a2ca6f8c51eda0e442 Mon Sep 17 00:00:00 2001 From: kdomino Date: Mon, 8 Feb 2021 10:19:10 +0100 Subject: [PATCH 061/110] a slight correction --- src/mps_implementation.jl | 10 ++++++---- test/runtests.jl | 5 +++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/mps_implementation.jl b/src/mps_implementation.jl index a187970e..dd8afd81 100644 --- a/src/mps_implementation.jl +++ b/src/mps_implementation.jl @@ -58,7 +58,7 @@ VE = Vector{LightGraphs.SimpleGraphs.SimpleEdge{Int}} function add_MPO!(mpo::AbstractMPO{T}, vec_edges::VE, g::MetaGraph, β::T) where T<: Real i = src(vec_edges[1]) - d = length(props(g, i)[:energy]) + d = 2 l = dst(vec_edges[end]) for j ∈ src(vec_edges[1]):dst(vec_edges[end]) @@ -79,7 +79,8 @@ end function add_phase!(mps::AbstractMPS{T}, g::MetaGraph, β::T) where T<: Real for i ∈ eachindex(mps) - internal_e = props(g, i)[:energy] + + internal_e = [props(g, i)[:h], -props(g, i)[:h]] for j ∈ eachindex(internal_e) mps[i][:,j,:] = mps[i][:,j,:]*exp(β/2*internal_e[j]) end @@ -196,7 +197,6 @@ end function solve_mps(g::MetaGraph, no_sols::Int; β::T, β_step::Int, χ::Int = 100, threshold::Float64 = 0.) where T <: Real - g = graph4mps(g) problem_size = nv(g) mps = construct_mps(g, β, β_step, χ, threshold) @@ -216,7 +216,9 @@ function solve_mps(g::MetaGraph, no_sols::Int; β::T, β_step::Int, χ::Int = 10 partial_s = select_best_solutions(partial_s_temp, no_sols) if j == problem_size - return return_solutions(partial_s, g) + partial_s = partial_s[end:-1:1] + + return [map(i -> 2*i - 3, ps.spins) for ps in partial_s], [ps.objective for ps in partial_s] end end end diff --git a/test/runtests.jl b/test/runtests.jl index 8a1e0351..86fc8136 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -23,6 +23,7 @@ if CUDA.functional() && CUDA.has_cutensor() && false ) end +include("test_helpers.jl") push!(my_tests, #"base.jl", #"utils.jl", @@ -41,8 +42,8 @@ push!(my_tests, #"notation_tests.jl", "peps_tests.jl", # NO "mps_tests.jl", # NO - #"tests_full_graph.jl", - #"tests_on_data.jl" + "tests_full_graph.jl", + "tests_on_data.jl" ) for my_test in my_tests From e9056a2dcc5c43255aca8f6c70fd951907d247ad Mon Sep 17 00:00:00 2001 From: kdomino Date: Mon, 8 Feb 2021 12:33:55 +0100 Subject: [PATCH 062/110] solved problem with probabilities --- src/PEPS.jl | 49 +++++++++++++++-------------- src/peps_no_types.jl | 35 +++++++-------------- test/runtests.jl | 10 +++--- test/testing_probabilities.jl | 36 +++++++-------------- test/testing_probabilities_short.jl | 15 +++++---- 5 files changed, 60 insertions(+), 85 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 55b4845f..3d7de7c2 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -25,12 +25,12 @@ mutable struct PepsNetwork end end -generate_tensor(pn::PepsNetwork, +generate_tensor(pn::PepsNetwork, m::NTuple{2,Int}, ) = generate_tensor(pn.network_graph, pn.map[m]) generate_tensor(pn::PepsNetwork, - m::NTuple{2,Int}, + m::NTuple{2,Int}, n::NTuple{2,Int}, ) = generate_tensor(pn.network_graph, pn.map[m], pn.map[n]) @@ -39,39 +39,40 @@ function PEPSRow(::Type{T}, peps::PepsNetwork, i::Int) where {T <: Number} # generate tensors from projectors for j ∈ 1:length(ψ) - ψ[j] = generate_tensor(peps, (i, j)) + ψ[j] = generate_tensor(peps, (i, j)) end - # include energy + # include energy for j ∈ 1:peps.j_max A = ψ[j] h = generate_tensor(peps, (i, j-1), (i, j)) v = generate_tensor(peps, (i-1, j), (i, j)) - @tensor B[l, u, r, d, σ] := h[l, l̃] * v[u, ũ] * A[l̃, ũ, r, d, σ] + @tensor B[l, u, r, d, σ] := h[l, l̃] * v[u, ũ] * A[l̃, ũ, r, d, σ] ψ[j] = B end ψ end PEPSRow(peps::PepsNetwork, i::Int) = PEPSRow(Float64, peps, i) +#= function MPO(::Type{T}, R::PEPSRow) where {T <: Number} W = MPO(T, length(R)) for (j, A) ∈ enumerate(R) @reduce B[l, u, r, d] |= sum(σ) A[l, u, r, d, σ] W[j] = B end - W + W end MPO(R::PEPSRow) = MPO(Float64, R) - -function MPO(::Type{T}, - peps::PepsNetwork, - i::Int, +=# +function MPO(::Type{T}, + peps::PepsNetwork, + i::Int, config::Dict{Int, Int} = Dict{Int, Int}() ) where {T <: Number} - + W = MPO(T, peps.j_max) - for (j, A) ∈ enumerate(PEPSRow(peps, i)) + for (j, A) ∈ enumerate(PEPSRow(peps, i)) v = get(config, j + peps.j_max * (i - 1), nothing) if v !== nothing @cast B[l, u, r, d] |= A[l, u, r, d, $(v)] @@ -80,26 +81,28 @@ function MPO(::Type{T}, end W[j] = B end - W + W end -MPO(peps::PepsNetwork, - i::Int, +MPO(peps::PepsNetwork, + i::Int, config::Dict{Int, Int} = Dict{Int, Int}() ) = MPO(Float64, peps, i, config) function boundaryMPS( peps::PepsNetwork, + range::Int=1, Dcut::Int=typemax(Int), tol::Number=1E-8, max_sweeps=4; reversed::Bool=true ) - - vec = [] + + vec = [] ψ = idMPS(peps.j_max) - - for i ∈ peps.i_max:-1:1 - ψ = MPO(eltype(ψ), peps, i) * ψ + push!(vec, ψ) + + for i ∈ peps.i_max:-1:range + ψ = MPO(eltype(ψ), peps, i) * ψ if bond_dimension(ψ) > Dcut ψ = compress(ψ, Dcut, tol, max_sweeps) end @@ -128,10 +131,10 @@ end function conditional_pdo( - peps::PepsNetwork, - v::Int, + peps::PepsNetwork, + v::Int, ∂v::Dict{Int, Int}, args::Dict, ) -end \ No newline at end of file +end diff --git a/src/peps_no_types.jl b/src/peps_no_types.jl index e9f8cb2e..7c81917b 100644 --- a/src/peps_no_types.jl +++ b/src/peps_no_types.jl @@ -296,8 +296,7 @@ p_r - peps row | | | | 1 --b_m1 --b_m2 -- b_m -- b_m -- 1 """ -function conditional_probabs(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps::MPS{T}, - peps_row::PEPSRow{T}) where T <: Number +function conditional_probabs(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps::MPS{T}) where T <: Number j = length(ps.spins) + 1 @@ -309,6 +308,8 @@ function conditional_probabs(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps if k == 0 k = peps.j_max end + row = ceil(Int, j/peps.j_max) + peps_row = PEPSRow(peps, row) # set from above # not in last row @@ -338,22 +339,23 @@ function conditional_probabs(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps proj_l, _, _ = projectors(fg, j-1, j) @reduce A[d, a, b, c] := sum(x) proj_l[$spin, x] * peps_row[$k][x, a, b, c, d] + D = Dict{Int, Int}() r = j-k+peps.j_max if j <= peps.j_max spin = [1 for _ in j:r] else spin = [ps.spins[i-peps.j_max] for i in j:r] + #for i in j:r + # push!(D, i => ps.spins[i-peps.j_max]) + #end end proj_u = [projectors(fg, i-peps.j_max, i)[1] for i in j:r] - mpo = MPO(peps_row)[k+1:end] + mpo = MPO(peps, row, D) + mpo = mpo[k+1:end] mpo = MPO(vcat([A], mpo)) - println("mpo") - for e in mpo - println(size(e)) - end CC = [project_spin_from_above(proj_u[i], spin[i], mpo[i]) for i in 1:length(mpo)] @@ -361,21 +363,8 @@ function conditional_probabs(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps lower_mps = MPS(boundary_mps[k:end]) - println("low") - for e in lower_mps - println(size(e)) - end - - println("up") - for e in upper_mps - println(size(e)) - end - println("...........") - - re = right_env(lower_mps, upper_mps)[1] - probs_unnormed = re*transpose(weight) objective = probs_unnormed./sum(probs_unnormed) @@ -476,7 +465,7 @@ function solve(g::MetaGraph, peps::PepsNetwork, no_sols::Int = 2; node_size::Tup gg = graph4peps(g, node_size, spectrum_cutoff = spectrum_cutoff) max_sweeps=4 - boundary_mps = boundaryMPS(peps, χ, threshold, max_sweeps) + boundary_mps = boundaryMPS(peps, 2, χ, threshold, max_sweeps) grid = props(gg)[:grid] @@ -488,8 +477,6 @@ function solve(g::MetaGraph, peps::PepsNetwork, no_sols::Int = 2; node_size::Tup vec_of_T = [compute_single_tensor(gg, j, β) for j ∈ grid[row,:]] - peps_row = PEPSRow(peps, row) - a = (row-1)*peps.j_max for k ∈ 1:peps.j_max @@ -502,7 +489,7 @@ function solve(g::MetaGraph, peps::PepsNetwork, no_sols::Int = 2; node_size::Tup partial_s = merge_dX(partial_s, dX, δH) for ps ∈ partial_s - o1 = conditional_probabs(peps, ps, boundary_mps[row], peps_row) + o1 = conditional_probabs(peps, ps, boundary_mps[row]) objectives = conditional_probabs(gg, ps, j, lower_mps, vec_of_T) diff --git a/test/runtests.jl b/test/runtests.jl index 86fc8136..b9174347 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -35,13 +35,13 @@ push!(my_tests, #"spectrum.jl", #"graph.jl", #"PEPS.jl", - "testing_probabilities_short.jl", # NO - "testing_probabilities.jl", # NO + "testing_probabilities_short.jl", + "testing_probabilities.jl", "contract.jl", - #"indexing.jl", + "indexing.jl", #"notation_tests.jl", - "peps_tests.jl", # NO - "mps_tests.jl", # NO + "peps_tests.jl", + "mps_tests.jl", "tests_full_graph.jl", "tests_on_data.jl" ) diff --git a/test/testing_probabilities.jl b/test/testing_probabilities.jl index a5176871..69cb8906 100644 --- a/test/testing_probabilities.jl +++ b/test/testing_probabilities.jl @@ -52,9 +52,8 @@ Mq[8,9] = Mq[9,8] = -0.05 ρ = exp.(-β .* energy.(states, Ref(g))) Z = sum(ρ) - println("grid of nodes") - display([1 2 ; 3 4]) - println() + # grid of nodes + #[1 2 ; 3 4] peps = PepsNetwork(2, 2, fg, β, origin) Dcut = 8 @@ -63,25 +62,25 @@ Mq[8,9] = Mq[9,8] = -0.05 z = contract(peps, Dict{Int, Int}()) @test z ≈ Z - boundary_mps = boundaryMPS(peps, Dcut, tol, sweep) + boundary_mps = boundaryMPS(peps, 2, Dcut, tol, sweep) # initialize ps = Partial_sol{Float64}(Int[], 0.) #node 1 - obj1 = conditional_probabs(peps, ps, boundary_mps[1], PEPSRow(peps, 1)) + obj1 = conditional_probabs(peps, ps, boundary_mps[1]) _, i = findmax(obj1) ps1 = update_partial_solution(ps, i, obj1[i]) # test all for i_1 in 1:16 - @test obj1[i_1] ≈ contract(peps, Dict{Int, Int}(1 => i_1))/z atol = 1e-3 + @test obj1[i_1] ≈ contract(peps, Dict{Int, Int}(1 => i_1))/z end # test chosen @test (props(fg, 1)[:spectrum]).states[i] == [bf.states[1][a] for a in [1,2,4,5]] # node 2 - obj2 = conditional_probabs(peps, ps1, boundary_mps[1], PEPSRow(peps, 1)) + obj2 = conditional_probabs(peps, ps1, boundary_mps[1]) obj2 = obj1[i].*obj2 _, j = findmax(obj2) ps2 = update_partial_solution(ps1, j, obj2[j]) @@ -90,47 +89,34 @@ Mq[8,9] = Mq[9,8] = -0.05 @test (props(fg, 2)[:spectrum]).states[j] == [bf.states[1][a] for a in [3,6]] for i_2 in 1:4 - @test obj2[i_2] ≈ contract(peps, Dict{Int, Int}(1 => i, 2 =>i_2))/z atol = 1e-3 + @test obj2[i_2] ≈ contract(peps, Dict{Int, Int}(1 => i, 2 =>i_2))/z end - println(" ............. node 3 ......") - println("tensor") - display(reshape(PEPSRow(peps, 2)[1], (4,2,4))) - println() - println("done from 2 spins, 2 bounds up and 1 left") - println("shoud be constructed of one couplung matrix (up) and projector (left)") - println("only 4 non-zero elements suggests 2 projectors or lacking elements") - println() # node 3 - obj3 = conditional_probabs(peps, ps2, boundary_mps[2], PEPSRow(peps, 2)) + obj3 = conditional_probabs(peps, ps2, boundary_mps[2]) obj3 = obj2[j].*obj3 _, k = findmax(obj3) ps3 = update_partial_solution(ps2, k, obj3[k]) for i_3 in 1:4 - @test obj3[i_3] ≈ contract(peps, Dict{Int, Int}(1 => i, 2 =>j, 3 => i_3))/z atol = 1e-3 + @test obj3[i_3] ≈ contract(peps, Dict{Int, Int}(1 => i, 2 =>j, 3 => i_3))/z end @test (props(fg, 3)[:spectrum]).states[k] == [bf.states[1][a] for a in [7,8]] #node 4 - obj4 = conditional_probabs(peps, ps3, boundary_mps[2], PEPSRow(peps, 2)) + obj4 = conditional_probabs(peps, ps3, boundary_mps[2]) obj4 = obj3[k].*obj4 _, l = findmax(obj4) for i_4 in 1:2 - @test obj4[i_4] ≈ contract(peps, Dict{Int, Int}(1 => i, 2 =>j, 3 => k, 4 => i_4))/z atol = 1e-3 + @test obj4[i_4] ≈ contract(peps, Dict{Int, Int}(1 => i, 2 =>j, 3 => k, 4 => i_4))/z end @test (props(fg, 4)[:spectrum]).states[l] == [bf.states[1][a] for a in [9]] - println(props(fg, 4)[:spectrum]) - - println(" .............. node 4 .............") - println("tensor should have no non-zero elements, should be composed of two coupling matrices") - display(reshape(PEPSRow(peps, 2)[2], (2,2,2))) end diff --git a/test/testing_probabilities_short.jl b/test/testing_probabilities_short.jl index b6839367..7c79694f 100644 --- a/test/testing_probabilities_short.jl +++ b/test/testing_probabilities_short.jl @@ -32,9 +32,8 @@ Mq[3,4] = Mq[4,3] = 0.460 ρ = exp.(-β .* energy.(states, Ref(g))) Z = sum(ρ) - println("grid of nodes") - display([1; 2]) - println() + # grid of nodes + # [1; 2] peps = PepsNetwork(2, 1, fg, β, :NW) Dcut = 8 @@ -43,7 +42,7 @@ Mq[3,4] = Mq[4,3] = 0.460 z = contract(peps, Dict{Int, Int}()) @test z ≈ Z - boundary_mps = boundaryMPS(peps, Dcut, tol, swep) + boundary_mps = boundaryMPS(peps, 2, Dcut, tol, swep) mb = boundary_mps[1] pr = PEPSRow(peps, 1) @@ -54,20 +53,20 @@ Mq[3,4] = Mq[4,3] = 0.460 # initialize ps = Partial_sol{Float64}(Int[], 0.) - obj1 = conditional_probabs(peps, ps, boundary_mps[1], PEPSRow(peps, 1)) + obj1 = conditional_probabs(peps, ps, boundary_mps[1]) _, i = findmax(obj1) ps1 = update_partial_solution(ps, i, obj1[i]) for i_1 in 1:4 - @test obj1[i_1] ≈ contract(peps, Dict{Int, Int}(1 => i_1))/z atol = 1e-3 + @test obj1[i_1] ≈ contract(peps, Dict{Int, Int}(1 => i_1))/z end - obj2 = conditional_probabs(peps, ps1, boundary_mps[2], PEPSRow(peps, 2)) + obj2 = conditional_probabs(peps, ps1, boundary_mps[2]) obj2 = obj1[i].*obj2 _, j = findmax(obj2) ps2 = update_partial_solution(ps1, j, obj2[j]) for i_2 in 1:4 - @test obj2[i_2] ≈ contract(peps, Dict{Int, Int}(1 => i, 2 =>i_2))/z atol = 1e-3 + @test obj2[i_2] ≈ contract(peps, Dict{Int, Int}(1 => i, 2 =>i_2))/z end end From b78172dd93e9cee819f708997b7787d09fb104e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Mon, 8 Feb 2021 15:10:52 +0100 Subject: [PATCH 063/110] all tests work --- src/PEPS.jl | 11 ----------- test/runtests.jl | 22 +++++++++++----------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 3d7de7c2..ff894586 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -54,17 +54,6 @@ function PEPSRow(::Type{T}, peps::PepsNetwork, i::Int) where {T <: Number} end PEPSRow(peps::PepsNetwork, i::Int) = PEPSRow(Float64, peps, i) -#= -function MPO(::Type{T}, R::PEPSRow) where {T <: Number} - W = MPO(T, length(R)) - for (j, A) ∈ enumerate(R) - @reduce B[l, u, r, d] |= sum(σ) A[l, u, r, d, σ] - W[j] = B - end - W -end -MPO(R::PEPSRow) = MPO(Float64, R) -=# function MPO(::Type{T}, peps::PepsNetwork, i::Int, diff --git a/test/runtests.jl b/test/runtests.jl index b9174347..35b74dcf 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -25,21 +25,21 @@ end include("test_helpers.jl") push!(my_tests, - #"base.jl", - #"utils.jl", - #"contractions.jl", - #"compressions.jl", - #"ising.jl", - #"indexing.jl", - #"searchMPS.jl", - #"spectrum.jl", - #"graph.jl", - #"PEPS.jl", + "base.jl", + "utils.jl", + "contractions.jl", + "compressions.jl", + "ising.jl", + "indexing.jl", + "searchMPS.jl", + "spectrum.jl", + "graph.jl", + "PEPS.jl", "testing_probabilities_short.jl", "testing_probabilities.jl", "contract.jl", "indexing.jl", - #"notation_tests.jl", + "notation_tests.jl", "peps_tests.jl", "mps_tests.jl", "tests_full_graph.jl", From 48e5e456c43f7f81a5485397a5dc8336e31b90c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Mon, 8 Feb 2021 17:29:17 +0100 Subject: [PATCH 064/110] add MPO from PEPSRow --- src/PEPS.jl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/PEPS.jl b/src/PEPS.jl index ff894586..9d7456cb 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -54,6 +54,17 @@ function PEPSRow(::Type{T}, peps::PepsNetwork, i::Int) where {T <: Number} end PEPSRow(peps::PepsNetwork, i::Int) = PEPSRow(Float64, peps, i) +function MPO(::Type{T}, R::PEPSRow) where {T <: Number} + W = MPO(T, length(R)) + for (j, A) ∈ enumerate(R) + @reduce B[l, u, r, d] |= sum(σ) A[l, u, r, d, σ] + W[j] = B + end + W + W +end +MPO(R::PEPSRow) = MPO(Float64, R) + function MPO(::Type{T}, peps::PepsNetwork, i::Int, From 746a4be215d967be39b888eb135f86b9d8218151 Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Mon, 8 Feb 2021 22:20:25 +0100 Subject: [PATCH 065/110] solve and solve_new give the same results --- src/MPS_search.jl | 1 - test/spectrum.jl | 37 +++++++++++++++++++++++++------------ 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/MPS_search.jl b/src/MPS_search.jl index e0cb519b..a9856e74 100644 --- a/src/MPS_search.jl +++ b/src/MPS_search.jl @@ -177,7 +177,6 @@ function multiply_purifications(χ::AbstractMPS, ϕ::AbstractMPS, L::Int) ψ[i] = B end ψ - end _holes(l::Int, nbrs::Vector) = setdiff(l+1 : last(nbrs), nbrs) diff --git a/test/spectrum.jl b/test/spectrum.jl index e71937c7..045963cb 100644 --- a/test/spectrum.jl +++ b/test/spectrum.jl @@ -140,41 +140,54 @@ end @test ϱ[idx.(σ)...] ≈ p end - for max_states ∈ [1, N, 2*N, N^2] + for max_states ∈ [N, 2*N, N^2] @info "Verifying low energy spectrum" max_states @info "Testing spectrum" states, prob, pCut = solve(rψ, max_states) sp = brute_force(ig, num_states = max_states) - - @info "The largest discarded probability" pCut - + + eng = zeros(length(prob)) + for (j, (p, e)) ∈ enumerate(zip(prob, sp.energies)) σ = states[:, j] + eng[j] = energy(σ, ig) @test ϱ[idx.(σ)...] ≈ p @test abs(energy(σ, ig) - e) < ϵ end + perm = partialsortperm(eng, 1:max_states) + eng = eng[perm] + states = states[:, perm] + prob = prob[perm] + state = states[:, 1] + @info "The largest discarded probability" pCut + @test maximum(prob) > pCut + @info "State with the lowest energy" state + @info "Probability of the state with the lowest energy" prob[1] + @info "The lowest energy" eng[1] + @info "Testing spectrum_new" states_new, prob_new, pCut_new = solve_new(rψ, max_states) - eng_new = zeros(length(prob_new)) - for (j, p) ∈ enumerate(prob_new) + for (j, p) ∈ enumerate(prob) σ = states_new[j, :] eng_new[j] = energy(σ, ig) end - perm = partialsortperm(eng_new, 1:max_states) - eng_new = eng_new[perm] - states_new = states_new[perm, :] - prob_new = prob_new[perm] - state = states_new[1, :] + perm_new = partialsortperm(eng_new, 1:max_states) + eng_new = eng_new[perm_new] + states_new = states_new[perm_new, :] + prob_new = prob_new[perm_new] + state_new = states_new[1, :] @info "The largest discarded probability" pCut_new @test maximum(prob_new) > pCut_new - @info "State with the lowest energy" state + @info "State with the lowest energy" state_new @info "Probability of the state with the lowest energy" prob_new[1] @info "The lowest energy" eng_new[1] + @test eng[1] == eng_new[1] + @test state == state_new end end From 5dc97c87d296ffb7593013fb3929477011683b09 Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Mon, 8 Feb 2021 23:11:13 +0100 Subject: [PATCH 066/110] unified solve and solve_new --- src/MPS_search.jl | 4 +++- test/searchMPS.jl | 7 +++---- test/spectrum.jl | 15 ++++++++------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/MPS_search.jl b/src/MPS_search.jl index a9856e74..89ebbba7 100644 --- a/src/MPS_search.jl +++ b/src/MPS_search.jl @@ -11,6 +11,7 @@ struct MPSControl end # ρ needs to be ∈ the right canonical form +#= function solve(ψ::MPS, keep::Int) @assert keep > 0 "Number of states has to be > 0" T = eltype(ψ) @@ -63,9 +64,10 @@ function solve(ψ::MPS, keep::Int) end states[:, 1:keep], prob[1:keep], pCut end +=# # ρ needs to be ∈ the right canonical form -function solve_new(ψ::MPS, keep::Int) +function solve(ψ::MPS, keep::Int) @assert keep > 0 "Number of states has to be > 0" T = eltype(ψ) diff --git a/test/searchMPS.jl b/test/searchMPS.jl index 77a12dc3..c5dc0493 100644 --- a/test/searchMPS.jl +++ b/test/searchMPS.jl @@ -43,9 +43,9 @@ states = all_states(get_prop(ig, :rank)) for max_states ∈ [1, N, 2*N, N^2] @info "Testing spectrum_new" - states_new1, prob_new1, pCut_new1 = solve_new(rψ1, max_states) - states_new2, prob_new2, pCut_new2 = solve_new(rψ2, max_states) - states_new3, prob_new3, pCut_new3 = solve_new(rψ3, max_states) + states_new1, prob_new1, pCut_new1 = solve(rψ1, max_states) + states_new2, prob_new2, pCut_new2 = solve(rψ2, max_states) + states_new3, prob_new3, pCut_new3 = solve(rψ3, max_states) for st ∈ states_new1 @test st ∈ states_new2 @@ -107,6 +107,5 @@ states = all_states(get_prop(ig, :rank)) @test eng_new1[1] == eng_new3[1] end - end end \ No newline at end of file diff --git a/test/spectrum.jl b/test/spectrum.jl index 045963cb..a09e7c94 100644 --- a/test/spectrum.jl +++ b/test/spectrum.jl @@ -140,7 +140,7 @@ end @test ϱ[idx.(σ)...] ≈ p end - for max_states ∈ [N, 2*N, N^2] + for max_states ∈ [1, N, 2*N, N^2] @info "Verifying low energy spectrum" max_states @info "Testing spectrum" @@ -150,23 +150,23 @@ end eng = zeros(length(prob)) for (j, (p, e)) ∈ enumerate(zip(prob, sp.energies)) - σ = states[:, j] + σ = states[j, :] eng[j] = energy(σ, ig) - @test ϱ[idx.(σ)...] ≈ p - @test abs(energy(σ, ig) - e) < ϵ + @test log(ϱ[idx.(σ)...]) ≈ p + #@test abs(energy(σ, ig) - e) < ϵ end perm = partialsortperm(eng, 1:max_states) eng = eng[perm] - states = states[:, perm] + states = states[perm, :] prob = prob[perm] - state = states[:, 1] + state = states[1, :] @info "The largest discarded probability" pCut @test maximum(prob) > pCut @info "State with the lowest energy" state @info "Probability of the state with the lowest energy" prob[1] @info "The lowest energy" eng[1] - +#= @info "Testing spectrum_new" states_new, prob_new, pCut_new = solve_new(rψ, max_states) eng_new = zeros(length(prob_new)) @@ -188,6 +188,7 @@ end @test eng[1] == eng_new[1] @test state == state_new + =# end end From 8028f9a904c8cdfb556ffafaddd5449c40c997e4 Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Mon, 8 Feb 2021 23:25:46 +0100 Subject: [PATCH 067/110] rename files --- test/{spectrum.jl => MPS_search.jl} | 0 test/{graph.jl => factor.jl} | 0 test/runtests.jl | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename test/{spectrum.jl => MPS_search.jl} (100%) rename test/{graph.jl => factor.jl} (100%) diff --git a/test/spectrum.jl b/test/MPS_search.jl similarity index 100% rename from test/spectrum.jl rename to test/MPS_search.jl diff --git a/test/graph.jl b/test/factor.jl similarity index 100% rename from test/graph.jl rename to test/factor.jl diff --git a/test/runtests.jl b/test/runtests.jl index 35b74dcf..ff216f49 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -32,8 +32,8 @@ push!(my_tests, "ising.jl", "indexing.jl", "searchMPS.jl", - "spectrum.jl", - "graph.jl", + "MPS_search.jl", + "factor.jl", "PEPS.jl", "testing_probabilities_short.jl", "testing_probabilities.jl", From f69d0b983abd719503ada32c766063f7cb2bc7bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 9 Feb 2021 10:53:46 +0100 Subject: [PATCH 068/110] start refactoring tests --- src/PEPS.jl | 23 ++++++----- test/base.jl | 99 ++++++++++++++++++++++++++++++------------------ test/runtests.jl | 36 +++++++++--------- 3 files changed, 92 insertions(+), 66 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 9d7456cb..661f0727 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -72,7 +72,7 @@ function MPO(::Type{T}, ) where {T <: Number} W = MPO(T, peps.j_max) - for (j, A) ∈ enumerate(PEPSRow(peps, i)) + for (j, A) ∈ enumerate(PEPSRow(T, peps, i)) v = get(config, j + peps.j_max * (i - 1), nothing) if v !== nothing @cast B[l, u, r, d] |= A[l, u, r, d, $(v)] @@ -88,20 +88,19 @@ MPO(peps::PepsNetwork, config::Dict{Int, Int} = Dict{Int, Int}() ) = MPO(Float64, peps, i, config) - function boundaryMPS( - peps::PepsNetwork, - range::Int=1, - Dcut::Int=typemax(Int), - tol::Number=1E-8, - max_sweeps=4; - reversed::Bool=true - ) +function boundaryMPS( + peps::PepsNetwork, + upTo::Int=1, + Dcut::Int=typemax(Int), + tol::Number=1E-8, + max_sweeps=4; + reversed::Bool=true + ) - vec = [] ψ = idMPS(peps.j_max) - push!(vec, ψ) + vec = [ψ] - for i ∈ peps.i_max:-1:range + for i ∈ peps.i_max:-1:upTo ψ = MPO(eltype(ψ), peps, i) * ψ if bond_dimension(ψ) > Dcut ψ = compress(ψ, Dcut, tol, max_sweeps) diff --git a/test/base.jl b/test/base.jl index d9ceb980..ca51a921 100644 --- a/test/base.jl +++ b/test/base.jl @@ -5,45 +5,74 @@ d = 4 sites = 5 T = ComplexF64 -@testset "Random MPS" begin - ψ = randn(MPS{T}, sites, D, d) - @test verify_bonds(ψ) == nothing - - @test ψ == ψ - @test ψ ≈ ψ - - @test length(ψ) == sites - @test size(ψ) == (sites, ) - @test eltype(ψ) == ComplexF64 - @test rank(ψ) == Tuple(fill(d, 1:sites)) - @test bond_dimension(ψ) ≈ D +@testset "Random MPS with the same physical dimension" begin - ϕ = copy(ψ) - @test ϕ == ψ - @test ϕ ≈ ψ + ψ = randn(MPS{T}, sites, D, d) - show(ψ) + @testset "has correct number of sites" begin + @test length(ψ) == sites + @test size(ψ) == (sites, ) + end + + @testset "has correct type" begin + @test eltype(ψ) == T + end + + @testset "has correct rank" begin + @test rank(ψ) == Tuple(fill(d, 1:sites)) + end + + @testset "has correct bonds" begin + @test bond_dimension(ψ) ≈ D + @test verify_bonds(ψ) === nothing + end + + @testset "is equal to itself" begin + @test ψ == ψ + @test ψ ≈ ψ + end + + @testset "is equal to its copy" begin + ϕ = copy(ψ) + @test ϕ == ψ + @test ϕ ≈ ψ + end +end + +@testset "Random MPS with varying physical dimension" begin dims = (3, 2, 5, 4) - @info "Veryfing ψ of arbitrary rank" dims - ψ = randn(MPS{T}, D, dims) - @test verify_bonds(ψ) == nothing - - @test ψ == ψ - @test ψ ≈ ψ - - @test length(ψ) == length(dims) - @test size(ψ) == (length(dims), ) - @test eltype(ψ) == ComplexF64 - @test rank(ψ) == dims - @test bond_dimension(ψ) ≈ D - - ϕ = copy(ψ) - @test ϕ == ψ - @test ϕ ≈ ψ - - show(ψ) + + @testset "has correct number of sites" begin + n = length(dims) + @test length(ψ) == n + @test size(ψ) == (n, ) + end + + @testset "has correct type" begin + @test eltype(ψ) == T + end + + @testset "has correct rank" begin + @test rank(ψ) == dims + end + + @testset "has correct bonds" begin + @test bond_dimension(ψ) ≈ D + @test verify_bonds(ψ) === nothing + end + + @testset "is equal to itself" begin + @test ψ == ψ + @test ψ ≈ ψ + end + + @testset "is equal to its copy" begin + ϕ = copy(ψ) + @test ϕ == ψ + @test ϕ ≈ ψ + end end @testset "Random MPO" begin @@ -79,7 +108,6 @@ end @test_nowarn verify_bonds(ψ) @test_nowarn verify_physical_dims(ψ, dims) @test is_right_normalized(ψ) - show(ψ) AA = tensor(ψ) @@ -99,7 +127,6 @@ end @test_nowarn verify_bonds(ϕ) @test_nowarn verify_physical_dims(ϕ, dims) @test is_left_normalized(ϕ) - show(ϕ) BB = tensor(ϕ) diff --git a/test/runtests.jl b/test/runtests.jl index 35b74dcf..f7e7abfd 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -26,24 +26,24 @@ end include("test_helpers.jl") push!(my_tests, "base.jl", - "utils.jl", - "contractions.jl", - "compressions.jl", - "ising.jl", - "indexing.jl", - "searchMPS.jl", - "spectrum.jl", - "graph.jl", - "PEPS.jl", - "testing_probabilities_short.jl", - "testing_probabilities.jl", - "contract.jl", - "indexing.jl", - "notation_tests.jl", - "peps_tests.jl", - "mps_tests.jl", - "tests_full_graph.jl", - "tests_on_data.jl" + #"utils.jl", + #"contractions.jl", + #"compressions.jl", + #"ising.jl", + #"indexing.jl", + #"searchMPS.jl", + #"spectrum.jl", + #"graph.jl", + #"PEPS.jl", + #"testing_probabilities_short.jl", + #"testing_probabilities.jl", + #"contract.jl", + #"indexing.jl", + #"notation_tests.jl", + #"peps_tests.jl", + #"mps_tests.jl", + #"tests_full_graph.jl", + #"tests_on_data.jl" ) for my_test in my_tests From 2af963fcc72d61d2c58f1dd8a4757f8761bb0584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 9 Feb 2021 11:32:44 +0100 Subject: [PATCH 069/110] remove redundanies --- src/PEPS.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 661f0727..bc6fe61e 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -61,7 +61,6 @@ function MPO(::Type{T}, R::PEPSRow) where {T <: Number} W[j] = B end W - W end MPO(R::PEPSRow) = MPO(Float64, R) From fb73de569cb901118bbfca198be7f228d98d2947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 9 Feb 2021 20:10:48 +0100 Subject: [PATCH 070/110] problem with idMPS --- src/PEPS.jl | 26 +++++++++++++------------- test/PEPS.jl | 5 +++-- test/runtests.jl | 20 ++++++++++---------- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index bc6fe61e..28da1e1f 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -95,19 +95,19 @@ function boundaryMPS( max_sweeps=4; reversed::Bool=true ) + #ψ = idMPS(peps.j_max) + ψ = MPS(I) + vec = Any[ψ] - ψ = idMPS(peps.j_max) - vec = [ψ] - - for i ∈ peps.i_max:-1:upTo - ψ = MPO(eltype(ψ), peps, i) * ψ - if bond_dimension(ψ) > Dcut - ψ = compress(ψ, Dcut, tol, max_sweeps) - end - push!(vec, ψ) + for i ∈ peps.i_max:-1:upTo + ψ = MPO(peps, i) * ψ + if bond_dimension(ψ) > Dcut + ψ = compress(ψ, Dcut, tol, max_sweeps) end - if reversed reverse(vec) else vec end + push!(vec, ψ) end + if reversed reverse(vec) else vec end +end function LightGraphs.contract( peps::PepsNetwork, @@ -116,10 +116,10 @@ function LightGraphs.contract( tol::Number=1E-8, max_sweeps=4, ) - - ψ = idMPS(peps.j_max) + + ψ = MPS(I) for i ∈ peps.i_max:-1:1 - ψ = MPO(eltype(ψ), peps, i, config) * ψ + ψ = MPO(peps, i, config) * ψ if bond_dimension(ψ) > Dcut ψ = compress(ψ, Dcut, tol, max_sweeps) end diff --git a/test/PEPS.jl b/test/PEPS.jl index c00dd56d..f6e02ada 100644 --- a/test/PEPS.jl +++ b/test/PEPS.jl @@ -28,6 +28,7 @@ t = 3 β = 1 L = m * n * t +T = Float64 instance = "$(@__DIR__)/instances/pathological/test_$(m)_$(n)_$(t).txt" @@ -50,11 +51,11 @@ for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) peps = PepsNetwork(x, y, fg, β, origin) @test typeof(peps) == PepsNetwork - ψ = idMPS(peps.j_max) + ψ = MPS(I) ψ_all = boundaryMPS(peps) for i ∈ peps.i_max:-1:1 - ψ = MPO(eltype(ψ), peps, i) * ψ + ψ = MPO(T, peps, i) * ψ @test ψ_all[i] ≈ ψ end end diff --git a/test/runtests.jl b/test/runtests.jl index f8f0f26d..f41ffb85 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -25,16 +25,16 @@ end include("test_helpers.jl") push!(my_tests, - "base.jl", - "utils.jl", - "contractions.jl", - "compressions.jl", - "identities.jl", - "ising.jl", - "indexing.jl", - "searchMPS.jl", - "MPS_search.jl", - "factor.jl", + #"base.jl", + #"utils.jl", + #"contractions.jl", + #"compressions.jl", + #"identities.jl", + #"ising.jl", + #"indexing.jl", + #"searchMPS.jl", + #"MPS_search.jl", + #"factor.jl", "PEPS.jl", "testing_probabilities_short.jl", "testing_probabilities.jl", From 907441216c7ab772fc6515938a8d0402a89f2053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 9 Feb 2021 21:58:54 +0100 Subject: [PATCH 071/110] fix idMPS for now --- src/PEPS.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 28da1e1f..933b0891 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -95,8 +95,8 @@ function boundaryMPS( max_sweeps=4; reversed::Bool=true ) - #ψ = idMPS(peps.j_max) - ψ = MPS(I) + ψ = idMPS(peps.j_max) + #ψ = MPS(I) vec = Any[ψ] for i ∈ peps.i_max:-1:upTo From e18d89aa39b2e623aa30240a7c28ac1f4807b7e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pawela?= Date: Tue, 9 Feb 2021 22:05:30 +0100 Subject: [PATCH 072/110] fix printing of Identities --- src/base.jl | 4 ++-- src/identities.jl | 10 +++++++++- src/peps_no_types.jl | 2 +- test/runtests.jl | 34 +++++++++++++++++----------------- 4 files changed, 29 insertions(+), 21 deletions(-) diff --git a/src/base.jl b/src/base.jl index 71216aa5..5d0e7b12 100644 --- a/src/base.jl +++ b/src/base.jl @@ -105,7 +105,7 @@ function _left_sweep_SVD(Θ::AbstractArray{T}, Dcut::Int=typemax(Int), args...) ψ end -function tensor(ψ::MPS, state::Union{Vector, NTuple}) +function tensor(ψ::AbstractMPS, state::Union{Vector, NTuple}) C = I for (A, σ) ∈ zip(ψ, state) C *= A[:, idx(σ), :] @@ -113,7 +113,7 @@ function tensor(ψ::MPS, state::Union{Vector, NTuple}) tr(C) end -function tensor(ψ::MPS) +function tensor(ψ::AbstractMPS) dims = rank(ψ) Θ = Array{eltype(ψ)}(undef, dims) diff --git a/src/identities.jl b/src/identities.jl index 18d620d5..d9766849 100644 --- a/src/identities.jl +++ b/src/identities.jl @@ -2,6 +2,8 @@ export IdentityMPO, IdentityMPS struct IdentityMPS{T <: Number} <: AbstractMPS{T} end struct IdentityMPO{T <: Number} <: AbstractMPO{T} end +const IdentityMPSorMPO = Union{IdentityMPO, IdentityMPS} + @inline Base.getindex(::IdentityMPS{T}, ::Int) where {T} = ones(T, 1, 1, 1) @inline Base.getindex(::IdentityMPO{T}, ::Int) where {T} = ones(T, 1, 1, 1, 1) @@ -10,6 +12,7 @@ MPO(::UniformScaling{T}) where {T} = IdentityMPO{T}() LinearAlgebra.dot(O::AbstractMPO, ::IdentityMPO) = O LinearAlgebra.dot(::IdentityMPO, O::AbstractMPO) = O +Base.length(::IdentityMPSorMPO) = Inf function LinearAlgebra.dot(O::AbstractMPO, ::IdentityMPS) L = length(O) @@ -23,4 +26,9 @@ function LinearAlgebra.dot(O::AbstractMPO, ::IdentityMPS) ψ end -LinearAlgebra.dot(::IdentityMPO, ψ::AbstractMPS) = ψ \ No newline at end of file +LinearAlgebra.dot(::IdentityMPO, ψ::AbstractMPS) = ψ + +function Base.show(::IO, ψ::IdentityMPSorMPO) + @info "Trivial matrix product state" + println(" ") +end \ No newline at end of file diff --git a/src/peps_no_types.jl b/src/peps_no_types.jl index 7c81917b..7f3e9a6b 100644 --- a/src/peps_no_types.jl +++ b/src/peps_no_types.jl @@ -296,7 +296,7 @@ p_r - peps row | | | | 1 --b_m1 --b_m2 -- b_m -- b_m -- 1 """ -function conditional_probabs(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps::MPS{T}) where T <: Number +function conditional_probabs(peps::PepsNetwork, ps::Partial_sol{T}, boundary_mps::AbstractMPS) where T <: Number j = length(ps.spins) + 1 diff --git a/test/runtests.jl b/test/runtests.jl index f41ffb85..6c19f138 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -25,26 +25,26 @@ end include("test_helpers.jl") push!(my_tests, - #"base.jl", - #"utils.jl", - #"contractions.jl", - #"compressions.jl", - #"identities.jl", - #"ising.jl", - #"indexing.jl", - #"searchMPS.jl", - #"MPS_search.jl", - #"factor.jl", + "base.jl", + "utils.jl", + "contractions.jl", + "compressions.jl", + "identities.jl", + "ising.jl", + "indexing.jl", + "searchMPS.jl", + "MPS_search.jl", + "factor.jl", "PEPS.jl", - "testing_probabilities_short.jl", - "testing_probabilities.jl", + # "testing_probabilities_short.jl", + # "testing_probabilities.jl", "contract.jl", "indexing.jl", - "notation_tests.jl", - "peps_tests.jl", - "mps_tests.jl", - "tests_full_graph.jl", - "tests_on_data.jl" + # "notation_tests.jl", + # "peps_tests.jl", + # "mps_tests.jl", + # "tests_full_graph.jl", + # "tests_on_data.jl" ) for my_test in my_tests From ef8dd73ca14be777f2cdd22bc338b6ca646301d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Tue, 9 Feb 2021 22:04:28 +0100 Subject: [PATCH 073/110] all test pass --- test/runtests.jl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 6c19f138..28b8a843 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -36,15 +36,15 @@ push!(my_tests, "MPS_search.jl", "factor.jl", "PEPS.jl", - # "testing_probabilities_short.jl", - # "testing_probabilities.jl", + "testing_probabilities_short.jl", + "testing_probabilities.jl", "contract.jl", "indexing.jl", - # "notation_tests.jl", - # "peps_tests.jl", - # "mps_tests.jl", - # "tests_full_graph.jl", - # "tests_on_data.jl" + "notation_tests.jl", + "peps_tests.jl", + "mps_tests.jl", + "tests_full_graph.jl", + "tests_on_data.jl" ) for my_test in my_tests From a1d3c7d38061e371329124bcbd51b3ba5ce5878d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Wed, 10 Feb 2021 14:56:52 +0100 Subject: [PATCH 074/110] chnage typos --- src/contractions.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/contractions.jl b/src/contractions.jl index f51b825d..e94e44d7 100644 --- a/src/contractions.jl +++ b/src/contractions.jl @@ -1,8 +1,8 @@ export left_env, right_env, dot! -# --------------------------- Conventions ------------------------ +# --------------------------- Conventions ----------------------- # -# MPS MPS* MPO left env left env +# MPS MPS* MPO left env right env # 2 2 2 - 1 2 - # 1 - A - 3 1 - B - 3 1 - W - 3 L R # 4 - 2 1 - From e2237c511e61f95917698bb234c574dc366edb35 Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Thu, 11 Feb 2021 13:48:18 +0100 Subject: [PATCH 075/110] add search --- src/PEPS.jl | 2 +- src/search.jl | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 src/search.jl diff --git a/src/PEPS.jl b/src/PEPS.jl index 933b0891..be564c8d 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -128,7 +128,7 @@ function LightGraphs.contract( end -function conditional_pdo( +function conditional_probability( peps::PepsNetwork, v::Int, ∂v::Dict{Int, Int}, diff --git a/src/search.jl b/src/search.jl new file mode 100644 index 00000000..b07a0fb4 --- /dev/null +++ b/src/search.jl @@ -0,0 +1,42 @@ +export search + +function merge(model, partial_sol, partial_eng) + for (i, s) ∈ enumerate(partial_sol) + boundary[i] = boundary(model, s) + end + idx = partition_into_unique(boundary, partial_eng) + idx +end + +function search(model, k) + partial_sol = [] + partial_energy = [] + marginal_prob = [] + + for v ∈ 1:model.size + for (i, p) ∈ enumerate(partial_sol) + cond_prob, new_sol[i] = conditional(model, p) + new_prob[i] = marginal_prob[i] * cond_prob + new_energy[i] = partial_energy[i] + energy_difference(model, p) + end + new_prob = vec(new_prob) + new_sol = vec(new_sol) + + idx = merge(model, new_sol, new_energy) + new_prob = new_prob[idx] + new_eng = new_eng[idx] + new_sol = new_sol[idx] + + partialsortperm!(perm, vec(new_prob), 1:k, rev=true) + marginal_prob = vec(new_prob)[perm] + partial_sol = reshape(new_sol, size(marginal_prob), v)[perm] + partial_eng = vec(new_energy)[perm] + lpCut < last(marginal_prob) ? lpCut = last(marginal_prob) : () + end + partialsortperm!(perm, vec(partial_eng), 1:size(partial_eng), rev=true) + prob = vec(marginal_prob)[perm] + sol = reshape(partial_sol, size(marginal_prob), v)[perm] + eng = vec(partial_energy)[perm] + + eng, sol, prob, lpCut +end \ No newline at end of file From 7f3ba2c796f9f4d1e5aac52b6b577f3b1846c068 Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Thu, 11 Feb 2021 14:56:39 +0100 Subject: [PATCH 076/110] add conditional_probability --- src/PEPS.jl | 25 ++++++++++++++++++++++--- src/search.jl | 2 +- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index be564c8d..85891761 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -130,9 +130,28 @@ end function conditional_probability( peps::PepsNetwork, - v::Int, - ∂v::Dict{Int, Int}, - args::Dict, + v::Union(Vector{Int}, NTuple{Int}), ) + k = length(v) + i = ceil(k/peps.j_max) + j = (k-1) % peps.j_max + 1 + + ∂v = boundary(peps, v) + ψ = boundary_MPS(peps, i+1) + W = MPO(peps, i) + + L = left_env(ψ, ∂v[1:j-1]) + R = right_env(ψ, W, ∂v[j+2:peps.j_max+1]) + A = generate_tensor(peps, i, j) + prob = contract(A, L, R, ∂v[j:j+1]) + normalize_prob(prob) end + +function boundary( + peps::PepsNetwork, + v::Union(Vector{Int}, NTuple{Int}), + ) + + ∂v +end \ No newline at end of file diff --git a/src/search.jl b/src/search.jl index b07a0fb4..5388b218 100644 --- a/src/search.jl +++ b/src/search.jl @@ -15,7 +15,7 @@ function search(model, k) for v ∈ 1:model.size for (i, p) ∈ enumerate(partial_sol) - cond_prob, new_sol[i] = conditional(model, p) + cond_prob, new_sol[i] = conditional_probability(model, p) new_prob[i] = marginal_prob[i] * cond_prob new_energy[i] = partial_energy[i] + energy_difference(model, p) end From 4ac997f4d1863d417d8d1ef58191d81ba3a71b57 Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Thu, 11 Feb 2021 16:57:53 +0100 Subject: [PATCH 077/110] correction --- src/PEPS.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 85891761..6727a6f9 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -130,7 +130,7 @@ end function conditional_probability( peps::PepsNetwork, - v::Union(Vector{Int}, NTuple{Int}), + v::Union{Vector{Int}, NTuple{Int}}, ) k = length(v) From ffa6bfb7ce3e5061bcbfa5c8ab3525593b6f2e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Thu, 11 Feb 2021 21:15:55 +0100 Subject: [PATCH 078/110] start using cache, still mess --- src/PEPS.jl | 47 +++++++++++++++++++++++++++++++++++++++++------ src/network.jl | 4 ++-- test/runtests.jl | 6 +++++- 3 files changed, 48 insertions(+), 9 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 85891761..56914c3d 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -54,6 +54,8 @@ function PEPSRow(::Type{T}, peps::PepsNetwork, i::Int) where {T <: Number} end PEPSRow(peps::PepsNetwork, i::Int) = PEPSRow(Float64, peps, i) +#= +to be removed function MPO(::Type{T}, R::PEPSRow) where {T <: Number} W = MPO(T, length(R)) for (j, A) ∈ enumerate(R) @@ -63,6 +65,7 @@ function MPO(::Type{T}, R::PEPSRow) where {T <: Number} W end MPO(R::PEPSRow) = MPO(Float64, R) +=# function MPO(::Type{T}, peps::PepsNetwork, @@ -87,6 +90,8 @@ MPO(peps::PepsNetwork, config::Dict{Int, Int} = Dict{Int, Int}() ) = MPO(Float64, peps, i, config) +#= +# to be removed function boundaryMPS( peps::PepsNetwork, upTo::Int=1, @@ -108,7 +113,25 @@ function boundaryMPS( end if reversed reverse(vec) else vec end end +=# +function compress(ψ::AbstractMPS, peps::PepsNetwork) + if bond_dimension(ψ) < Dcut return ψ end + crt = peps.control_parameters + compress(ψ, crt["Dcut"], crt["tol"], crt["sweeps"]) +end + +@memoize function MPS( + peps::PepsNetwork, + i::Int, + cfg::Dict{Int, Int} = Dict{Int, Int}(), + ) + if i > peps.i_max return MPS(I) end + W, ψ = MPO(peps, i, cfg), MPS(peps, i+1, cfg) + compress(peps, W * ψ) +end +# to be removed +#= function LightGraphs.contract( peps::PepsNetwork, config::Dict{Int, Int} = Dict{Int, Int}(), @@ -126,25 +149,36 @@ function LightGraphs.contract( end prod(dropdims(ψ))[] end +=# +function contract_network( + peps::PepsNetwork, + config::Dict{Int, Int} = Dict{Int, Int}(), + ) + ψ = MPS(peps, 1, config) + prod(dropdims(ψ))[] +end +#= function conditional_probability( peps::PepsNetwork, - v::Union(Vector{Int}, NTuple{Int}), + v::Union{Vector{Int}, NTupel{Int}}, ) - k = length(v) - i = ceil(k/peps.j_max) - j = (k-1) % peps.j_max + 1 + i = ceil(length(v) / peps.j_max) + j = (length(v) - 1) % peps.j_max + 1 ∂v = boundary(peps, v) - ψ = boundary_MPS(peps, i+1) + + ψ = MPS(peps, i+1) W = MPO(peps, i) L = left_env(ψ, ∂v[1:j-1]) R = right_env(ψ, W, ∂v[j+2:peps.j_max+1]) A = generate_tensor(peps, i, j) + prob = contract(A, L, R, ∂v[j:j+1]) + normalize_prob(prob) end @@ -154,4 +188,5 @@ function boundary( ) ∂v -end \ No newline at end of file +end +=# \ No newline at end of file diff --git a/src/network.jl b/src/network.jl index dd27ef1e..e50ce78b 100644 --- a/src/network.jl +++ b/src/network.jl @@ -21,7 +21,7 @@ mutable struct NetworkGraph end end -function generate_tensor(ng::NetworkGraph, v::Int) +@memoize function generate_tensor(ng::NetworkGraph, v::Int) fg = ng.factor_graph loc_exp = exp.(-ng.β .* get_prop(fg, v, :loc_en)) @@ -44,7 +44,7 @@ function generate_tensor(ng::NetworkGraph, v::Int) reshape(tensor, dim..., :) end -function generate_tensor(ng::NetworkGraph, v::Int, w::Int) +@memoize function generate_tensor(ng::NetworkGraph, v::Int, w::Int) fg = ng.factor_graph if has_edge(fg, w, v) _, e, _ = get_prop(fg, w, v, :split) diff --git a/test/runtests.jl b/test/runtests.jl index 28b8a843..5d1a1a56 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -25,6 +25,7 @@ end include("test_helpers.jl") push!(my_tests, +#= "base.jl", "utils.jl", "contractions.jl", @@ -35,8 +36,10 @@ push!(my_tests, "searchMPS.jl", "MPS_search.jl", "factor.jl", +=# "PEPS.jl", - "testing_probabilities_short.jl", +#= + "testing_probabilities_short.jl", "testing_probabilities.jl", "contract.jl", "indexing.jl", @@ -45,6 +48,7 @@ push!(my_tests, "mps_tests.jl", "tests_full_graph.jl", "tests_on_data.jl" +=# ) for my_test in my_tests From 5d84b35d5a0900318293d85646d69ef0b942901d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Fri, 12 Feb 2021 10:13:42 +0100 Subject: [PATCH 079/110] add _set_control_parameters --- src/PEPS.jl | 97 ++++++++++++++++---------------------------- src/contractions.jl | 4 +- src/ising.jl | 2 +- test/PEPS.jl | 4 +- test/contractions.jl | 6 +-- 5 files changed, 41 insertions(+), 72 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 56914c3d..d7a62c05 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -1,6 +1,23 @@ export PepsNetwork, contract export MPO, MPS, boundaryMPS +function _set_control_parameters( + args_override::Dict{String, Number}=Dict{String, Number}() + ) + # put here more parameters if needs be + args = Dict( + "bond_dim" => typemax(Int), + "var_tol" => 1E-8, + "sweeps" => 4., + "β" => 1. + ) + for k in keys(args_override) + str = get(args_override, k, nothing) + if str !== nothing push!(args, str) end + end + args +end + mutable struct PepsNetwork size::NTuple{2, Int} map::Dict @@ -8,8 +25,17 @@ mutable struct PepsNetwork origin::Symbol i_max::Int j_max::Int + args::Dict{String, Number} + + function PepsNetwork( + m::Int, + n::Int, + fg::MetaDiGraph, + β::Number, + origin::Symbol=:NW, + args_override::Dict{String, Number}=Dict{String, Number}() + ) - function PepsNetwork(m::Int, n::Int, fg::MetaDiGraph, β::Number, origin::Symbol=:NW) pn = new((m, n)) pn.map, pn.i_max, pn.j_max = LinearIndices(m, n, origin) @@ -21,6 +47,7 @@ mutable struct PepsNetwork pn.map[i, j+1], pn.map[i+1, j])) end pn.network_graph = NetworkGraph(fg, nbrs, β) + pn.args = _set_control_parameters(args_override) pn end end @@ -54,19 +81,6 @@ function PEPSRow(::Type{T}, peps::PepsNetwork, i::Int) where {T <: Number} end PEPSRow(peps::PepsNetwork, i::Int) = PEPSRow(Float64, peps, i) -#= -to be removed -function MPO(::Type{T}, R::PEPSRow) where {T <: Number} - W = MPO(T, length(R)) - for (j, A) ∈ enumerate(R) - @reduce B[l, u, r, d] |= sum(σ) A[l, u, r, d, σ] - W[j] = B - end - W -end -MPO(R::PEPSRow) = MPO(Float64, R) -=# - function MPO(::Type{T}, peps::PepsNetwork, i::Int, @@ -74,7 +88,9 @@ function MPO(::Type{T}, ) where {T <: Number} W = MPO(T, peps.j_max) - for (j, A) ∈ enumerate(PEPSRow(T, peps, i)) + R = PEPSRow(T, peps, i) + + for (j, A) ∈ enumerate(R) v = get(config, j + peps.j_max * (i - 1), nothing) if v !== nothing @cast B[l, u, r, d] |= A[l, u, r, d, $(v)] @@ -90,34 +106,10 @@ MPO(peps::PepsNetwork, config::Dict{Int, Int} = Dict{Int, Int}() ) = MPO(Float64, peps, i, config) -#= -# to be removed -function boundaryMPS( - peps::PepsNetwork, - upTo::Int=1, - Dcut::Int=typemax(Int), - tol::Number=1E-8, - max_sweeps=4; - reversed::Bool=true - ) - ψ = idMPS(peps.j_max) - #ψ = MPS(I) - vec = Any[ψ] - - for i ∈ peps.i_max:-1:upTo - ψ = MPO(peps, i) * ψ - if bond_dimension(ψ) > Dcut - ψ = compress(ψ, Dcut, tol, max_sweeps) - end - push!(vec, ψ) - end - if reversed reverse(vec) else vec end -end -=# function compress(ψ::AbstractMPS, peps::PepsNetwork) + Dcut = peps.args["bond_dim"] if bond_dimension(ψ) < Dcut return ψ end - crt = peps.control_parameters - compress(ψ, crt["Dcut"], crt["tol"], crt["sweeps"]) + compress(ψ, Dcut, peps.args["var_tol"], peps.args["sweeps"]) end @memoize function MPS( @@ -127,29 +119,8 @@ end ) if i > peps.i_max return MPS(I) end W, ψ = MPO(peps, i, cfg), MPS(peps, i+1, cfg) - compress(peps, W * ψ) -end - -# to be removed -#= -function LightGraphs.contract( - peps::PepsNetwork, - config::Dict{Int, Int} = Dict{Int, Int}(), - Dcut::Int=typemax(Int), - tol::Number=1E-8, - max_sweeps=4, - ) - - ψ = MPS(I) - for i ∈ peps.i_max:-1:1 - ψ = MPO(peps, i, config) * ψ - if bond_dimension(ψ) > Dcut - ψ = compress(ψ, Dcut, tol, max_sweeps) - end - end - prod(dropdims(ψ))[] + compress(W * ψ, peps) end -=# function contract_network( peps::PepsNetwork, diff --git a/src/contractions.jl b/src/contractions.jl index d654c91c..f7bf9cd3 100644 --- a/src/contractions.jl +++ b/src/contractions.jl @@ -54,7 +54,7 @@ end if l == 0 L = [1.] else - m = idx(σ[l]) + m = σ[l] L̃ = left_env(ϕ, σ[1:l-1]) M = ϕ[l] @reduce L[x] := sum(α) L̃[α] * M[α, $m, x] @@ -87,7 +87,7 @@ end if l == 0 R = ones(1, 1) else - m = idx(σ[1]) + m = σ[1] R̃ = right_env(ϕ, W, σ[2:l]) M = ϕ[k-l+1] M̃ = W[k-l+1] diff --git a/src/ising.jl b/src/ising.jl index def3d2e4..925edd07 100644 --- a/src/ising.jl +++ b/src/ising.jl @@ -78,7 +78,7 @@ function ising_graph( rank = Dict{Int, Int}() for v in vertices(ig) if get_prop(ig, v, :active) - rank[v] = get(rank_override, v, 2) + rank[v] = get(rank_override, v, 2) # TODO: this can not be 2 end end set_prop!(ig, :rank, rank) diff --git a/test/PEPS.jl b/test/PEPS.jl index f6e02ada..0a07a006 100644 --- a/test/PEPS.jl +++ b/test/PEPS.jl @@ -52,11 +52,9 @@ for origin ∈ (:NW, :SW, :WS, :WN, :NE, :EN, :SE, :ES) @test typeof(peps) == PepsNetwork ψ = MPS(I) - ψ_all = boundaryMPS(peps) - for i ∈ peps.i_max:-1:1 ψ = MPO(T, peps, i) * ψ - @test ψ_all[i] ≈ ψ + @test MPS(peps, i) ≈ ψ end end diff --git a/test/contractions.jl b/test/contractions.jl index ec04914d..eedc5597 100644 --- a/test/contractions.jl +++ b/test/contractions.jl @@ -43,7 +43,7 @@ end T = ComplexF64 ψ = randn(MPS{T}, sites, D, d) - σ = 2 * (rand(sites) .< 0.5) .- 1 + σ = (1, 2, 2, 1, 2) @test tensor(ψ, σ) ≈ left_env(ψ, σ)[] end @@ -57,11 +57,11 @@ end ψ = randn(MPS{T}, sites, D, d) W = randn(MPO{T}, sites, D, d) - σ = 2 * (rand(sites) .< 0.5) .- 1 + σ = (1, 1, 2, 1, 2) ϕ = MPS(T, sites) for (i, A) ∈ enumerate(W) - m = idx(σ[i]) + m = σ[i] @cast B[x, s, y] := A[x, $m, y, s] ϕ[i] = B end From 20c7d01be8e929a50d668106f4c263464ba0eaf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Fri, 12 Feb 2021 11:07:58 +0100 Subject: [PATCH 080/110] all tests but Krzysieks pass --- src/PEPS.jl | 2 +- src/contractions.jl | 2 ++ test/contract.jl | 2 +- test/contractions.jl | 10 +++++----- test/runtests.jl | 14 +++++++++----- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index d7a62c05..fe355abc 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -1,4 +1,4 @@ -export PepsNetwork, contract +export PepsNetwork, contract_network export MPO, MPS, boundaryMPS function _set_control_parameters( diff --git a/src/contractions.jl b/src/contractions.jl index f7bf9cd3..14009daa 100644 --- a/src/contractions.jl +++ b/src/contractions.jl @@ -62,6 +62,7 @@ end L end +#= # NOT tested yet function right_env(ϕ::AbstractMPS, ψ::AbstractMPS) L = length(ψ) @@ -80,6 +81,7 @@ function right_env(ϕ::AbstractMPS, ψ::AbstractMPS) end R end +=# @memoize function right_env(ϕ::AbstractMPS, W::AbstractMPO, σ::Union{Vector, NTuple}) l = length(σ) diff --git a/test/contract.jl b/test/contract.jl index c0b75673..5b5fbe77 100644 --- a/test/contract.jl +++ b/test/contract.jl @@ -38,7 +38,7 @@ Z = [] for origin ∈ (:NW, :SW, :WS, :WN) peps = PepsNetwork(m, n, fg, β, origin) - p = contract(peps, cfg) + p = contract_network(peps, cfg) push!(Z, p) end diff --git a/test/contractions.jl b/test/contractions.jl index eedc5597..0531719a 100644 --- a/test/contractions.jl +++ b/test/contractions.jl @@ -43,9 +43,9 @@ end T = ComplexF64 ψ = randn(MPS{T}, sites, D, d) - σ = (1, 2, 2, 1, 2) + σ = 2 * (rand(sites) .< 0.5) .- 1 - @test tensor(ψ, σ) ≈ left_env(ψ, σ)[] + @test tensor(ψ, σ) ≈ left_env(ψ, map(idx, σ))[] end @testset "right_env correctly contracts MPO with MPS for a given configuration" begin @@ -57,16 +57,16 @@ end ψ = randn(MPS{T}, sites, D, d) W = randn(MPO{T}, sites, D, d) - σ = (1, 1, 2, 1, 2) + σ = 2 * (rand(sites) .< 0.5) .- 1 ϕ = MPS(T, sites) for (i, A) ∈ enumerate(W) - m = σ[i] + m = idx(σ[i]) @cast B[x, s, y] := A[x, $m, y, s] ϕ[i] = B end - @test dot(ψ, ϕ) ≈ right_env(ψ, W, σ)[] + @test dot(ψ, ϕ) ≈ right_env(ψ, W, map(idx, σ))[] end diff --git a/test/runtests.jl b/test/runtests.jl index 5d1a1a56..e0504fbe 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -36,14 +36,18 @@ push!(my_tests, "searchMPS.jl", "MPS_search.jl", "factor.jl", -=# "PEPS.jl", -#= - "testing_probabilities_short.jl", - "testing_probabilities.jl", +=# +#= +# to be removed + "testing_probabilities_short.jl", # to be removed + "testing_probabilities.jl", # to be removed +=# "contract.jl", "indexing.jl", - "notation_tests.jl", +#= +# to be removed + "notation_tests.jl", "peps_tests.jl", "mps_tests.jl", "tests_full_graph.jl", From 47bacbef0b082c20b05fdeae3df0edd4b8b5e006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Fri, 12 Feb 2021 11:46:00 +0100 Subject: [PATCH 081/110] add functions signatires --- src/PEPS.jl | 51 ++++++++++++++++++++++++++++----------------- src/contractions.jl | 21 ------------------- test/runtests.jl | 19 ++++------------- 3 files changed, 36 insertions(+), 55 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index fe355abc..8ef0962a 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -81,7 +81,7 @@ function PEPSRow(::Type{T}, peps::PepsNetwork, i::Int) where {T <: Number} end PEPSRow(peps::PepsNetwork, i::Int) = PEPSRow(Float64, peps, i) -function MPO(::Type{T}, +@memoize function MPO(::Type{T}, peps::PepsNetwork, i::Int, config::Dict{Int, Int} = Dict{Int, Int}() @@ -130,34 +130,47 @@ function contract_network( prod(dropdims(ψ))[] end -#= -function conditional_probability( +function _get_coordinates(peps::PepsNetwork, v::Int) + k = length(v) + ceil(k / peps.j_max), (k - 1) % peps.j_max + 1 +end + +function get_boundary( peps::PepsNetwork, - v::Union{Vector{Int}, NTupel{Int}}, + v::Union{Vector{Int}, NTuple{Int}}, ) - i = ceil(length(v) / peps.j_max) - j = (length(v) - 1) % peps.j_max + 1 +end + +function _contract( + A::Array{T, 5}, + L::Vector{T} + R:: Matric{T}, + ∂v[j:j+1]::NTuple{Int} + ) where {T <: Number} + +end + +function _normalize_prob(prob::Vector{T}) where {T <: Number} + prob +end + +function conditional_probability( + peps::PepsNetwork, + v::Union{Vector{Int}, NTuple{Int}}, + ) - ∂v = boundary(peps, v) + i, j = _get_coordinates(peps, v) + ∂v = get_boundary(peps, v) - ψ = MPS(peps, i+1) - W = MPO(peps, i) + W, ψ = MPO(peps, i), MPS(peps, i+1) L = left_env(ψ, ∂v[1:j-1]) R = right_env(ψ, W, ∂v[j+2:peps.j_max+1]) A = generate_tensor(peps, i, j) - prob = contract(A, L, R, ∂v[j:j+1]) + prob = _contract(A, L, R, ∂v[j:j+1]) - normalize_prob(prob) + _normalize_prob(prob) end -function boundary( - peps::PepsNetwork, - v::Union(Vector{Int}, NTuple{Int}), - ) - - ∂v -end -=# \ No newline at end of file diff --git a/src/contractions.jl b/src/contractions.jl index 14009daa..859612f9 100644 --- a/src/contractions.jl +++ b/src/contractions.jl @@ -62,27 +62,6 @@ end L end -#= -# NOT tested yet -function right_env(ϕ::AbstractMPS, ψ::AbstractMPS) - L = length(ψ) - T = promote_type(eltype(ψ), eltype(ϕ)) - - R = Vector{Matrix{T}}(undef, L+1) - R[end] = ones(eltype(ψ), 1, 1) - - for i ∈ L:-1:1 - M = ψ[i] - M̃ = conj.(ϕ[i]) - - D = R[i+1] - @tensor D[x, y] := M[x, σ, α] * D[α, β] * M̃[y, σ, β] order = (β, α, σ) - R[i] = D - end - R -end -=# - @memoize function right_env(ϕ::AbstractMPS, W::AbstractMPO, σ::Union{Vector, NTuple}) l = length(σ) k = length(ϕ) diff --git a/test/runtests.jl b/test/runtests.jl index e0504fbe..9ed418dc 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -25,7 +25,6 @@ end include("test_helpers.jl") push!(my_tests, -#= "base.jl", "utils.jl", "contractions.jl", @@ -37,22 +36,12 @@ push!(my_tests, "MPS_search.jl", "factor.jl", "PEPS.jl", -=# -#= -# to be removed - "testing_probabilities_short.jl", # to be removed - "testing_probabilities.jl", # to be removed -=# + #"testing_probabilities_short.jl", # to be removed + #"testing_probabilities.jl", # to be removed "contract.jl", "indexing.jl", -#= -# to be removed - "notation_tests.jl", - "peps_tests.jl", - "mps_tests.jl", - "tests_full_graph.jl", - "tests_on_data.jl" -=# + #"notation_tests.jl", # to be removed + #"peps_tests.jl" # to be removed ) for my_test in my_tests From a39a3487645c2370d799fb955e69c4fa51afb2bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Fri, 12 Feb 2021 11:48:50 +0100 Subject: [PATCH 082/110] clean up --- src/PEPS.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 8ef0962a..c31a2abd 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -145,8 +145,8 @@ end function _contract( A::Array{T, 5}, L::Vector{T} - R:: Matric{T}, - ∂v[j:j+1]::NTuple{Int} + R::Matric{T}, + ∂v[j:j+1]::NTuple{Int}, ) where {T <: Number} end From 02869e3cff821545146fc43ab2af9975a4f67827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Fri, 12 Feb 2021 13:33:03 +0100 Subject: [PATCH 083/110] all test but Krzysiek's pass --- src/PEPS.jl | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index c31a2abd..883339b9 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -81,7 +81,7 @@ function PEPSRow(::Type{T}, peps::PepsNetwork, i::Int) where {T <: Number} end PEPSRow(peps::PepsNetwork, i::Int) = PEPSRow(Float64, peps, i) -@memoize function MPO(::Type{T}, +function MPO(::Type{T}, peps::PepsNetwork, i::Int, config::Dict{Int, Int} = Dict{Int, Int}() @@ -130,24 +130,27 @@ function contract_network( prod(dropdims(ψ))[] end -function _get_coordinates(peps::PepsNetwork, v::Int) +function _get_coordinates( + peps::PepsNetwork, + v::Union{Vector{Int}, NTuple{N, Int}}, + ) where {N} k = length(v) ceil(k / peps.j_max), (k - 1) % peps.j_max + 1 end function get_boundary( peps::PepsNetwork, - v::Union{Vector{Int}, NTuple{Int}}, - ) + v::Union{Vector{Int}, NTuple{N, Int}}, + ) where {N} end function _contract( A::Array{T, 5}, - L::Vector{T} - R::Matric{T}, - ∂v[j:j+1]::NTuple{Int}, - ) where {T <: Number} + L::Vector{T}, + R::Matrix{T}, + ∂v::NTuple{N, Int}, + ) where {N, T <: Number} end @@ -157,8 +160,8 @@ end function conditional_probability( peps::PepsNetwork, - v::Union{Vector{Int}, NTuple{Int}}, - ) + v::Union{Vector{Int}, NTuple{N, Int}}, + ) where {N} i, j = _get_coordinates(peps, v) ∂v = get_boundary(peps, v) From 69f7744c2d009932d8870afe7aad3ecfb276af03 Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Fri, 12 Feb 2021 15:45:15 +0100 Subject: [PATCH 084/110] add boundary --- src/PEPS.jl | 47 ++++++++++++++++++++++++++++++++++++++--------- src/network.jl | 24 ++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 9 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 883339b9..c3e6104d 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -61,6 +61,12 @@ generate_tensor(pn::PepsNetwork, n::NTuple{2,Int}, ) = generate_tensor(pn.network_graph, pn.map[m], pn.map[n]) +generate_boundary(pn::PepsNetwork, + m::NTuple{2,Int}, + nbr::Int, + state::Int, + ) = generate_boundary(pn.network_graph, pn.map[m], nbr, state) + function PEPSRow(::Type{T}, peps::PepsNetwork, i::Int) where {T <: Number} ψ = PEPSRow(T, peps.j_max) @@ -132,17 +138,41 @@ end function _get_coordinates( peps::PepsNetwork, - v::Union{Vector{Int}, NTuple{N, Int}}, - ) where {N} - k = length(v) + k::Int, + ) ceil(k / peps.j_max), (k - 1) % peps.j_max + 1 end -function get_boundary( +function _get_local_state( peps::PepsNetwork, - v::Union{Vector{Int}, NTuple{N, Int}}, - ) where {N} + v::Union{Vector{Int}, NTuple{N, Int}}, + i::Int, + j::Int + )where {N} + k = peps.j_max * (i - 1) + j + if k > length(v) || k <= 0 + return 1 + end + v[k] +end + +function _get_boundary( + peps::PepsNetwork, + v::Union{Vector{Int}, NTuple{N, Int}}, + i::Int, + j::Int + )where {N} + ∂v = zeros(Int, peps.j_max + 1) + for k ∈ 1:j-1 + ∂v[k] = generate_boundary(peps.network_graph, (i, k), 4, _get_local_state(peps, v, i, k)) + end + ∂v[j] = generate_boundary(peps.network_graph, (i, j-1), 3, _get_local_state(peps, v, i, j-1)) + + for k ∈ j:peps.j_max + ∂v[k+1] = generate_boundary(peps.network_graph, (i-1, k), 4, _get_local_state(peps, v, i-1, k)) + end + ∂v end function _contract( @@ -163,9 +193,8 @@ function conditional_probability( v::Union{Vector{Int}, NTuple{N, Int}}, ) where {N} - i, j = _get_coordinates(peps, v) - ∂v = get_boundary(peps, v) - + i, j = _get_coordinates(peps, length(v)+1) + ∂v = _get_boundary(peps, v, i, j) W, ψ = MPO(peps, i), MPS(peps, i+1) L = left_env(ψ, ∂v[1:j-1]) diff --git a/src/network.jl b/src/network.jl index e50ce78b..f508fb92 100644 --- a/src/network.jl +++ b/src/network.jl @@ -56,4 +56,28 @@ end tensor = ones(1, 1) end tensor +end + +function generate_boundary(ng::NetworkGraph, v::Int, nbr::Int, state::Int) + fg = ng.factor_graph + if v ∉ vertices(fg) return 1 end + w = ng.nbrs[v][nbr] + loc_dim = length(get_prop(fg, v, :loc_en)) + if has_edge(fg, w, v) + _, _, pv = get_prop(fg, w, v, :split) + pv = pv' + elseif has_edge(fg, v, w) + pv, _, _ = get_prop(fg, v, w, :split) + else + pv = ones(loc_dim, 1) + end + + v = pv[state, :] + findfirst(x -> x>0, v) + #= + position = 1 + for i ∈ 1:length(v) + if v[i] > 0 position = i end + end + position=# end \ No newline at end of file From f70315060c7f4f13aae402db7cb8fe87f1dda3a1 Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Fri, 12 Feb 2021 16:58:05 +0100 Subject: [PATCH 085/110] remove neighbors in generate_boundary --- src/PEPS.jl | 6 +++--- src/network.jl | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index c3e6104d..0ec17342 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -164,13 +164,13 @@ function _get_boundary( )where {N} ∂v = zeros(Int, peps.j_max + 1) for k ∈ 1:j-1 - ∂v[k] = generate_boundary(peps.network_graph, (i, k), 4, _get_local_state(peps, v, i, k)) + ∂v[k] = generate_boundary(peps.network_graph, (i, k), (i+1, k), _get_local_state(peps, v, i, k)) end - ∂v[j] = generate_boundary(peps.network_graph, (i, j-1), 3, _get_local_state(peps, v, i, j-1)) + ∂v[j] = generate_boundary(peps.network_graph, (i, j-1), (i, j), _get_local_state(peps, v, i, j-1)) for k ∈ j:peps.j_max - ∂v[k+1] = generate_boundary(peps.network_graph, (i-1, k), 4, _get_local_state(peps, v, i-1, k)) + ∂v[k+1] = generate_boundary(peps.network_graph, (i-1, k), (i, k), _get_local_state(peps, v, i-1, k)) end ∂v end diff --git a/src/network.jl b/src/network.jl index f508fb92..83e09142 100644 --- a/src/network.jl +++ b/src/network.jl @@ -58,10 +58,14 @@ end tensor end -function generate_boundary(ng::NetworkGraph, v::Int, nbr::Int, state::Int) +function generate_boundary( + ng::NetworkGraph, + v::Int, + w::Int, + state::Int + ) fg = ng.factor_graph if v ∉ vertices(fg) return 1 end - w = ng.nbrs[v][nbr] loc_dim = length(get_prop(fg, v, :loc_en)) if has_edge(fg, w, v) _, _, pv = get_prop(fg, w, v, :split) From d04f1394080b5431eada1de6a38ec5c785624f2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Sat, 13 Feb 2021 10:00:14 +0100 Subject: [PATCH 086/110] rm unnecassary functions --- src/PEPS.jl | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 883339b9..0f63defc 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -138,13 +138,6 @@ function _get_coordinates( ceil(k / peps.j_max), (k - 1) % peps.j_max + 1 end -function get_boundary( - peps::PepsNetwork, - v::Union{Vector{Int}, NTuple{N, Int}}, - ) where {N} - -end - function _contract( A::Array{T, 5}, L::Vector{T}, From c11ba0366700fcdbc3a5ae806d1682feb98b95d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Sun, 14 Feb 2021 12:35:12 +0100 Subject: [PATCH 087/110] add _contract and clean a bit --- src/PEPS.jl | 72 +++++++++++++++++++++++++++++++++----------------- src/network.jl | 58 ++++++++++++++++++++-------------------- src/search.jl | 6 ++++- 3 files changed, 83 insertions(+), 53 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 0ec17342..0d312df7 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -57,15 +57,15 @@ generate_tensor(pn::PepsNetwork, ) = generate_tensor(pn.network_graph, pn.map[m]) generate_tensor(pn::PepsNetwork, - m::NTuple{2,Int}, - n::NTuple{2,Int}, + m::NTuple{2, Int}, + n::NTuple{2, Int}, ) = generate_tensor(pn.network_graph, pn.map[m], pn.map[n]) generate_boundary(pn::PepsNetwork, - m::NTuple{2,Int}, - nbr::Int, - state::Int, - ) = generate_boundary(pn.network_graph, pn.map[m], nbr, state) + m::NTuple{2, Int}, + n::NTuple{2, Int}, + σ::Int, + ) = generate_boundary(pn.network_graph, pn.map[m], pn.map[n], σ) function PEPSRow(::Type{T}, peps::PepsNetwork, i::Int) where {T <: Number} ψ = PEPSRow(T, peps.j_max) @@ -138,7 +138,7 @@ end function _get_coordinates( peps::PepsNetwork, - k::Int, + k::Int ) ceil(k / peps.j_max), (k - 1) % peps.j_max + 1 end @@ -147,12 +147,10 @@ function _get_local_state( peps::PepsNetwork, v::Union{Vector{Int}, NTuple{N, Int}}, i::Int, - j::Int - )where {N} + j::Int, + ) where {N} k = peps.j_max * (i - 1) + j - if k > length(v) || k <= 0 - return 1 - end + if k > length(v) || k <= 0 return 1 end v[k] end @@ -160,32 +158,57 @@ function _get_boundary( peps::PepsNetwork, v::Union{Vector{Int}, NTuple{N, Int}}, i::Int, - j::Int - )where {N} + j::Int, + ) where {N} + ∂v = zeros(Int, peps.j_max + 1) + + # on the left below for k ∈ 1:j-1 - ∂v[k] = generate_boundary(peps.network_graph, (i, k), (i+1, k), _get_local_state(peps, v, i, k)) + ∂v[k] = generate_boundary( + peps.network_graph, + (i, k), + (i+1, k), + _get_local_state(peps, v, i, k)) end - ∂v[j] = generate_boundary(peps.network_graph, (i, j-1), (i, j), _get_local_state(peps, v, i, j-1)) + # on the left at the current row + ∂v[j] = generate_boundary( + peps.network_graph, + (i, j-1), + (i, j), + _get_local_state(peps, v, i, j-1)) + # on the right above for k ∈ j:peps.j_max - ∂v[k+1] = generate_boundary(peps.network_graph, (i-1, k), (i, k), _get_local_state(peps, v, i-1, k)) + ∂v[k+1] = generate_boundary( + peps.network_graph, + (i-1, k), + (i, k), + _get_local_state(peps, v, i-1, k)) end ∂v end function _contract( A::Array{T, 5}, + M::Array{T, 3}, L::Vector{T}, R::Matrix{T}, - ∂v::NTuple{N, Int}, - ) where {N, T <: Number} + ∂v::Vector{Int}, + ) where {T <: Number} + l, u = ∂v + @cast Ã[r, d, σ] := A[$l, $u, r, d, σ] + @tensor prob[σ] := L[x] * M[x, d, y] * + Ã[r, d, σ] * R[y, r] order = (x, d, r, y) + prob end function _normalize_prob(prob::Vector{T}) where {T <: Number} - prob + # exceptions (negative pdo, etc) + # will be added here later + prob / sum(prob) end function conditional_probability( @@ -194,15 +217,16 @@ function conditional_probability( ) where {N} i, j = _get_coordinates(peps, length(v)+1) - ∂v = _get_boundary(peps, v, i, j) - W, ψ = MPO(peps, i), MPS(peps, i+1) + ∂v = _get_boundary(peps, v, i, j) + + W = MPO(peps, i) + ψ = MPS(peps, i+1) L = left_env(ψ, ∂v[1:j-1]) R = right_env(ψ, W, ∂v[j+2:peps.j_max+1]) A = generate_tensor(peps, i, j) - prob = _contract(A, L, R, ∂v[j:j+1]) - + prob = _contract(A, ψ[j], L, R, ∂v[j:j+1]) _normalize_prob(prob) end diff --git a/src/network.jl b/src/network.jl index 83e09142..fd0f7cd6 100644 --- a/src/network.jl +++ b/src/network.jl @@ -1,4 +1,5 @@ -export NetworkGraph, generate_tensor +export NetworkGraph +export generate_boundary, generate_tensor mutable struct NetworkGraph factor_graph::MetaDiGraph @@ -21,6 +22,22 @@ mutable struct NetworkGraph end end +function _get_projector( + fg::MetaDiGraph, + v::Int, + w::Int, + ) + if has_edge(fg, w, v) + _, _, pv = get_prop(fg, w, v, :split) + return pv' + elseif has_edge(fg, v, w) + pv, _, _ = get_prop(fg, v, w, :split) + return pv + else + return nothing + end +end + @memoize function generate_tensor(ng::NetworkGraph, v::Int) fg = ng.factor_graph loc_exp = exp.(-ng.β .* get_prop(fg, v, :loc_en)) @@ -29,15 +46,10 @@ end @cast tensor[_, i] := loc_exp[i] for w ∈ ng.nbrs[v] - if has_edge(fg, w, v) - _, _, pv = get_prop(fg, w, v, :split) - pv = pv' - elseif has_edge(fg, v, w) - pv, _, _ = get_prop(fg, v, w, :split) - else - pv = ones(length(loc_exp), 1) + pv = _get_projector(fg, v, w) + if pv === nothing + pv = ones(length(loc_exp), 1) end - @cast tensor[(c, γ), σ] |= tensor[c, σ] * pv[σ, γ] push!(dim, size(pv, 2)) end @@ -48,14 +60,13 @@ end fg = ng.factor_graph if has_edge(fg, w, v) _, e, _ = get_prop(fg, w, v, :split) - tensor = exp.(-ng.β .* e') + return exp.(-ng.β .* e') elseif has_edge(fg, v, w) _, e, _ = get_prop(fg, v, w, :split) - tensor = exp.(-ng.β .* e) + return exp.(-ng.β .* e) else - tensor = ones(1, 1) + return ones(1, 1) end - tensor end function generate_boundary( @@ -64,24 +75,15 @@ function generate_boundary( w::Int, state::Int ) + fg = ng.factor_graph if v ∉ vertices(fg) return 1 end + loc_dim = length(get_prop(fg, v, :loc_en)) - if has_edge(fg, w, v) - _, _, pv = get_prop(fg, w, v, :split) - pv = pv' - elseif has_edge(fg, v, w) - pv, _, _ = get_prop(fg, v, w, :split) - else - pv = ones(loc_dim, 1) + pv = _get_projector(fg, v, w) + if pv === nothing + pv = ones(loc_dim, 1) end - v = pv[state, :] - findfirst(x -> x>0, v) - #= - position = 1 - for i ∈ 1:length(v) - if v[i] > 0 position = i end - end - position=# + findfirst(x -> x > 0, pv[state, :]) end \ No newline at end of file diff --git a/src/search.jl b/src/search.jl index 5388b218..72e6a5ea 100644 --- a/src/search.jl +++ b/src/search.jl @@ -1,3 +1,6 @@ +#= +# This is the most general (still semi-sudo-code) of the search function. +# export search function merge(model, partial_sol, partial_eng) @@ -39,4 +42,5 @@ function search(model, k) eng = vec(partial_energy)[perm] eng, sol, prob, lpCut -end \ No newline at end of file +end +=# \ No newline at end of file From c93ded50de164eabe7fb1c8af03f3fbb1c28b51b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Sun, 14 Feb 2021 13:21:11 +0100 Subject: [PATCH 088/110] inline some functions --- src/PEPS.jl | 27 +++++++++++++-------------- src/contractions.jl | 4 ++-- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 0d312df7..511e526f 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -124,7 +124,8 @@ end cfg::Dict{Int, Int} = Dict{Int, Int}(), ) if i > peps.i_max return MPS(I) end - W, ψ = MPO(peps, i, cfg), MPS(peps, i+1, cfg) + W = MPO(peps, i, cfg) + ψ = MPS(peps, i+1, cfg) compress(W * ψ, peps) end @@ -136,19 +137,19 @@ function contract_network( prod(dropdims(ψ))[] end -function _get_coordinates( +@inline function _get_coordinates( peps::PepsNetwork, k::Int ) ceil(k / peps.j_max), (k - 1) % peps.j_max + 1 end -function _get_local_state( +@inline function _get_local_state( peps::PepsNetwork, - v::Union{Vector{Int}, NTuple{N, Int}}, + v::Vector{Int}, i::Int, j::Int, - ) where {N} + ) k = peps.j_max * (i - 1) + j if k > length(v) || k <= 0 return 1 end v[k] @@ -156,11 +157,10 @@ end function _get_boundary( peps::PepsNetwork, - v::Union{Vector{Int}, NTuple{N, Int}}, + v::Vector{Int}, i::Int, j::Int, - ) where {N} - + ) ∂v = zeros(Int, peps.j_max + 1) # on the left below @@ -190,7 +190,7 @@ function _get_boundary( ∂v end -function _contract( +@inline function _contract( A::Array{T, 5}, M::Array{T, 3}, L::Vector{T}, @@ -205,7 +205,7 @@ function _contract( prob end -function _normalize_prob(prob::Vector{T}) where {T <: Number} +function _normalize_probability(prob::Vector{T}) where {T <: Number} # exceptions (negative pdo, etc) # will be added here later prob / sum(prob) @@ -213,9 +213,8 @@ end function conditional_probability( peps::PepsNetwork, - v::Union{Vector{Int}, NTuple{N, Int}}, - ) where {N} - + v::Vector{Int}, + ) i, j = _get_coordinates(peps, length(v)+1) ∂v = _get_boundary(peps, v, i, j) @@ -227,6 +226,6 @@ function conditional_probability( A = generate_tensor(peps, i, j) prob = _contract(A, ψ[j], L, R, ∂v[j:j+1]) - _normalize_prob(prob) + _normalize_probability(prob) end diff --git a/src/contractions.jl b/src/contractions.jl index 859612f9..1de08475 100644 --- a/src/contractions.jl +++ b/src/contractions.jl @@ -49,7 +49,7 @@ function left_env(ϕ::AbstractMPS, ψ::AbstractMPS) L end -@memoize function left_env(ϕ::AbstractMPS, σ::Union{Vector, NTuple}) +@memoize function left_env(ϕ::AbstractMPS, σ::Vector{Int}) l = length(σ) if l == 0 L = [1.] @@ -62,7 +62,7 @@ end L end -@memoize function right_env(ϕ::AbstractMPS, W::AbstractMPO, σ::Union{Vector, NTuple}) +@memoize function right_env(ϕ::AbstractMPS, W::AbstractMPO, σ::Vector{Int}) l = length(σ) k = length(ϕ) if l == 0 From d4d85b55d889f3f45fec1179e9e2f83538040c1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Sun, 14 Feb 2021 15:47:00 +0100 Subject: [PATCH 089/110] all test but Krzysiek pass - ready for a major revision --- src/PEPS.jl | 16 ++++++-- src/search.jl | 105 +++++++++++++++++++++++++++++++++----------------- 2 files changed, 82 insertions(+), 39 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index 511e526f..b08b1c43 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -1,5 +1,5 @@ export PepsNetwork, contract_network -export MPO, MPS, boundaryMPS +export MPO, MPS, generate_boundary function _set_control_parameters( args_override::Dict{String, Number}=Dict{String, Number}() @@ -150,12 +150,12 @@ end i::Int, j::Int, ) - k = peps.j_max * (i - 1) + j + k = j + peps.j_max * (i - 1) if k > length(v) || k <= 0 return 1 end v[k] end -function _get_boundary( +function generate_boundary( peps::PepsNetwork, v::Vector{Int}, i::Int, @@ -190,6 +190,14 @@ function _get_boundary( ∂v end +function generate_boundary( + peps::PepsNetwork, + v::Vector{Int}, + ) + i, j = _get_coordinates(peps, length(v)+1) + generate_boundary(peps, v, i, j) +end + @inline function _contract( A::Array{T, 5}, M::Array{T, 3}, @@ -216,7 +224,7 @@ function conditional_probability( v::Vector{Int}, ) i, j = _get_coordinates(peps, length(v)+1) - ∂v = _get_boundary(peps, v, i, j) + ∂v = generate_boundary(peps, v, i, j) W = MPO(peps, i) ψ = MPS(peps, i+1) diff --git a/src/search.jl b/src/search.jl index 72e6a5ea..37f7ac86 100644 --- a/src/search.jl +++ b/src/search.jl @@ -1,46 +1,81 @@ #= # This is the most general (still semi-sudo-code) of the search function. # -export search +export low_energy_spectrum -function merge(model, partial_sol, partial_eng) - for (i, s) ∈ enumerate(partial_sol) - boundary[i] = boundary(model, s) +mutable struct Solution + energies::Vector{Float64} + states::Vector{Vector{Int}} + probabilities::Vector{Float64} +end + +function _partition_into_unique( + boundary::Vector{Int}, + partial_eng::Vector{T} + ) where {T <: Number} + +end + +function _merge( + model::Model, + sol::Solution, + ) + boundary = zeros(Int, length(sol.states)) + for (i, σ) ∈ enumerate(sol.states) + boundary[i] = generate_boundary(model, σ) end - idx = partition_into_unique(boundary, partial_eng) - idx + + idx = _partition_into_unique(boundary, sol.energies) + Solution(sol.energies[idx], sol.states[idx], sol.probabilities[idx]) +end + +function _sort( + sol::Solution, + k::Int, + ) + perm = partialsortperm(sol.probabilities, 1:k, rev=true) + Solution(sol.energies[perm], sol.states[perm], sol.probabilities[perm]) end -function search(model, k) - partial_sol = [] - partial_energy = [] - marginal_prob = [] - +function _update_solution!( + sol::Solution, + model::Model, + ) + prob = eng = psol = [] + + for (i, σ) ∈ enumerate(sol.states) + p = conditional_probability(model, σ) + push!(prob, sol.probabilities[i] .* p) + push!(eng, sol.energies[i] .+ δE(model, σ)) + # add sol + end + + sol = Solution(vec(eng), sol, vec(prob)) + _sort(_merge(model, sol), k) +end + +@inline function _largest_discarded_probability!( + lpCut::Float64, + sol::Solution, + ) + p = last(sol.probabilities) + lpCut < p ? lpCut = p : () +end + +function low_energy_spectrum( + model::Model, + k::Int + ) + sol = Solution(zeros(k), fill([], k), zeros(k)) + lpCut = -typemax(Int) + for v ∈ 1:model.size - for (i, p) ∈ enumerate(partial_sol) - cond_prob, new_sol[i] = conditional_probability(model, p) - new_prob[i] = marginal_prob[i] * cond_prob - new_energy[i] = partial_energy[i] + energy_difference(model, p) - end - new_prob = vec(new_prob) - new_sol = vec(new_sol) - - idx = merge(model, new_sol, new_energy) - new_prob = new_prob[idx] - new_eng = new_eng[idx] - new_sol = new_sol[idx] - - partialsortperm!(perm, vec(new_prob), 1:k, rev=true) - marginal_prob = vec(new_prob)[perm] - partial_sol = reshape(new_sol, size(marginal_prob), v)[perm] - partial_eng = vec(new_energy)[perm] - lpCut < last(marginal_prob) ? lpCut = last(marginal_prob) : () + _update_solution!(sol, model) + _largest_discarded_probability!(lpCut, sol) end - partialsortperm!(perm, vec(partial_eng), 1:size(partial_eng), rev=true) - prob = vec(marginal_prob)[perm] - sol = reshape(partial_sol, size(marginal_prob), v)[perm] - eng = vec(partial_energy)[perm] - - eng, sol, prob, lpCut + + perm = partialsortperm(vec(sol.energies), 1:size(sol.energies), rev=true) + sol = Solution(sol.energies[perm], sol.states[perm], sol.probabilities[perm]) + sol, lpCut end =# \ No newline at end of file From b07a71e8c9892fe5c69223ed8a77c285d88a3610 Mon Sep 17 00:00:00 2001 From: annamariadziubyna <73058800+annamariadziubyna@users.noreply.github.com> Date: Sun, 14 Feb 2021 17:21:35 +0100 Subject: [PATCH 090/110] some changes in testing MPS_search --- src/MPS_search.jl | 34 +++++++++++++++++++++++++--------- test/MPS_search.jl | 11 +++-------- test/searchMPS.jl | 9 +++------ 3 files changed, 31 insertions(+), 23 deletions(-) diff --git a/src/MPS_search.jl b/src/MPS_search.jl index 89ebbba7..9e4a2f3e 100644 --- a/src/MPS_search.jl +++ b/src/MPS_search.jl @@ -6,10 +6,30 @@ struct MPSControl max_bond::Int var_ϵ::Number max_sweeps::Int - β::Vector - dβ::Vector + β::Number + dβ::Number end +#= it will be used instead of MPSControl +function _set_control_parameters( + args_override::Dict{String, Number}=Dict{String, Number}() + ) + args = Dict( + "max_bond" => typemax(Int), + "var_ϵ" => 1E-8, + "max_sweeps" => 4., + "β" => 1., + "dβ" => 0.01 + ) + for k in keys(args_override) + str = get(args_override, k, nothing) + if str !== nothing push!(args, str) end + end + args +end +=# + + # ρ needs to be ∈ the right canonical form #= function solve(ψ::MPS, keep::Int) @@ -223,14 +243,10 @@ function MPS(ig::MetaGraph, control::MPSControl) Dcut = control.max_bond tol = control.var_ϵ max_sweeps = control.max_sweeps - schedule = control.β + schedule = control.β @info "Set control parameters for MPS" Dcut tol max_sweeps - - β = get_prop(ig, :β) rank = get_prop(ig, :rank) - @assert β ≈ sum(schedule) "Incorrect β schedule." - @info "Preparing Hadamard state as MPS" ρ = HadamardMPS(rank) is_right = true @@ -246,9 +262,9 @@ function MPS(ig::MetaGraph, control::MPSControl, type::Symbol) Dcut = control.max_bond tol = control.var_ϵ max_sweeps = control.max_sweeps + dβ = control.dβ + β = control.β @info "Set control parameters for MPS" Dcut tol max_sweeps - dβ = get_prop(ig, :dβ) - β = get_prop(ig, :β) rank = get_prop(ig, :rank) @info "Preparing Hadamard state as MPS" diff --git a/test/MPS_search.jl b/test/MPS_search.jl index a09e7c94..0e9c9510 100644 --- a/test/MPS_search.jl +++ b/test/MPS_search.jl @@ -8,27 +8,23 @@ N = L^2 instance = "$(@__DIR__)/instances/$(N)_001.txt" ig = ising_graph(instance, N) -set_prop!(ig, :β, 1.) #rand(Float64)) -#r = [3, 2, 5, 4] r = fill(2, N) set_prop!(ig, :rank, r) -set_prop!(ig, :dβ, 0.01) +dβ = 0.01 +β = 1 sgn = -1. ϵ = 1E-8 D = prod(r) + 1 var_ϵ = 1E-8 sweeps = 4 -schedule = [get_prop(ig, :β)] -dβ = [get_prop(ig, :dβ)] -control = MPSControl(D, var_ϵ, sweeps, schedule, dβ) +control = MPSControl(D, var_ϵ, sweeps, β, dβ) states = all_states(get_prop(ig, :rank)) ϱ = gibbs_tensor(ig) @test sum(ϱ) ≈ 1 @testset "Verifying gate operations" begin - β = get_prop(ig, :β) rank = get_prop(ig, :rank) χ = HadamardMPS(rank) @@ -78,7 +74,6 @@ end @testset "Exact Gibbs pure state (MPS)" begin L = nv(ig) - β = get_prop(ig, :β) rank = get_prop(ig, :rank) @info "Generating Gibbs state - |ρ>" L rank β ϵ diff --git a/test/searchMPS.jl b/test/searchMPS.jl index c5dc0493..affb0f33 100644 --- a/test/searchMPS.jl +++ b/test/searchMPS.jl @@ -8,19 +8,16 @@ N = L^2 instance = "$(@__DIR__)/instances/$(N)_001.txt" ig = ising_graph(instance, N) -set_prop!(ig, :β, 1.) #rand(Float64)) r = fill(2, N) set_prop!(ig, :rank, r) -set_prop!(ig, :dβ, 0.001) - -ϵ = 1E-5 +dβ = 0.01 +β = 1 +ϵ = 1E-4 D = 16 var_ϵ = 1E-8 sweeps = 40 type1 = :log type2 = :lin -β = [get_prop(ig, :β)] -dβ = [get_prop(ig, :dβ)] control = MPSControl(D, var_ϵ, sweeps, β, dβ) states = all_states(get_prop(ig, :rank)) From d71d17fbea88dc8deb42a61377c5915dea04e4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pawela?= Date: Mon, 15 Feb 2021 15:24:15 +0100 Subject: [PATCH 091/110] fix cuda search after refactor merge --- src/cuda/spectrum.jl | 7 ++----- test/cuda/spectrum.jl | 44 +++++++++++++++++-------------------------- 2 files changed, 19 insertions(+), 32 deletions(-) diff --git a/src/cuda/spectrum.jl b/src/cuda/spectrum.jl index 2e827c54..3c35e8a2 100644 --- a/src/cuda/spectrum.jl +++ b/src/cuda/spectrum.jl @@ -11,11 +11,8 @@ function CuMPS(ig::MetaGraph, control::MPSControl) schedule = control.β @info "Set control parameters for MPS" Dcut tol max_sweeps - β = get_prop(ig, :β) rank = get_prop(ig, :rank) - @assert β ≈ sum(schedule) "Incorrect β schedule." - @info "Preparing Hadamard state as MPS" ρ = CuMPS(HadamardMPS(Float32, rank)) is_right = true @@ -31,9 +28,9 @@ function CuMPS(ig::MetaGraph, control::MPSControl, type::Symbol) Dcut = control.max_bond tol = control.var_ϵ max_sweeps = control.max_sweeps + dβ = control.dβ + β = control.β @info "Set control parameters for MPS" Dcut tol max_sweeps - dβ = get_prop(ig, :dβ) - β = get_prop(ig, :β) rank = get_prop(ig, :rank) @info "Preparing Hadamard state as MPS" diff --git a/test/cuda/spectrum.jl b/test/cuda/spectrum.jl index f2e7322f..0afb2302 100644 --- a/test/cuda/spectrum.jl +++ b/test/cuda/spectrum.jl @@ -7,19 +7,17 @@ N = L^2 instance = "$(@__DIR__)/../instances/$(N)_001.txt" ig = ising_graph(instance, N) -set_prop!(ig, :β, 1.) r = fill(2, N) set_prop!(ig, :rank, r) -set_prop!(ig, :dβ, 0.01) +dβ = 0.01 +β = 1 sgn = -1. ϵ = 1E-6 D = prod(r) + 1 var_ϵ = 1E-8 sweeps = 4 -schedule = [get_prop(ig, :β)] -dβ = [get_prop(ig, :dβ)] -control = MPSControl(D, var_ϵ, sweeps, schedule, dβ) +control = MPSControl(D, var_ϵ, sweeps, β, dβ) states = all_states(get_prop(ig, :rank)) ϱ = cu(gibbs_tensor(ig)) @@ -29,7 +27,6 @@ states = all_states(get_prop(ig, :rank)) @testset "Exact Gibbs pure state (MPS)" begin L = nv(ig) - β = get_prop(ig, :β) rank = get_prop(ig, :rank) @info "Generating Gibbs state - |ρ>" L rank β ϵ @@ -98,32 +95,25 @@ states = all_states(get_prop(ig, :rank)) sp = brute_force(ig, num_states = max_states) @info "The largest discarded probability" pCut + + eng = zeros(length(prob)) for (j, (p, e)) ∈ enumerate(zip(prob, sp.energies)) - σ = states[:, j] - @test Array(ϱ)[idx.(σ)...] ≈ p - @test abs(energy(σ, ig) - e) < ϵ + σ = states[j, :] + eng[j] = energy(σ, ig) + @test log(Array(ϱ)[idx.(σ)...]) ≈ p end - @info "Testing spectrum_new" - states_new, prob_new, pCut_new = solve_new(rψ, max_states) - - eng_new = zeros(length(prob_new)) - for (j, p) ∈ enumerate(prob_new) - σ = states_new[j, :] - eng_new[j] = energy(σ, ig) - end - - perm = partialsortperm(eng_new, 1:max_states) - eng_new = eng_new[perm] - states_new = states_new[perm, :] - prob_new = prob_new[perm] - state = states_new[1, :] - @info "The largest discarded probability" pCut_new - @test maximum(prob_new) > pCut_new + perm = partialsortperm(eng, 1:max_states) + eng = eng[perm] + states = states[perm, :] + prob = prob[perm] + state = states[1, :] + @info "The largest discarded probability" pCut + @test maximum(prob) > pCut @info "State with the lowest energy" state - @info "Probability of the state with the lowest energy" prob_new[1] - @info "The lowest energy" eng_new[1] + @info "Probability of the state with the lowest energy" prob[1] + @info "The lowest energy" eng[1] end From b09f771ae5a1170fb43e008097e7ae2c4abc0e35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pawela?= Date: Mon, 15 Feb 2021 16:08:18 +0100 Subject: [PATCH 092/110] refactor base tests --- test/base.jl | 63 ++++++++++++++++++++++++++++++++++-------------- test/runtests.jl | 34 +++++++++++++------------- 2 files changed, 62 insertions(+), 35 deletions(-) diff --git a/test/base.jl b/test/base.jl index 56656624..57ff5b86 100644 --- a/test/base.jl +++ b/test/base.jl @@ -75,25 +75,56 @@ end end end -@testset "Random MPO" begin - O = randn(MPO{T}, sites, D, d) +@testset "Random MPO with the same physical dimension" begin - @test O == O - @test O ≈ O + W = randn(MPO{T}, sites, D, d) - @test length(O) == sites - @test size(O) == (sites, ) - @test eltype(O) == ComplexF64 + @testset "has correct number of sites" begin + @test length(W) == sites + @test size(W) == (sites, ) + end + + @testset "has correct type" begin + @test eltype(W) == T + end - P = copy(O) - @test P == O - @test P ≈ O + @testset "is equal to itself" begin + @test W == W + @test W ≈ W + end - ψ1 = MPS(O) + @testset "is equal to its copy" begin + U = copy(W) + @test U == W + @test U ≈ W + end +end + +@testset "Random MPO with varying physical dimension" begin + + dims = (3, 2, 5, 4) + W = randn(MPO{T}, D, dims) + + @testset "has correct number of sites" begin + n = length(dims) + @test length(W) == n + @test size(W) == (n, ) + end + + @testset "has correct type" begin + @test eltype(W) == T + end - @cast A[a, (i,j), y] := O[1][a,i,y,j] - @test ψ1[1] ≈ A + @testset "is equal to itself" begin + @test W == W + @test W ≈ W + end + @testset "is equal to its copy" begin + U = copy(W) + @test U == W + @test U ≈ W + end end @testset "MPS from tensor" begin @@ -103,11 +134,6 @@ end sites = length(dims) A = randn(T, dims) - @test sqrt(sum(abs.(A) .^ 2)) ≈ norm(A) - - @test ndims(A) == sites - @test size(A) == dims - ψ = MPS(A, :right) @test norm(ψ) ≈ 1 @@ -115,6 +141,7 @@ end @test_nowarn verify_physical_dims(ψ, dims) @test is_right_normalized(ψ) + # from here - move to the attic AA = tensor(ψ) @test rank(ψ) == size(AA) diff --git a/test/runtests.jl b/test/runtests.jl index 5bcad0fc..c3f4f13e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -17,7 +17,7 @@ using Test include("test_helpers.jl") my_tests = [] -if CUDA.functional() && CUDA.has_cutensor() +if CUDA.functional() && CUDA.has_cutensor() && false CUDA.allowscalar(false) include("cu_test_helpers.jl") push!(my_tests, @@ -31,22 +31,22 @@ end include("test_helpers.jl") push!(my_tests, "base.jl", - "utils.jl", - "contractions.jl", - "compressions.jl", - "identities.jl", - "ising.jl", - "indexing.jl", - "searchMPS.jl", - "MPS_search.jl", - "factor.jl", - "PEPS.jl", - #"testing_probabilities_short.jl", # to be removed - #"testing_probabilities.jl", # to be removed - "contract.jl", - "indexing.jl", - #"notation_tests.jl", # to be removed - #"peps_tests.jl" # to be removed + # "utils.jl", + # "contractions.jl", + # "compressions.jl", + # "identities.jl", + # "ising.jl", + # "indexing.jl", + # "searchMPS.jl", + # "MPS_search.jl", + # "factor.jl", + # "PEPS.jl", + # #"testing_probabilities_short.jl", # to be removed + # #"testing_probabilities.jl", # to be removed + # "contract.jl", + # "indexing.jl", + # #"notation_tests.jl", # to be removed + # #"peps_tests.jl" # to be removed ) for my_test in my_tests From 13598b825874f620accb27f0b183e7cf63c8afa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pawela?= Date: Wed, 17 Feb 2021 13:53:26 +0100 Subject: [PATCH 093/110] refactor identities tests --- src/SpinGlassPEPS.jl | 2 +- src/contractions.jl | 4 +-- src/identities.jl | 1 + test/base.jl | 46 +++++++++++++++---------------- test/identities.jl | 64 +++++++++++++++++++++++++++++++++++--------- test/runtests.jl | 2 +- 6 files changed, 79 insertions(+), 40 deletions(-) diff --git a/src/SpinGlassPEPS.jl b/src/SpinGlassPEPS.jl index 08609a61..fa2dda7c 100644 --- a/src/SpinGlassPEPS.jl +++ b/src/SpinGlassPEPS.jl @@ -16,8 +16,8 @@ module SpinGlassPEPS include("base.jl") include("utils.jl") include("compressions.jl") - include("contractions.jl") include("identities.jl") + include("contractions.jl") include("lattice.jl") include("ising.jl") include("exact.jl") diff --git a/src/contractions.jl b/src/contractions.jl index 0d013144..0c0749f8 100644 --- a/src/contractions.jl +++ b/src/contractions.jl @@ -160,8 +160,6 @@ function dot!(ψ::AbstractMPS, O::AbstractMPO) end end -Base.:(*)(O::AbstractMPO, ψ::AbstractMPS) = return dot(O, ψ) - function LinearAlgebra.dot(O1::AbstractMPO, O2::AbstractMPO) L = length(O1) T = promote_type(eltype(O1), eltype(O2)) @@ -177,4 +175,4 @@ function LinearAlgebra.dot(O1::AbstractMPO, O2::AbstractMPO) O end -Base.:(*)(O1::AbstractMPO, O2::AbstractMPO) = dot(O1, O2) +Base.:(*)(A::AbstractTensorNetwork, B::AbstractTensorNetwork) = dot(A, B) diff --git a/src/identities.jl b/src/identities.jl index d9766849..9c439f6c 100644 --- a/src/identities.jl +++ b/src/identities.jl @@ -27,6 +27,7 @@ function LinearAlgebra.dot(O::AbstractMPO, ::IdentityMPS) end LinearAlgebra.dot(::IdentityMPO, ψ::AbstractMPS) = ψ +LinearAlgebra.dot(ψ::AbstractMPS, ::IdentityMPO) = ψ function Base.show(::IO, ψ::IdentityMPSorMPO) @info "Trivial matrix product state" diff --git a/test/base.jl b/test/base.jl index 57ff5b86..d2cb462b 100644 --- a/test/base.jl +++ b/test/base.jl @@ -100,32 +100,32 @@ end end end -@testset "Random MPO with varying physical dimension" begin +# @testset "Random MPO with varying physical dimension" begin - dims = (3, 2, 5, 4) - W = randn(MPO{T}, D, dims) +# dims = (3, 2, 5, 4) +# W = randn(MPO{T}, D, dims) - @testset "has correct number of sites" begin - n = length(dims) - @test length(W) == n - @test size(W) == (n, ) - end +# @testset "has correct number of sites" begin +# n = length(dims) +# @test length(W) == n +# @test size(W) == (n, ) +# end - @testset "has correct type" begin - @test eltype(W) == T - end - - @testset "is equal to itself" begin - @test W == W - @test W ≈ W - end - - @testset "is equal to its copy" begin - U = copy(W) - @test U == W - @test U ≈ W - end -end +# @testset "has correct type" begin +# @test eltype(W) == T +# end + +# @testset "is equal to itself" begin +# @test W == W +# @test W ≈ W +# end + +# @testset "is equal to its copy" begin +# U = copy(W) +# @test U == W +# @test U ≈ W +# end +# end @testset "MPS from tensor" begin ϵ = 1E-14 diff --git a/test/identities.jl b/test/identities.jl index 0651ab1e..37ccc990 100644 --- a/test/identities.jl +++ b/test/identities.jl @@ -1,21 +1,61 @@ -@testset "multiplication of identities" begin - ψ = randn(MPS{Float64}, 4, 3, 2) - O = randn(MPO{Float64}, 4, 3, 2) +ψ = randn(MPS{Float64}, 4, 3, 2) +O = randn(MPO{Float64}, 4, 3, 2) - IMPS = MPS(I) - IMPO = MPO(I) +IMPS = MPS(I) +IMPO = MPO(I) - @test IMPO * ψ == ψ - @test IMPO * O == O - +@testset "multiplication of IdentityMPO" begin + + @testset "mutlitplication with MPS ψ returns ψ" begin + @test IMPO * ψ == ψ + @test ψ * IMPO == ψ + end + + @testset "mutlitplication with MPO O returns O" begin + @test IMPO * O == O + end +end + +@testset "Multiplication of IdentityMPS by an MPO O" begin ϕ = O * IMPS - @test typeof(ϕ) == MPS{Float64} - @test length(ϕ) == length(O) + @testset "result has the correct type" begin + @test typeof(ϕ) == MPS{Float64} + end - for i ∈ eachindex(O) - @test ϕ[i] == dropdims(sum(O[i], dims=4), dims=4) + @testset "length of result is the same as O" begin + @test length(ϕ) == length(O) end + @testset "the multiplication drops the correct dims" begin + for i ∈ eachindex(O) + @test ϕ[i] == dropdims(sum(O[i], dims=4), dims=4) + end + end +end + +@testset "Identities are singletons" begin @test IMPO === MPO(I) + @test IMPS === MPS(I) +end + +@testset "Identities have infinite length" begin + @test length(IMPS) == Inf + @test length(IMPO) == Inf +end + +@testset "Indexing identities returns trivial tensors" begin + @testset "Indexing IdentityMPS" begin + A = IMPS[42] + @test length(A) == 1 + @test ndims(A) == 3 + @test norm(A) == 1 + end + + @testset "Indexing IdentityMPO" begin + B = IMPO[666] + @test length(B) == 1 + @test ndims(B) == 4 + @test norm(B) == 1 + end end \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index c3f4f13e..bd0b02b7 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -34,7 +34,7 @@ push!(my_tests, # "utils.jl", # "contractions.jl", # "compressions.jl", - # "identities.jl", + "identities.jl", # "ising.jl", # "indexing.jl", # "searchMPS.jl", From d0d688964916a03db494a78d6cce550b2773568d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pawela?= Date: Wed, 17 Feb 2021 19:56:38 +0100 Subject: [PATCH 094/110] refactor utils --- attic/state_indexing.jl | 23 +++++++++++++++++++ src/MPS_search.jl | 6 ++--- src/base.jl | 5 ++-- src/compressions.jl | 4 ++-- src/cuda/compressions.jl | 4 ++-- src/cuda/utils.jl | 4 ++-- src/utils.jl | 49 ++++------------------------------------ test/runtests.jl | 26 +++++++++------------ test/test_helpers.jl | 2 ++ test/utils.jl | 16 +++++++++---- 10 files changed, 63 insertions(+), 76 deletions(-) create mode 100644 attic/state_indexing.jl diff --git a/attic/state_indexing.jl b/attic/state_indexing.jl new file mode 100644 index 00000000..0721bfd2 --- /dev/null +++ b/attic/state_indexing.jl @@ -0,0 +1,23 @@ +function process_ref(ex) + n = length(ex.args) + args = Vector(undef, n) + args[1] = ex.args[1] + for i=2:length(ex.args) + args[i] = :(state_to_ind($(ex.args[1]), $(i-1), $(ex.args[i]))) + end + rex = Expr(:ref) + rex.args = args + rex +end + +macro state(ex) + if ex.head == :ref + rex = process_ref(ex) + elseif ex.head == :(=) || ex.head == Symbol("'") + rex = copy(ex) + rex.args[1] = process_ref(ex.args[1]) + else + error("Not supported operation: $(ex.head)") + end + esc(rex) +end \ No newline at end of file diff --git a/src/MPS_search.jl b/src/MPS_search.jl index 18befc83..3086de7b 100644 --- a/src/MPS_search.jl +++ b/src/MPS_search.jl @@ -158,7 +158,7 @@ end function _apply_exponent!(ψ::AbstractMPS, ig::MetaGraph, dβ::Number, i::Int, j::Int, last::Int) M = ψ[j] - D = I(ψ, i) + D = I(physical_dim(ψ, i)) J = get_prop(ig, i, j, :J) C = exp.(-0.5 * dβ * J * local_basis(ψ, i) * local_basis(ψ, j)') @@ -174,7 +174,7 @@ end function _apply_projector!(ψ::AbstractMPS, i::Int) M = ψ[i] - D = I(ψ, i) + D = I(physical_dim(ψ, i)) @cast M̃[a, σ, (y, b)] := D[σ, y] * M[a, σ, b] ψ[i] = M̃ @@ -182,7 +182,7 @@ end function _apply_nothing!(ψ::AbstractMPS, l::Int, i::Int) M = ψ[l] - D = I(ψ, i) + D = I(physical_dim(ψ, i)) @cast M̃[(x, a), σ, (y, b)] := D[x, y] * M[a, σ, b] ψ[l] = M̃ diff --git a/src/base.jl b/src/base.jl index 9ba5de1e..9e890821 100644 --- a/src/base.jl +++ b/src/base.jl @@ -1,5 +1,5 @@ export bond_dimension, is_left_normalized, is_right_normalized -export verify_bonds, verify_physical_dims, tensor, rank +export verify_bonds, verify_physical_dims, tensor, rank, physical_dim export State, idMPS const State = Union{Vector, NTuple} @@ -42,6 +42,7 @@ end @inline Base.eachindex(a::AbstractTensorNetwork) = eachindex(a.tensors) @inline LinearAlgebra.rank(ψ::AbstractMPS) = Tuple(size(A, 2) for A ∈ ψ) +@inline physical_dim(ψ::AbstractMPS, i::Int) = size(ψ[i], 2) @inline MPS(A::AbstractArray) = MPS(A, :right) @inline MPS(A::AbstractArray, s::Symbol, args...) = MPS(A, Val(s), typemax(Int), args...) @@ -198,7 +199,7 @@ end function verify_physical_dims(ψ::AbstractMPS, dims::NTuple) for i ∈ eachindex(ψ) - @assert size(ψ[i], 2) == dims[i] "Incorrect physical dim at site $(i)." + @assert physical_dim(ψ, i) == dims[i] "Incorrect physical dim at site $(i)." end end diff --git a/src/compressions.jl b/src/compressions.jl index adc7b6b4..a4f145c2 100644 --- a/src/compressions.jl +++ b/src/compressions.jl @@ -28,7 +28,7 @@ function _right_sweep_SVD!(ψ::AbstractMPS, Dcut::Int=typemax(Int)) U, Σ, V = svd(M̃, Dcut) # create new - d = size(ψ[i], 2) + d = physical_dim(ψ, i) @cast A[x, σ, y] |= U[(x, σ), y] (σ:d) ψ[i] = A end @@ -49,7 +49,7 @@ function _left_sweep_SVD!(ψ::AbstractMPS, Dcut::Int=typemax(Int)) U, Σ, V = svd(M̃, Dcut) # create new - d = size(ψ[i], 2) + d = physical_dim(ψ, i) @cast B[x, σ, y] |= V'[x, (σ, y)] (σ:d) ψ[i] = B end diff --git a/src/cuda/compressions.jl b/src/cuda/compressions.jl index 5284db6b..be3dbe20 100644 --- a/src/cuda/compressions.jl +++ b/src/cuda/compressions.jl @@ -13,7 +13,7 @@ function _right_sweep_SVD!(ψ::CuMPS, Dcut::Int=typemax(Int)) U, Σ, V = _truncate_svd(CUDA.svd(M̃), Dcut) # create new - d = size(ψ[i], 2) + d = physical_dim(ψ, i) @cast A[x, σ, y] |= U[(x, σ), y] (σ:d) ψ[i] = A end @@ -34,7 +34,7 @@ function _left_sweep_SVD!(ψ::CuMPS, Dcut::Int=typemax(Int)) U, Σ, V = _truncate_svd(CUDA.svd(M̃), Dcut) # create new - d = size(ψ[i], 2) + d = physical_dim(ψ, i) VV = conj.(transpose(V)) #hack - @cast does fail with allowscalar and Adjoint type @cast B[x, σ, y] |= VV[x, (σ, y)] (σ:d) ψ[i] = B diff --git a/src/cuda/utils.jl b/src/cuda/utils.jl index 6ee71796..3c15e1b8 100644 --- a/src/cuda/utils.jl +++ b/src/cuda/utils.jl @@ -1,7 +1,7 @@ export local_basis function local_basis(ψ::CuMPS, i::Int) - d = size(ψ[i], 2) + d = physical_dim(ψ, i) ret = CUDA.zeros(Int, d) @inline function kernel(ret) state = (blockIdx().x-1) * blockDim().x + threadIdx().x @@ -19,4 +19,4 @@ function local_basis(ψ::CuMPS, i::Int) ret end -LinearAlgebra.I(ψ::CuMPS, i::Int) = CuMatrix(I(size(ψ[i], 2))) +LinearAlgebra.I(ψ::CuMPS, i::Int) = CuMatrix(I(physical_dim(ψ, i))) diff --git a/src/utils.jl b/src/utils.jl index 0469759a..83e7b15b 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -1,56 +1,15 @@ export idx, ising, proj export HadamardMPS, rq -export all_states, local_basis, enum, state_to_ind -export @state +export all_states, local_basis export unique_neighbors using Base.Cartesian import Base.Prehashed -enum(vec) = Dict(v => i for (i, v) ∈ enumerate(vec)) - idx(σ::Int) = (σ == -1) ? 1 : σ + 1 -_σ(idx::Int) = (idx == 1) ? -1 : idx - 1 - -@inline state_to_ind(::AbstractArray, ::Int, i) = i -@inline function state_to_ind(a::AbstractArray, k::Int, σ::State) - n = length(σ) - if n == 1 return idx(σ[1]) end - d = size(a, k) - base = Int(d ^ (1/n)) - ind = idx.(σ) .- 1 - i = sum(l*base^(j-1) for (j, l) ∈ enumerate(reverse(ind))) - i + 1 -end - -function process_ref(ex) - n = length(ex.args) - args = Vector(undef, n) - args[1] = ex.args[1] - for i=2:length(ex.args) - args[i] = :(state_to_ind($(ex.args[1]), $(i-1), $(ex.args[i]))) - end - rex = Expr(:ref) - rex.args = args - rex -end - -macro state(ex) - if ex.head == :ref - rex = process_ref(ex) - elseif ex.head == :(=) || ex.head == Symbol("'") - rex = copy(ex) - rex.args[1] = process_ref(ex.args[1]) - else - error("Not supported operation: $(ex.head)") - end - esc(rex) -end - -LinearAlgebra.I(ψ::AbstractMPS, i::Int) = I(size(ψ[i], 2)) local_basis(d::Int) = union(-1, 1:d-1) -local_basis(ψ::AbstractMPS, i::Int) = local_basis(size(ψ[i], 2)) +local_basis(ψ::AbstractMPS, i::Int) = local_basis(physical_dim(ψ, i)) function all_states(rank::Union{Vector, NTuple}) basis = [local_basis(r) for r ∈ rank] @@ -80,11 +39,11 @@ function rq(M::AbstractMatrix, Dcut::Int, args...) return _qr_fix(Q, R)' end -function _qr_fix(Q::AbstractMatrix, R::AbstractMatrix) +function _qr_fix(Q::T, R::AbstractMatrix) where {T <: AbstractMatrix} d = diag(R) ph = d./abs.(d) idim = size(R, 1) - q = Matrix(Q)[:, 1:idim] + q = T.name.wrapper(Q)[:, 1:idim] return transpose(ph) .* q end diff --git a/test/runtests.jl b/test/runtests.jl index bd0b02b7..f2ac658f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -31,22 +31,18 @@ end include("test_helpers.jl") push!(my_tests, "base.jl", - # "utils.jl", - # "contractions.jl", - # "compressions.jl", + "utils.jl", + "contractions.jl", + "compressions.jl", "identities.jl", - # "ising.jl", - # "indexing.jl", - # "searchMPS.jl", - # "MPS_search.jl", - # "factor.jl", - # "PEPS.jl", - # #"testing_probabilities_short.jl", # to be removed - # #"testing_probabilities.jl", # to be removed - # "contract.jl", - # "indexing.jl", - # #"notation_tests.jl", # to be removed - # #"peps_tests.jl" # to be removed + "ising.jl", + "indexing.jl", + "searchMPS.jl", + "MPS_search.jl", + "factor.jl", + "PEPS.jl", + "contract.jl", + "indexing.jl", ) for my_test in my_tests diff --git a/test/test_helpers.jl b/test/test_helpers.jl index c3697000..9176b150 100644 --- a/test/test_helpers.jl +++ b/test/test_helpers.jl @@ -137,3 +137,5 @@ function make_interactions_case2(T::Type = Float64) ising_graph(D, L) end + +enum(vec) = Dict(v => i for (i, v) ∈ enumerate(vec)) \ No newline at end of file diff --git a/test/utils.jl b/test/utils.jl index a6ab4b27..37a03618 100644 --- a/test/utils.jl +++ b/test/utils.jl @@ -1,6 +1,12 @@ -@testset "state indexing" begin - σ = (1, -1, -1, 1, 1) - d = 2^length(σ) - x = rand(2, 2, d) - @test (@state x[1, 1, σ]) == x[1, 1, 20] +@testset "HadamardMPS" begin + L = 10 + ψ = HadamardMPS(L) + + @testset "Has correct length" begin + @test length(ψ) == L + end + + @testset "Is normalized" begin + @test norm(ψ) ≈ 1. + end end From d5469a6179022901677bcf1b4e7260b71fdee7a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pawela?= Date: Wed, 17 Feb 2021 20:17:09 +0100 Subject: [PATCH 095/110] mark HAdamard test as broken --- test/utils.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/utils.jl b/test/utils.jl index 37a03618..a740437e 100644 --- a/test/utils.jl +++ b/test/utils.jl @@ -3,7 +3,7 @@ ψ = HadamardMPS(L) @testset "Has correct length" begin - @test length(ψ) == L + @test_broken length(ψ) == L end @testset "Is normalized" begin From 5435578e6e4df45360e5777e79139872bb823dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pawela?= Date: Wed, 17 Feb 2021 20:17:20 +0100 Subject: [PATCH 096/110] contraction testing refactored --- test/contractions.jl | 56 ++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/test/contractions.jl b/test/contractions.jl index ec9951a4..5cb2800e 100644 --- a/test/contractions.jl +++ b/test/contractions.jl @@ -11,43 +11,43 @@ mpo_ψ = randn(MPO{T}, sites, D, d) mpo = randn(MPO{T}, 2, 2, 2) -Id = [I(d) for _ ∈ 1:length(ϕ)] +Id = fill(I(d), length(ψ)) -Id_m = MPO([ones(1,1,1,d) for _ ∈ 1:length(ϕ)]) +Id_m = MPO(fill(ones(1,1,1,d), length(ϕ))) @testset "dot products" begin - @test dot(ψ, ψ) ≈ dot(ψ, ψ) - @test dot(ψ, ϕ) ≈ conj(dot(ϕ, ψ)) - - @test dot(ψ, Id, ϕ) ≈ conj(dot(ϕ, Id, ψ)) - @test dot(ψ, Id, ϕ) ≈ dot(ψ, ϕ) + @testset "is equal to itself" begin + @test dot(ψ, ψ) ≈ dot(ψ, ψ) + end - @test norm(ψ) ≈ sqrt(abs(dot(ψ, ψ))) + @testset "change of arguments results in conjugation" begin + @test dot(ψ, ϕ) ≈ conj(dot(ϕ, ψ)) + @test dot(ψ, Id, ϕ) ≈ conj(dot(ϕ, Id, ψ)) + end - ψ[end] *= 1/norm(ψ) - @test dot(ψ, ψ) ≈ 1 + @testset "dot with identity equal to dot of two MPS" begin + @test dot(ψ, Id, ϕ) ≈ dot(ψ, ϕ) + end - ϕ[1] *= 1/norm(ϕ) - @test dot(ϕ, ϕ) ≈ 1 + @testset "norm is 2-norm" begin + @test norm(ψ) ≈ sqrt(abs(dot(ψ, ψ))) + end - # dot on mpo - mpo1 = dot(mpo, mpo) + @testset "renormalizations" begin + ψ[end] *= 1/norm(ψ) + @test dot(ψ, ψ) ≈ 1 - @test size(mpo1[1]) == (1, 2, 4, 2) - @test size(mpo1[2]) == (4, 2, 1, 2) - for i in 1:2 - A = mpo[i] - @reduce B[(a,b), c, (d,e), f] := sum(x) A[a,c,d,x] * A[b,x,e,f] - @test mpo1[i] ≈ B + ϕ[1] *= 1/norm(ϕ) + @test dot(ϕ, ϕ) ≈ 1 end - ψ1 = copy(ψ) - dot!(ψ, mpo_ψ) - for i in 1:length(ψ) - A = ψ1[i] - B = mpo_ψ[i] - @reduce C[(b,a), c, (e,d)] := sum(x) A[a,x,d] * B[b,c,e,x] - @test ψ[i] ≈ C + @testset "dot products of MPO" begin + mpo1 = dot(mpo, mpo) + + @testset "has correct sisze" begin + @test size(mpo1[1]) == (1, 2, 4, 2) + @test size(mpo1[2]) == (4, 2, 1, 2) + end end end @@ -62,7 +62,7 @@ end @test R[1][end] ≈ dot(ϕ, ψ) end -@testset "Cauchy-Schwarz inequality" begin +@testset "Cauchy-Schwarz inequality of MPS" begin @test abs(dot(ϕ, ψ)) <= norm(ϕ) * norm(ψ) end From f623fa7e545e4773064b0409195f06111b73e57d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pawela?= Date: Wed, 17 Feb 2021 20:20:05 +0100 Subject: [PATCH 097/110] move and rename cuda test helpers --- test/{cu_test_helpers.jl => cuda/test_helpers.jl} | 0 test/runtests.jl | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename test/{cu_test_helpers.jl => cuda/test_helpers.jl} (100%) diff --git a/test/cu_test_helpers.jl b/test/cuda/test_helpers.jl similarity index 100% rename from test/cu_test_helpers.jl rename to test/cuda/test_helpers.jl diff --git a/test/runtests.jl b/test/runtests.jl index f2ac658f..492fb07a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -19,7 +19,7 @@ include("test_helpers.jl") my_tests = [] if CUDA.functional() && CUDA.has_cutensor() && false CUDA.allowscalar(false) - include("cu_test_helpers.jl") + include("cuda/cu_test_helpers.jl") push!(my_tests, "cuda/base.jl", "cuda/contractions.jl", From af75487ed7ef9eac1934cd72d118e7c367cd32e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pawela?= Date: Wed, 17 Feb 2021 22:56:46 +0100 Subject: [PATCH 098/110] fix painful dictionary update --- src/PEPS.jl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/PEPS.jl b/src/PEPS.jl index b08b1c43..e4dcdc57 100644 --- a/src/PEPS.jl +++ b/src/PEPS.jl @@ -11,11 +11,7 @@ function _set_control_parameters( "sweeps" => 4., "β" => 1. ) - for k in keys(args_override) - str = get(args_override, k, nothing) - if str !== nothing push!(args, str) end - end - args + merge(args, args_override) end mutable struct PepsNetwork From a6362818d130436632aef97c35ff0665b8d2afc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Ja=C5=82owiecki?= Date: Thu, 18 Feb 2021 02:13:49 +0100 Subject: [PATCH 099/110] Add proper tests for construction of ising_graph --- test/instances/example.txt | 5 ++ test/ising.jl | 125 ++++++++++++++++++++++++++++++++++++- 2 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 test/instances/example.txt diff --git a/test/instances/example.txt b/test/instances/example.txt new file mode 100644 index 00000000..f6bbb1b0 --- /dev/null +++ b/test/instances/example.txt @@ -0,0 +1,5 @@ +1 1 0.1 +2 2 0.5 +1 4 -2.0 +4 2 1.0 +1 2 -0.3 diff --git a/test/ising.jl b/test/ising.jl index b18a8f5e..292c4975 100644 --- a/test/ising.jl +++ b/test/ising.jl @@ -2,6 +2,7 @@ using MetaGraphs using LightGraphs using GraphPlot using CSV +using Test function _energy(config::Dict, couplings::Dict, cedges::Dict, n::Int) eng = zeros(1,n) @@ -31,8 +32,130 @@ function _energy(ig::MetaGraph, config::Array) eng end -@testset "Ising" begin +for (instance, source) ∈ ( + ("$(@__DIR__)/instances/example.txt", "file"), + ( + Dict( + (1, 1) => 0.1, + (2, 2) => 0.5, + (1, 4) => -2.0, + (4, 2) => 1.0, + (1, 2) => -0.3 + ), + "array" + ) +) +@testset "Ising graph created from $(source)" begin + L = 5 + expected_num_vertices = 5 + expected_biases = [0.1, 0.5, 0.0, 0.0, 0.0] + expected_couplings = Dict( + Edge(1, 2) => -0.3, + Edge(1, 4) => -2.0, + Edge(2, 4) => 1.0 + ) + expected_J_matrix = [ + [0 -0.3 0 -2.0 0]; + [0 0 0 0 0]; + [0 0 0 0 0]; + [0 1.0 0 0 0]; + [0 0 0 0 0] + ] + + ig = ising_graph(instance, L) + + @testset "has number of vertices equal to passed instance size" begin + @test nv(ig) == expected_num_vertices + end + + @testset "has collection of edges comprising all interactions from instance" begin + # This test uses the fact that edges iterates in the lex ordering. + @test collect(edges(ig)) == [Edge(e...) for e in [(1, 2), (1, 4), (2, 4)]] + end + + @testset "has collection of active vertices comprising all vertices present in instance" begin + @test collect(filter_vertices(ig, :active, true)) == [1, 2, 4] + end + + @testset "has all vertices not appearing in instace set to inactive" begin + @test collect(filter_vertices(ig, :active, false)) == [3, 5] + end + + @testset "has instance size stored it its L property" begin + @test get_prop(ig, :L) == L + end + + @testset "stores biases both as property of vertices and its own property" begin + @test get_prop(ig, :h) == expected_biases + @test collect(map(v -> get_prop(ig, v, :h), vertices(ig))) == expected_biases + end + + @testset "stores couplings both as property of edges and its own property" begin + @test get_prop(ig, :J) == expected_J_matrix + @test all( + map(e -> expected_couplings[e] == get_prop(ig, e, :J), edges(ig)) + ) + end + + @testset "has cell of each vertex equal to its index" begin + @test collect(map(v -> get_prop(ig, v, :cell), vertices(ig))) == collect(1:L) + end + @testset "has a random initial state property of correct size" begin + @test length(get_prop(ig, :state)) == L + end + + @testset "has energy of its initial state stored in energy property" begin + @test energy(get_prop(ig, :state), ig) == get_prop(ig, :energy) + end + + @testset "has default rank stored for each active vertex" begin + @test get_prop(ig, :rank) == Dict(1 => 2, 2 => 2, 4 => 2) + end +end +end + + +@testset "Ising graph created with additional parameters" begin + expected_biases = [-0.1, -0.5, 0.0, 0.0, 0.0] + expected_couplings = Dict( + Edge(1, 2) => 0.3, + Edge(1, 4) => 2.0, + Edge(2, 4) => -1.0 + ) + expected_J_matrix = [ + [0 0.3 0 2.0 0]; + [0 0 0 0 0]; + [0 0 0 0 0]; + [0 -1.0 0 0 0]; + [0 0 0 0 0] + ] + + ig = ising_graph( + "$(@__DIR__)/instances/example.txt", + 5, + -1, + Dict(1 => 3, 4 => 4) + ) + + @testset "has rank overriden by rank_override dict" begin + # TODO: update default value of 2 once original implementation + # is also updated. + @test get_prop(ig, :rank) == Dict(1 => 3, 2 => 2, 4 => 4) + end + + @testset "has coefficients multiplied by given sign" begin + @test get_prop(ig, :h) == expected_biases + @test collect(map(v -> get_prop(ig, v, :h), vertices(ig))) == expected_biases + @test get_prop(ig, :J) == expected_J_matrix + @test all( + map(e -> expected_couplings[e] == get_prop(ig, e, :J), edges(ig)) + ) + end +end + + +@testset "Ising" begin L = 4 N = L^2 instance = "$(@__DIR__)/instances/$(N)_001.txt" From 58c55fab790fbf457e2540085eb490be0a32d1dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Ja=C5=82owiecki?= Date: Thu, 18 Feb 2021 02:47:56 +0100 Subject: [PATCH 100/110] Add tests for error checking during Ising graph creation --- test/ising.jl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/test/ising.jl b/test/ising.jl index 292c4975..48940e5f 100644 --- a/test/ising.jl +++ b/test/ising.jl @@ -32,6 +32,31 @@ function _energy(ig::MetaGraph, config::Array) eng end +@testset "Ising graph cannot be created" begin + @testset "if input instance contains vertices of index larger than provided graph size" begin + @test_throws ErrorException ising_graph( + Dict( + (1, 1) => 2.0, + (1, 2) => 0.5, + (1, 4) => -1.0 + ), + 3 + ) + end + + @testset "if input instance contains duplicate edges" begin + @test_throws ErrorException ising_graph( + Dict( + (1, 1) => 2.0, + (1, 2) => 0.5, + (2, 1) => -1.0 + ), + 3 + ) + end +end + + for (instance, source) ∈ ( ("$(@__DIR__)/instances/example.txt", "file"), ( From 783dc1b6cd00cf96dfba36c02bb820d8788119eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pawela?= <3093117+lpawela@users.noreply.github.com> Date: Thu, 18 Feb 2021 15:51:22 +0100 Subject: [PATCH 101/110] Delete indexing.jl --- test/indexing.jl | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 test/indexing.jl diff --git a/test/indexing.jl b/test/indexing.jl deleted file mode 100644 index c2852f86..00000000 --- a/test/indexing.jl +++ /dev/null @@ -1,41 +0,0 @@ - -@testset "Custom settings work with factor graph" begin - -# A1 | A2 -# | -# 1 -- 2 -|- 3 - -instance = Dict{Tuple{Int64, Int64}, Float64}() - -push!(instance, (1,1) => 0.704) -push!(instance, (2,2) => 0.868) -push!(instance, (3,3) => 0.592) - -push!(instance, (1, 2) => 0.652) -push!(instance, (2, 3) => 0.730) - -custom_rule = Dict(1 => 1, 2 => 1, 3 => 2) -custom_spec = Dict(1 => 3, 2 => 1) - -ig = ising_graph(instance, 3) -update_cells!( - ig, - rule = custom_rule, -) - -fg = factor_graph( - ig, - custom_spec, - energy=energy, - spectrum=full_spectrum, -) - -for v in vertices(fg) - cl = get_prop(fg, v, :cluster) - sp = get_prop(fg, v, :spectrum) - - @test length(sp.energies) == length(sp.states) == custom_spec[v] - @test collect(keys(cl.vertices)) == cluster(v, custom_rule) -end - -end \ No newline at end of file From 15b133e8b79a675360c4f8b3622e45a69ee351f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Gardas?= Date: Thu, 18 Feb 2021 15:58:19 +0100 Subject: [PATCH 102/110] clean tests for MPS a bit --- src/MPS_search.jl | 10 ++- src/ising.jl | 1 - test/MPS_search.jl | 190 ++++++++++++++++----------------------------- test/runtests.jl | 3 + 4 files changed, 75 insertions(+), 129 deletions(-) diff --git a/src/MPS_search.jl b/src/MPS_search.jl index 3086de7b..ae31ba38 100644 --- a/src/MPS_search.jl +++ b/src/MPS_search.jl @@ -88,18 +88,20 @@ _make_LL_new(ψ::AbstractMPS, b::Int, k::Int, d::Int) = zeros(eltype(ψ), b, k, # end -# ρ needs to be ∈ the right canonical form +# ψ needs to be ∈ the right canonical form function solve(ψ::AbstractMPS, keep::Int) @assert keep > 0 "Number of states has to be > 0" T = eltype(ψ) keep_extra = keep - lpCut = -1000 + lpCut = -1000 # do not like this! k = 1 + # this is not elegant if keep < prod(rank(ψ)) keep_extra += 1 end + lprob = zeros(T, k) states = fill([], 1, k) left_env = _make_left_env_new(ψ, k) @@ -120,9 +122,9 @@ function solve(ψ::AbstractMPS, keep::Int) LL[:, j, m] = L' * M[:, m, :] pdo[j, m] = dot(LL[:, j, m], LL[:, j, m]) config[:, j, m] = vcat(states[:, j]..., σ) - LL[:, j, m] = LL[:, j, m]/sqrt(pdo[j, m]) + LL[:, j, m] = LL[:, j, m] / sqrt(pdo[j, m]) end - pdo[j, :] = pdo[j, :]/sum(pdo[j, :]) + pdo[j, :] = pdo[j, :] / sum(pdo[j, :]) lpdo[j, :] = log.(pdo[j, :]) .+ lprob[j] end diff --git a/src/ising.jl b/src/ising.jl index 925edd07..a88d8455 100644 --- a/src/ising.jl +++ b/src/ising.jl @@ -53,7 +53,6 @@ function ising_graph( J = zeros(L, L) h = zeros(L) - #r # setup the model (J_ij, h_i) for (i, j, v) ∈ ising v *= sgn diff --git a/test/MPS_search.jl b/test/MPS_search.jl index 8a1c27f5..dc196942 100644 --- a/test/MPS_search.jl +++ b/test/MPS_search.jl @@ -2,181 +2,123 @@ using MetaGraphs using LightGraphs using GraphPlot +# This a semi-finished cleaning of this file + L = 2 N = L^2 instance = "$(@__DIR__)/instances/$(N)_001.txt" +# This is a mess, and it should be cleand up ig = ising_graph(instance, N) r = fill(2, N) set_prop!(ig, :rank, r) dβ = 0.01 β = 1 -sgn = -1. ϵ = 1E-8 D = prod(r) + 1 var_ϵ = 1E-8 sweeps = 4 -control = MPSControl(D, var_ϵ, sweeps, β, dβ) +# MPSControl should be removed +control = MPSControl(D, var_ϵ, sweeps, β, dβ) states = all_states(get_prop(ig, :rank)) -ϱ = gibbs_tensor(ig) -@test sum(ϱ) ≈ 1 - -@testset "Verifying gate operations" begin - rank = get_prop(ig, :rank) - - χ = HadamardMPS(rank) - T = ones(rank...) ./ prod(rank) - - @test sum(T) ≈ 1 - - for i ∈ 1:N - SpinGlassPEPS._apply_bias!(χ, ig, β, i) - - h = get_prop(ig, i, :h) - for σ ∈ states - T[idx.(σ)...] *= exp(sgn * β * σ[i] * h) - end - - nbrs = unique_neighbors(ig, i) - - if !isempty(nbrs) - - SpinGlassPEPS._apply_projector!(χ, i) - for j ∈ nbrs - SpinGlassPEPS._apply_exponent!(χ, ig, β, i, j, last(nbrs)) - - J = get_prop(ig, i, j, :J) - for σ ∈ states - T[idx.(σ)...] *= exp(sgn * β * σ[i] * J * σ[j]) - end - end - - for l ∈ SpinGlassPEPS._holes(i, nbrs) - SpinGlassPEPS._apply_nothing!(χ, l, i) - end - end - - verify_bonds(χ) - @test abs(dot(χ, χ) - sum(T)) < ϵ - end - x = T ./ sum(T) - @test T ./ sum(T) ≈ ϱ -end -@testset "MPS from gates" begin +@testset "Generating MPS" begin + ϱ = gibbs_tensor(ig, β) - @testset "Exact Gibbs pure state (MPS)" begin + @testset "Sqrt of the Gibbs state (aka state tensor)" begin L = nv(ig) rank = get_prop(ig, :rank) - @info "Generating Gibbs state - |ρ>" L rank β ϵ - ψ = ones(rank...) - for σ ∈ states for i ∈ 1:L h = get_prop(ig, i, :h) nbrs = unique_neighbors(ig, i) - ψ[idx.(σ)...] *= exp(sgn * 0.5 * β * h * σ[i]) + ψ[idx.(σ)...] *= exp(-0.5 * β * h * σ[i]) for j ∈ nbrs J = get_prop(ig, i, j, :J) - ψ[idx.(σ)...] *= exp(sgn * 0.5 * β * σ[i] * J * σ[j]) + ψ[idx.(σ)...] *= exp(-0.5 * β * σ[i] * J * σ[j]) end end end - ρ = abs.(ψ) .^ 2 - @test ρ / sum(ρ) ≈ ϱ - - @info "Generating MPS from |ρ>" + ρ = abs.(ψ) .^ 2 rψ = MPS(ψ) - @test dot(rψ, rψ) ≈ 1 - @test_nowarn is_right_normalized(rψ) - lψ = MPS(ψ, :left) - @test dot(lψ, lψ) ≈ 1 - - vlψ = vec(tensor(lψ)) - vrψ = vec(tensor(rψ)) - vψ = vec(ψ) - vψ /= norm(vψ) + @testset "produces correct Gibbs state" begin + @test ρ / sum(ρ) ≈ ϱ + end - @test abs(1 - abs(dot(vlψ, vrψ))) < ϵ - @test abs(1 - abs(dot(vlψ, vψ))) < ϵ + @testset "MPS from the tensor" begin - @info "Verifying MPS from gates" + @testset "can be right normalized" begin + @test dot(rψ, rψ) ≈ 1 + @test_nowarn is_right_normalized(rψ) + end - Gψ = MPS(ig, control) + @testset "can be left normalized" begin + @test dot(lψ, lψ) ≈ 1 + @test_nowarn is_left_normalized(lψ) + end - @test_nowarn is_right_normalized(Gψ) - @test bond_dimension(Gψ) > 1 - @test dot(Gψ, Gψ) ≈ 1 - @test_nowarn verify_bonds(Gψ) + @testset "both forms are the same (up to a phase factor)" begin + vlψ = vec(tensor(lψ)) + vrψ = vec(tensor(rψ)) - @test abs(1 - abs(dot(Gψ, rψ))) < ϵ + vψ = vec(ψ) + vψ /= norm(vψ) - @info "Verifying probabilities" L β + @test abs(1 - abs(dot(vlψ, vrψ))) < ϵ + @test abs(1 - abs(dot(vlψ, vψ))) < ϵ + end + end - for σ ∈ states - p = dot(rψ, σ) - r = dot(rψ, proj(σ, rank), rψ) + @testset "MPS from gates" begin + Gψ = MPS(ig, control) - @test p ≈ r - @test ϱ[idx.(σ)...] ≈ p - end + @testset "is built correctly" begin + @test abs(1 - abs(dot(Gψ, rψ))) < ϵ + end - for max_states ∈ [1, N, 2*N, N^2] - - @info "Verifying low energy spectrum" max_states - @info "Testing spectrum" - states, prob, pCut = solve(rψ, max_states) - sp = brute_force(ig, num_states = max_states) - - eng = zeros(length(prob)) - - for (j, (p, e)) ∈ enumerate(zip(prob, sp.energies)) - σ = states[j, :] - eng[j] = energy(σ, ig) - @test log(ϱ[idx.(σ)...]) ≈ p - #@test abs(energy(σ, ig) - e) < ϵ + @testset "is normalized" begin + @test dot(Gψ, Gψ) ≈ 1 + @test_nowarn is_right_normalized(Gψ) end - perm = partialsortperm(eng, 1:max_states) - eng = eng[perm] - states = states[perm, :] - prob = prob[perm] - state = states[1, :] - @test maximum(prob) > pCut -#= - @info "Testing spectrum_new" - states_new, prob_new, pCut_new = solve_new(rψ, max_states) - eng_new = zeros(length(prob_new)) - for (j, p) ∈ enumerate(prob) - σ = states_new[j, :] - eng_new[j] = energy(σ, ig) + @testset "has correct links and non-trivial bond dimension" begin + @test bond_dimension(Gψ) > 1 + @test_nowarn verify_bonds(Gψ) + end + end + + @testset "Exact probabilities are calculated correctely" begin + for σ ∈ states + p, r = dot(rψ, σ), dot(rψ, proj(σ, rank), rψ) + @test p ≈ r + @test ϱ[idx.(σ)...] ≈ p + end + end + + @testset "Results from solve agree with brute-force" begin + # The energy is wrong when max_states > N + + for max_states ∈ [1, N]#, 2*N, N^2] + states, prob, pCut = solve(rψ, max_states) + sp = brute_force(ig, num_states = max_states) + + for (j, (p, e)) ∈ enumerate(zip(prob, sp.energies)) + σ = states[j, :] + @test e ≈ energy(σ, ig) + @test log(ϱ[idx.(σ)...]) ≈ p + end end - - perm_new = partialsortperm(eng_new, 1:max_states) - eng_new = eng_new[perm_new] - states_new = states_new[perm_new, :] - prob_new = prob_new[perm_new] - state_new = states_new[1, :] - @info "The largest discarded probability" pCut_new - @test maximum(prob_new) > pCut_new - @info "State with the lowest energy" state_new - @info "Probability of the state with the lowest energy" prob_new[1] - @info "The lowest energy" eng_new[1] - - @test eng[1] == eng_new[1] - @test state == state_new - =# end end diff --git a/test/runtests.jl b/test/runtests.jl index 492fb07a..c4f340f1 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -30,6 +30,8 @@ end include("test_helpers.jl") push!(my_tests, +"MPS_search.jl", +#= "base.jl", "utils.jl", "contractions.jl", @@ -43,6 +45,7 @@ push!(my_tests, "PEPS.jl", "contract.jl", "indexing.jl", + =# ) for my_test in my_tests From a66012528cd107dedaec624d232998908de18a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Ja=C5=82owiecki?= Date: Thu, 18 Feb 2021 23:16:15 +0100 Subject: [PATCH 103/110] Initial cleanup of factor.jl tests --- test/factor.jl | 115 +++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 67 deletions(-) diff --git a/test/factor.jl b/test/factor.jl index ba1738ba..7308ffb9 100644 --- a/test/factor.jl +++ b/test/factor.jl @@ -7,11 +7,8 @@ using CSV m = 4 n = 4 t = 4 - - β = 1 - t = 4 - L = n * m * (2 * t) + instance = "$(@__DIR__)/instances/chimera_droplets/$(L)power/001.txt" ig = ising_graph(instance, L) @@ -23,7 +20,6 @@ using CSV @time fg = factor_graph(ig, 2) @test collect(vertices(fg)) == collect(1:m * n) - @test nv(fg) == m * n @info "Verifying cluster properties for Lattice" m, n, t @@ -42,6 +38,7 @@ using CSV end end + # Check if graph is factored correctly @test isempty(intersect(clv...)) @test isempty(intersect(cle...)) end @@ -50,8 +47,6 @@ end m = 3 n = 4 t = 3 - -β = 1 L = n * m * t instance = "$(@__DIR__)/instances/pathological/test_$(m)_$(n)_$(t).txt" @@ -63,39 +58,36 @@ for (i, j, v) ∈ ising push!(couplings, (i, j) => v) end -cedges = Dict() -push!(cedges, (1, 2) => [(1, 4), (1, 5), (1, 6)]) -push!(cedges, (1, 5) => [(1, 13)]) - -push!(cedges, (2, 3) => [(4, 7), (5, 7), (6, 8), (6, 9)]) -push!(cedges, (2, 6) => [(6, 16), (6, 18), (5, 16)]) - -push!(cedges, (5, 6) => [(13, 16), (13, 18)]) - -push!(cedges, (6, 10) => [(18, 28)]) -push!(cedges, (10, 11) => [(28, 31), (28, 32), (28, 33), (29, 31), (29, 32), (29, 33), (30, 31), (30, 32), (30, 33)]) +cedges = Dict( + (1, 2) => [(1, 4), (1, 5), (1, 6)], + (1, 5) => [(1, 13)], + (2, 3) => [(4, 7), (5, 7), (6, 8), (6, 9)], + (2, 6) => [(6, 16), (6, 18), (5, 16)], + (5, 6) => [(13, 16), (13, 18)], + (6, 10) => [(18, 28)], + (10, 11) => [(28, 31), (28, 32), (28, 33), (29, 31), (29, 32), (29, 33), (30, 31), (30, 32), (30, 33)] +) -cells = Dict() -push!(cells, 1 => [1]) -push!(cells, 2 => [4, 5, 6]) -push!(cells, 3 => [7, 8, 9]) -push!(cells, 4 => []) -push!(cells, 5 => [13]) -push!(cells, 6 => [16, 18]) -push!(cells, 7 => []) -push!(cells, 8 => []) -push!(cells, 9 => []) -push!(cells, 10 => [28, 29, 30]) -push!(cells, 11 => [31, 32, 33]) -push!(cells, 12 => []) +cells = Dict( + 1 => [1], + 2 => [4, 5, 6], + 3 => [7, 8, 9], + 4 => [], + 5 => [13], + 6 => [16, 18], + 7 => [], + 8 => [], + 9 => [], + 10 => [28, 29, 30], + 11 => [31, 32, 33], + 12 => [] +) d = 2 -rank = Dict() -for (c, idx) ∈ cells - if !isempty(idx) - push!(rank, c => fill(d, length(idx))) - end -end +rank = Dict( + c => fill(d, length(idx)) + for (c,idx) ∈ cells if !isempty(idx) +) bond_dimensions = [2, 2, 8, 4, 2, 2, 8] @@ -113,62 +105,61 @@ fg = factor_graph( for v ∈ vertices(fg) cl = get_prop(fg, v, :cluster) - nodes = [e for e in keys(cl.vertices)] - @test sort(nodes) == cells[v] + @test sort(collect(keys(cl.vertices))) == cells[v] end for (bd, e) in zip(bond_dimensions, edges(fg)) pl, en, pr = get_prop(fg, e, :split) - display(e) - println(size(pl), " ", size(en), " ", size(pr)) - - @test min(size(en)...) == bd + @test minimum(size(en)) == bd end -for (i, j) ∈ keys(cedges) +for ((i, j), cedge) ∈ cedges pl, en, pr = get_prop(fg, i, j, :split) - + base_i = all_states(rank[i]) base_j = all_states(rank[j]) idx_i = enum(cells[i]) idx_j = enum(cells[j]) + # Change it to test if energy is calculated using passed 'energy' function energy = zeros(prod(rank[i]), prod(rank[j])) for (ii, σ) ∈ enumerate(base_i) for (jj, η) ∈ enumerate(base_j) eij = 0. - for (k, l) ∈ values(cedges[i, j]) + for (k, l) ∈ values(cedge) kk, ll = enum(cells[i])[k], enum(cells[j])[l] s, r = σ[idx_i[k]], η[idx_j[l]] J = couplings[k, l] - eij += s * J * r + eij += s * J * r end energy[ii, jj] = eij end end - println("Edge ", i, " => ", j) - display(energy) - @test energy ≈ pl * (en * pr) end +@testset "each cluster comprises expected cells" begin for v ∈ vertices(fg) cl = get_prop(fg, v, :cluster) - + @test issetequal(keys(cl.vertices), cells[v]) +end +end - for w ∈ neighbors(fg, v) - ed = get_prop(fg, v, w, :edge) - for e in cedges[(v, w)] @test e ∈ Tuple.(ed.edges) end - for e in ed.edges @test Tuple(e) ∈ cedges[(v, w)] end - end +@testset "each edge comprises expected bunch of edges from source Ising graph" begin +for e ∈ edges(fg) + ed = get_prop(fg, e, :edge) + @test issetequal(cedges[Tuple(e)], Tuple.(ed.edges)) +end end end + + @testset "Rank reveal correctly decomposes energy row-wise" begin energy = [[1 2 3]; [0 -1 0]; [1 2 3]] P, E = rank_reveal(energy, :PE) @@ -198,21 +189,11 @@ end Pl, E_old = rank_reveal(energy, :PE) @test size(Pl) == (8, 8) @test size(E_old) == (8, 8) - println("energy: ") - display(energy) - println("Pl: ") - display(Pl) - println("E_old: ") - display(E_old) @test Pl * E_old ≈ energy E, Pr = rank_reveal(E_old, :EP) @test size(Pr) == (8, 8) @test size(E) == (8, 8) - println("E: ") - display(E) - println("Pr: ") - display(Pr) @test E * Pr ≈ E_old @test Pl * E * Pr ≈ energy -end \ No newline at end of file +end From 0f97aa25f2c7a4e09b390d8ea16ad6e16c938cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Ja=C5=82owiecki?= Date: Thu, 18 Feb 2021 23:16:26 +0100 Subject: [PATCH 104/110] Remove whitespaces --- src/factor.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/factor.jl b/src/factor.jl index 68c16367..0bfc7a77 100644 --- a/src/factor.jl +++ b/src/factor.jl @@ -12,7 +12,7 @@ end function factor_graph( ig::MetaGraph, num_states_cl::Int; - energy::Function=energy, + energy::Function=energy, spectrum::Function=full_spectrum ) d = _max_cell_num(ig) @@ -28,9 +28,9 @@ end function factor_graph( ig::MetaGraph, num_states_cl::Dict{Int, Int}=Dict{Int, Int}(); - energy::Function=energy, + energy::Function=energy, spectrum::Function=full_spectrum -) +) L = _max_cell_num(ig) fg = MetaDiGraph(L, 0.0) @@ -78,11 +78,11 @@ end function rank_reveal(energy, order=:PE) @assert order ∈ (:PE, :EP) dim = order == :PE ? 1 : 2 - + E, idx = unique_dims(energy, dim) - if order == :PE - P = zeros(size(energy, 1), size(E, 1)) + if order == :PE + P = zeros(size(energy, 1), size(E, 1)) else P = zeros(size(E, 2), size(energy, 2)) end From 70356cbae28ef6c8160b6b4eb0770464acd1dd04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Ja=C5=82owiecki?= Date: Thu, 18 Feb 2021 23:19:45 +0100 Subject: [PATCH 105/110] Move unused tests to attic --- {test => attic}/notation_tests.jl | 0 {test => attic}/peps_tests.jl | 0 {test => attic}/searchMPS.jl | 0 {test => attic}/testing_probabilities.jl | 0 {test => attic}/testing_probabilities_short.jl | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename {test => attic}/notation_tests.jl (100%) rename {test => attic}/peps_tests.jl (100%) rename {test => attic}/searchMPS.jl (100%) rename {test => attic}/testing_probabilities.jl (100%) rename {test => attic}/testing_probabilities_short.jl (100%) diff --git a/test/notation_tests.jl b/attic/notation_tests.jl similarity index 100% rename from test/notation_tests.jl rename to attic/notation_tests.jl diff --git a/test/peps_tests.jl b/attic/peps_tests.jl similarity index 100% rename from test/peps_tests.jl rename to attic/peps_tests.jl diff --git a/test/searchMPS.jl b/attic/searchMPS.jl similarity index 100% rename from test/searchMPS.jl rename to attic/searchMPS.jl diff --git a/test/testing_probabilities.jl b/attic/testing_probabilities.jl similarity index 100% rename from test/testing_probabilities.jl rename to attic/testing_probabilities.jl diff --git a/test/testing_probabilities_short.jl b/attic/testing_probabilities_short.jl similarity index 100% rename from test/testing_probabilities_short.jl rename to attic/testing_probabilities_short.jl From 2a0f796bb8338d834ed37d0026985c5eb2663da4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Ja=C5=82owiecki?= Date: Thu, 18 Feb 2021 23:24:40 +0100 Subject: [PATCH 106/110] Remove unit folder --- test/unit/graph.jl | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 test/unit/graph.jl diff --git a/test/unit/graph.jl b/test/unit/graph.jl deleted file mode 100644 index 2ba8f0c0..00000000 --- a/test/unit/graph.jl +++ /dev/null @@ -1,29 +0,0 @@ -using MetaGraphs -using LightGraphs -using GraphPlot -using CSV - -@testset "Chimera creation" begin - m = 6 - n = 7 - t = 4 - g = Chimera(m, n, t) - @test nv(g) == 2m * n * t - @test ne(g) == t^2 * m * n + m * (n -1) * t + (m - 1) * n * t - @test g[m, n, 2, t] == 2m * n * t - @test get_prop(g, g[m, n, 2, 1], :cluster) == (m, n) - @show g[1, 1] -end - -# @testset "Chimera graph" begin - # M = 4 - # N = 4 - # T = 4 - - # C = 2 * N * M * T - - # instance = "$(@__DIR__)/instances/chimera_droplets/$(C)power/001.txt" - # ig = ising_graph(instance, N) - # chimera = Chimera((M, N, T), ig) - -# end From 72dc98c51fdcf7a8872b17b0d78b5116f758ef8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Ja=C5=82owiecki?= Date: Thu, 18 Feb 2021 23:54:29 +0100 Subject: [PATCH 107/110] Move unused droplet instances --- test/chimera_droplets/128power/001.txt | 481 ++++++++++++++++++ .../chimera_droplets/2048power/001.txt | 0 .../2048power/groundstates_TN.txt | 0 .../chimera_droplets/512power/001.txt | 0 .../512power/groundstates_TN.txt | 0 5 files changed, 481 insertions(+) create mode 100755 test/chimera_droplets/128power/001.txt rename test/{instances => }/chimera_droplets/2048power/001.txt (100%) rename test/{instances => }/chimera_droplets/2048power/groundstates_TN.txt (100%) rename test/{instances => }/chimera_droplets/512power/001.txt (100%) rename test/{instances => }/chimera_droplets/512power/groundstates_TN.txt (100%) diff --git a/test/chimera_droplets/128power/001.txt b/test/chimera_droplets/128power/001.txt new file mode 100755 index 00000000..6e6454bd --- /dev/null +++ b/test/chimera_droplets/128power/001.txt @@ -0,0 +1,481 @@ +# +1 1 0.200000 +2 2 0.146667 +3 3 -0.173333 +4 4 -0.200000 +5 5 0.013333 +6 6 0.040000 +7 7 0.013333 +8 8 0.120000 +9 9 -0.093333 +10 10 -0.013333 +11 11 0.120000 +12 12 0.173333 +13 13 0.093333 +14 14 0.040000 +15 15 -0.146667 +16 16 -0.146667 +17 17 -0.146667 +18 18 -0.013333 +19 19 0.173333 +20 20 -0.066667 +21 21 0.066667 +22 22 -0.120000 +23 23 -0.173333 +24 24 0.120000 +25 25 -0.146667 +26 26 -0.093333 +27 27 0.146667 +28 28 -0.173333 +29 29 -0.120000 +30 30 -0.146667 +31 31 0.120000 +32 32 -0.120000 +33 33 -0.200000 +34 34 -0.173333 +35 35 -0.066667 +36 36 -0.120000 +37 37 -0.040000 +38 38 0.173333 +39 39 0.040000 +40 40 0.120000 +41 41 -0.066667 +42 42 0.120000 +43 43 0.066667 +44 44 -0.173333 +45 45 0.120000 +46 46 0.120000 +47 47 -0.013333 +48 48 -0.120000 +49 49 -0.120000 +50 50 0.146667 +51 51 -0.066667 +52 52 0.066667 +53 53 0.146667 +54 54 0.120000 +55 55 -0.173333 +56 56 -0.146667 +57 57 -0.066667 +58 58 0.173333 +59 59 -0.173333 +60 60 -0.200000 +61 61 0.093333 +62 62 0.200000 +63 63 -0.200000 +64 64 -0.040000 +65 65 0.146667 +66 66 -0.040000 +67 67 0.120000 +68 68 -0.146667 +69 69 -0.120000 +70 70 -0.093333 +71 71 -0.013333 +72 72 -0.013333 +73 73 0.200000 +74 74 -0.173333 +75 75 -0.173333 +76 76 -0.200000 +77 77 0.066667 +78 78 0.200000 +79 79 -0.146667 +80 80 -0.173333 +81 81 -0.146667 +82 82 0.120000 +83 83 0.120000 +84 84 0.173333 +85 85 -0.013333 +86 86 -0.146667 +87 87 0.200000 +88 88 0.013333 +89 89 -0.173333 +90 90 0.200000 +91 91 0.173333 +92 92 -0.040000 +93 93 -0.120000 +94 94 -0.120000 +95 95 0.120000 +96 96 0.066667 +97 97 -0.066667 +98 98 -0.173333 +99 99 0.200000 +100 100 -0.066667 +101 101 -0.013333 +102 102 0.066667 +103 103 0.013333 +104 104 0.200000 +105 105 -0.120000 +106 106 0.120000 +107 107 -0.093333 +108 108 -0.013333 +109 109 -0.093333 +110 110 -0.173333 +111 111 -0.120000 +112 112 0.093333 +113 113 -0.120000 +114 114 -0.040000 +115 115 0.120000 +116 116 0.093333 +117 117 -0.146667 +118 118 -0.066667 +119 119 -0.066667 +120 120 -0.040000 +121 121 -0.200000 +122 122 -0.120000 +123 123 -0.093333 +124 124 -0.013333 +125 125 0.066667 +126 126 -0.200000 +127 127 0.173333 +128 128 -0.146667 +1 5 0.200000 +1 6 -0.333333 +1 7 0.866667 +1 8 -1.000000 +1 33 -0.200000 +2 5 -0.466667 +2 6 1.000000 +2 7 0.600000 +2 8 -0.066667 +2 34 4.333333 +3 5 0.466667 +3 6 -0.600000 +3 7 -0.866667 +3 8 -0.466667 +3 35 -0.066667 +4 5 0.600000 +4 6 -1.000000 +4 7 0.066667 +4 8 -3.666667 +4 36 -0.466667 +5 13 0.333333 +6 14 -0.733333 +7 15 1.000000 +8 16 -0.333333 +9 13 -0.600000 +9 14 0.866667 +9 15 -0.600000 +9 16 -0.466667 +9 41 -0.200000 +10 13 0.466667 +10 14 -0.600000 +10 15 0.733333 +10 16 -0.866667 +10 42 -1.000000 +11 13 0.200000 +11 14 0.333333 +11 15 1.000000 +11 16 -0.866667 +11 43 0.333333 +12 13 -0.866667 +12 14 0.066667 +12 15 0.466667 +12 16 0.600000 +12 44 -0.333333 +13 21 -0.466667 +14 22 0.466667 +15 23 -0.200000 +16 24 0.733333 +17 21 3.000000 +17 22 0.200000 +17 23 0.066667 +17 24 -0.200000 +17 49 -1.000000 +18 21 2.333333 +18 22 -0.866667 +18 23 2.333333 +18 24 1.000000 +18 50 0.866667 +19 21 -1.666667 +19 22 -0.866667 +19 23 -0.466667 +19 24 -1.000000 +19 51 -0.466667 +20 21 -0.333333 +20 22 -0.066667 +20 23 -0.866667 +20 24 -0.600000 +20 52 -1.000000 +21 29 -0.066667 +22 30 -0.066667 +23 31 0.466667 +24 32 1.000000 +25 29 0.200000 +25 30 0.733333 +25 31 -1.000000 +25 32 -0.066667 +25 57 0.466667 +26 29 -0.466667 +26 30 -0.733333 +26 31 0.733333 +26 32 -0.866667 +26 58 0.600000 +27 29 -0.066667 +27 30 -0.333333 +27 31 -1.000000 +27 32 -0.600000 +27 59 0.333333 +28 29 0.733333 +28 30 -0.066667 +28 31 -0.600000 +28 32 -0.733333 +28 60 0.333333 +33 37 0.733333 +33 38 4.333333 +33 39 0.600000 +33 40 -0.200000 +33 65 0.866667 +34 37 0.866667 +34 38 -1.000000 +34 39 -0.200000 +34 40 0.733333 +34 66 0.333333 +35 37 -0.333333 +35 38 -0.333333 +35 39 0.600000 +35 40 0.733333 +35 67 -0.600000 +36 37 0.466667 +36 38 0.733333 +36 39 0.200000 +36 40 -1.000000 +36 68 -0.333333 +37 45 0.333333 +38 46 -0.733333 +39 47 5.000000 +40 48 0.333333 +41 45 0.600000 +41 46 -0.333333 +41 47 -0.466667 +41 48 -4.333333 +41 73 -0.066667 +42 45 -0.600000 +42 46 -0.200000 +42 47 0.733333 +42 48 -0.466667 +42 74 0.866667 +43 45 -0.733333 +43 46 0.333333 +43 47 -2.333333 +43 48 0.200000 +43 75 0.333333 +44 45 0.866667 +44 46 -1.000000 +44 47 -0.866667 +44 48 -1.000000 +44 76 0.200000 +45 53 0.866667 +46 54 -0.200000 +47 55 0.333333 +48 56 -0.866667 +49 53 -0.466667 +49 54 -0.733333 +49 55 -0.066667 +49 56 -0.066667 +49 81 -0.600000 +50 53 -1.000000 +50 54 -1.000000 +50 55 -0.066667 +50 56 -0.600000 +50 82 3.000000 +51 53 1.000000 +51 54 0.200000 +51 55 0.200000 +51 56 0.733333 +51 83 -0.600000 +52 53 -0.733333 +52 54 -0.733333 +52 55 0.066667 +52 56 -0.733333 +52 84 0.733333 +53 61 0.733333 +54 62 0.733333 +55 63 -0.066667 +56 64 -2.333333 +57 61 5.000000 +57 62 0.333333 +57 63 -0.866667 +57 64 -0.466667 +57 89 1.000000 +58 61 -0.200000 +58 62 -0.200000 +58 63 0.066667 +58 64 0.466667 +58 90 -0.733333 +59 61 -0.733333 +59 62 -0.200000 +59 63 0.333333 +59 64 -0.733333 +59 91 -0.200000 +60 61 -0.333333 +60 62 -0.600000 +60 63 -0.200000 +60 64 5.000000 +60 92 0.866667 +65 69 -3.000000 +65 70 1.000000 +65 71 1.000000 +65 72 0.733333 +65 97 0.466667 +66 69 1.000000 +66 70 -0.333333 +66 71 -0.066667 +66 72 0.066667 +66 98 0.733333 +67 69 -0.733333 +67 70 0.600000 +67 71 -3.666667 +67 72 4.333333 +67 99 0.600000 +68 69 -0.866667 +68 70 0.466667 +68 71 -0.333333 +68 72 -0.600000 +68 100 0.200000 +69 77 -0.600000 +70 78 -0.600000 +71 79 0.866667 +72 80 -0.200000 +73 77 -0.200000 +73 78 -1.666667 +73 79 0.333333 +73 80 -0.466667 +73 105 0.733333 +74 77 -0.066667 +74 78 0.066667 +74 79 0.200000 +74 80 -0.200000 +74 106 0.466667 +75 77 0.866667 +75 78 0.333333 +75 79 -0.066667 +75 80 3.000000 +75 107 -1.000000 +76 77 1.666667 +76 78 1.000000 +76 79 -0.600000 +76 80 0.333333 +76 108 1.000000 +77 85 -0.866667 +78 86 0.866667 +79 87 0.466667 +80 88 0.733333 +81 85 -1.000000 +81 86 1.000000 +81 87 -0.466667 +81 88 3.666667 +81 113 -4.333333 +82 85 0.200000 +82 86 -0.200000 +82 87 0.866667 +82 88 -0.733333 +82 114 0.333333 +83 85 0.733333 +83 86 -0.200000 +83 87 0.066667 +83 88 0.333333 +83 115 -0.200000 +84 85 0.200000 +84 86 0.066667 +84 87 -0.866667 +84 88 -0.733333 +84 116 -0.333333 +85 93 0.333333 +86 94 -1.000000 +87 95 -0.866667 +88 96 -0.200000 +89 93 -0.066667 +89 94 0.600000 +89 95 -0.866667 +89 96 1.000000 +89 121 0.333333 +90 93 -0.466667 +90 94 0.733333 +90 95 1.000000 +90 96 -0.466667 +90 122 0.866667 +91 93 0.733333 +91 94 0.200000 +91 95 0.333333 +91 96 -0.733333 +91 123 -0.600000 +92 93 -0.600000 +92 94 -0.466667 +92 95 0.200000 +92 96 -0.733333 +92 124 0.600000 +97 101 -0.866667 +97 102 -0.333333 +97 103 -0.466667 +97 104 0.733333 +98 101 -2.333333 +98 102 -3.000000 +98 103 0.866667 +98 104 0.733333 +99 101 1.000000 +99 102 -0.866667 +99 103 0.733333 +99 104 -0.733333 +100 101 0.866667 +100 102 -0.066667 +100 103 -1.000000 +100 104 -0.200000 +101 109 0.466667 +102 110 0.600000 +103 111 0.066667 +104 112 0.600000 +105 109 -3.666667 +105 110 1.000000 +105 111 -1.000000 +105 112 0.600000 +106 109 0.466667 +106 110 0.733333 +106 111 0.600000 +106 112 0.866667 +107 109 3.666667 +107 110 -0.466667 +107 111 0.600000 +107 112 0.333333 +108 109 0.866667 +108 110 0.066667 +108 111 0.733333 +108 112 -0.733333 +109 117 0.333333 +110 118 -0.600000 +111 119 0.866667 +112 120 0.333333 +113 117 5.000000 +113 118 -0.866667 +113 119 -1.666667 +113 120 -0.600000 +114 117 1.000000 +114 118 0.333333 +114 119 0.333333 +114 120 -0.600000 +115 117 -0.466667 +115 118 -0.466667 +115 119 0.600000 +115 120 0.066667 +116 117 0.600000 +116 118 0.733333 +116 119 -0.600000 +116 120 0.333333 +117 125 -1.000000 +118 126 0.466667 +119 127 -0.466667 +120 128 0.466667 +121 125 -0.200000 +121 126 0.600000 +121 127 0.066667 +121 128 4.333333 +122 125 0.066667 +122 126 -0.600000 +122 127 1.000000 +122 128 0.333333 +123 125 0.466667 +123 126 -0.733333 +123 127 -0.066667 +123 128 0.600000 +124 125 -0.333333 +124 126 -0.466667 +124 127 -0.200000 +124 128 -0.866667 \ No newline at end of file diff --git a/test/instances/chimera_droplets/2048power/001.txt b/test/chimera_droplets/2048power/001.txt similarity index 100% rename from test/instances/chimera_droplets/2048power/001.txt rename to test/chimera_droplets/2048power/001.txt diff --git a/test/instances/chimera_droplets/2048power/groundstates_TN.txt b/test/chimera_droplets/2048power/groundstates_TN.txt similarity index 100% rename from test/instances/chimera_droplets/2048power/groundstates_TN.txt rename to test/chimera_droplets/2048power/groundstates_TN.txt diff --git a/test/instances/chimera_droplets/512power/001.txt b/test/chimera_droplets/512power/001.txt similarity index 100% rename from test/instances/chimera_droplets/512power/001.txt rename to test/chimera_droplets/512power/001.txt diff --git a/test/instances/chimera_droplets/512power/groundstates_TN.txt b/test/chimera_droplets/512power/groundstates_TN.txt similarity index 100% rename from test/instances/chimera_droplets/512power/groundstates_TN.txt rename to test/chimera_droplets/512power/groundstates_TN.txt From 08211ef3595274700586f635759c6b78bca9ba13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Ja=C5=82owiecki?= Date: Thu, 18 Feb 2021 23:55:20 +0100 Subject: [PATCH 108/110] Delete unused droplet instances --- test/chimera_droplets/128power/001.txt | 481 - test/chimera_droplets/2048power/001.txt | 8065 ----------------- .../2048power/groundstates_TN.txt | 1 - test/chimera_droplets/512power/001.txt | 1985 ---- .../512power/groundstates_TN.txt | 1 - 5 files changed, 10533 deletions(-) delete mode 100755 test/chimera_droplets/128power/001.txt delete mode 100755 test/chimera_droplets/2048power/001.txt delete mode 100644 test/chimera_droplets/2048power/groundstates_TN.txt delete mode 100755 test/chimera_droplets/512power/001.txt delete mode 100644 test/chimera_droplets/512power/groundstates_TN.txt diff --git a/test/chimera_droplets/128power/001.txt b/test/chimera_droplets/128power/001.txt deleted file mode 100755 index 6e6454bd..00000000 --- a/test/chimera_droplets/128power/001.txt +++ /dev/null @@ -1,481 +0,0 @@ -# -1 1 0.200000 -2 2 0.146667 -3 3 -0.173333 -4 4 -0.200000 -5 5 0.013333 -6 6 0.040000 -7 7 0.013333 -8 8 0.120000 -9 9 -0.093333 -10 10 -0.013333 -11 11 0.120000 -12 12 0.173333 -13 13 0.093333 -14 14 0.040000 -15 15 -0.146667 -16 16 -0.146667 -17 17 -0.146667 -18 18 -0.013333 -19 19 0.173333 -20 20 -0.066667 -21 21 0.066667 -22 22 -0.120000 -23 23 -0.173333 -24 24 0.120000 -25 25 -0.146667 -26 26 -0.093333 -27 27 0.146667 -28 28 -0.173333 -29 29 -0.120000 -30 30 -0.146667 -31 31 0.120000 -32 32 -0.120000 -33 33 -0.200000 -34 34 -0.173333 -35 35 -0.066667 -36 36 -0.120000 -37 37 -0.040000 -38 38 0.173333 -39 39 0.040000 -40 40 0.120000 -41 41 -0.066667 -42 42 0.120000 -43 43 0.066667 -44 44 -0.173333 -45 45 0.120000 -46 46 0.120000 -47 47 -0.013333 -48 48 -0.120000 -49 49 -0.120000 -50 50 0.146667 -51 51 -0.066667 -52 52 0.066667 -53 53 0.146667 -54 54 0.120000 -55 55 -0.173333 -56 56 -0.146667 -57 57 -0.066667 -58 58 0.173333 -59 59 -0.173333 -60 60 -0.200000 -61 61 0.093333 -62 62 0.200000 -63 63 -0.200000 -64 64 -0.040000 -65 65 0.146667 -66 66 -0.040000 -67 67 0.120000 -68 68 -0.146667 -69 69 -0.120000 -70 70 -0.093333 -71 71 -0.013333 -72 72 -0.013333 -73 73 0.200000 -74 74 -0.173333 -75 75 -0.173333 -76 76 -0.200000 -77 77 0.066667 -78 78 0.200000 -79 79 -0.146667 -80 80 -0.173333 -81 81 -0.146667 -82 82 0.120000 -83 83 0.120000 -84 84 0.173333 -85 85 -0.013333 -86 86 -0.146667 -87 87 0.200000 -88 88 0.013333 -89 89 -0.173333 -90 90 0.200000 -91 91 0.173333 -92 92 -0.040000 -93 93 -0.120000 -94 94 -0.120000 -95 95 0.120000 -96 96 0.066667 -97 97 -0.066667 -98 98 -0.173333 -99 99 0.200000 -100 100 -0.066667 -101 101 -0.013333 -102 102 0.066667 -103 103 0.013333 -104 104 0.200000 -105 105 -0.120000 -106 106 0.120000 -107 107 -0.093333 -108 108 -0.013333 -109 109 -0.093333 -110 110 -0.173333 -111 111 -0.120000 -112 112 0.093333 -113 113 -0.120000 -114 114 -0.040000 -115 115 0.120000 -116 116 0.093333 -117 117 -0.146667 -118 118 -0.066667 -119 119 -0.066667 -120 120 -0.040000 -121 121 -0.200000 -122 122 -0.120000 -123 123 -0.093333 -124 124 -0.013333 -125 125 0.066667 -126 126 -0.200000 -127 127 0.173333 -128 128 -0.146667 -1 5 0.200000 -1 6 -0.333333 -1 7 0.866667 -1 8 -1.000000 -1 33 -0.200000 -2 5 -0.466667 -2 6 1.000000 -2 7 0.600000 -2 8 -0.066667 -2 34 4.333333 -3 5 0.466667 -3 6 -0.600000 -3 7 -0.866667 -3 8 -0.466667 -3 35 -0.066667 -4 5 0.600000 -4 6 -1.000000 -4 7 0.066667 -4 8 -3.666667 -4 36 -0.466667 -5 13 0.333333 -6 14 -0.733333 -7 15 1.000000 -8 16 -0.333333 -9 13 -0.600000 -9 14 0.866667 -9 15 -0.600000 -9 16 -0.466667 -9 41 -0.200000 -10 13 0.466667 -10 14 -0.600000 -10 15 0.733333 -10 16 -0.866667 -10 42 -1.000000 -11 13 0.200000 -11 14 0.333333 -11 15 1.000000 -11 16 -0.866667 -11 43 0.333333 -12 13 -0.866667 -12 14 0.066667 -12 15 0.466667 -12 16 0.600000 -12 44 -0.333333 -13 21 -0.466667 -14 22 0.466667 -15 23 -0.200000 -16 24 0.733333 -17 21 3.000000 -17 22 0.200000 -17 23 0.066667 -17 24 -0.200000 -17 49 -1.000000 -18 21 2.333333 -18 22 -0.866667 -18 23 2.333333 -18 24 1.000000 -18 50 0.866667 -19 21 -1.666667 -19 22 -0.866667 -19 23 -0.466667 -19 24 -1.000000 -19 51 -0.466667 -20 21 -0.333333 -20 22 -0.066667 -20 23 -0.866667 -20 24 -0.600000 -20 52 -1.000000 -21 29 -0.066667 -22 30 -0.066667 -23 31 0.466667 -24 32 1.000000 -25 29 0.200000 -25 30 0.733333 -25 31 -1.000000 -25 32 -0.066667 -25 57 0.466667 -26 29 -0.466667 -26 30 -0.733333 -26 31 0.733333 -26 32 -0.866667 -26 58 0.600000 -27 29 -0.066667 -27 30 -0.333333 -27 31 -1.000000 -27 32 -0.600000 -27 59 0.333333 -28 29 0.733333 -28 30 -0.066667 -28 31 -0.600000 -28 32 -0.733333 -28 60 0.333333 -33 37 0.733333 -33 38 4.333333 -33 39 0.600000 -33 40 -0.200000 -33 65 0.866667 -34 37 0.866667 -34 38 -1.000000 -34 39 -0.200000 -34 40 0.733333 -34 66 0.333333 -35 37 -0.333333 -35 38 -0.333333 -35 39 0.600000 -35 40 0.733333 -35 67 -0.600000 -36 37 0.466667 -36 38 0.733333 -36 39 0.200000 -36 40 -1.000000 -36 68 -0.333333 -37 45 0.333333 -38 46 -0.733333 -39 47 5.000000 -40 48 0.333333 -41 45 0.600000 -41 46 -0.333333 -41 47 -0.466667 -41 48 -4.333333 -41 73 -0.066667 -42 45 -0.600000 -42 46 -0.200000 -42 47 0.733333 -42 48 -0.466667 -42 74 0.866667 -43 45 -0.733333 -43 46 0.333333 -43 47 -2.333333 -43 48 0.200000 -43 75 0.333333 -44 45 0.866667 -44 46 -1.000000 -44 47 -0.866667 -44 48 -1.000000 -44 76 0.200000 -45 53 0.866667 -46 54 -0.200000 -47 55 0.333333 -48 56 -0.866667 -49 53 -0.466667 -49 54 -0.733333 -49 55 -0.066667 -49 56 -0.066667 -49 81 -0.600000 -50 53 -1.000000 -50 54 -1.000000 -50 55 -0.066667 -50 56 -0.600000 -50 82 3.000000 -51 53 1.000000 -51 54 0.200000 -51 55 0.200000 -51 56 0.733333 -51 83 -0.600000 -52 53 -0.733333 -52 54 -0.733333 -52 55 0.066667 -52 56 -0.733333 -52 84 0.733333 -53 61 0.733333 -54 62 0.733333 -55 63 -0.066667 -56 64 -2.333333 -57 61 5.000000 -57 62 0.333333 -57 63 -0.866667 -57 64 -0.466667 -57 89 1.000000 -58 61 -0.200000 -58 62 -0.200000 -58 63 0.066667 -58 64 0.466667 -58 90 -0.733333 -59 61 -0.733333 -59 62 -0.200000 -59 63 0.333333 -59 64 -0.733333 -59 91 -0.200000 -60 61 -0.333333 -60 62 -0.600000 -60 63 -0.200000 -60 64 5.000000 -60 92 0.866667 -65 69 -3.000000 -65 70 1.000000 -65 71 1.000000 -65 72 0.733333 -65 97 0.466667 -66 69 1.000000 -66 70 -0.333333 -66 71 -0.066667 -66 72 0.066667 -66 98 0.733333 -67 69 -0.733333 -67 70 0.600000 -67 71 -3.666667 -67 72 4.333333 -67 99 0.600000 -68 69 -0.866667 -68 70 0.466667 -68 71 -0.333333 -68 72 -0.600000 -68 100 0.200000 -69 77 -0.600000 -70 78 -0.600000 -71 79 0.866667 -72 80 -0.200000 -73 77 -0.200000 -73 78 -1.666667 -73 79 0.333333 -73 80 -0.466667 -73 105 0.733333 -74 77 -0.066667 -74 78 0.066667 -74 79 0.200000 -74 80 -0.200000 -74 106 0.466667 -75 77 0.866667 -75 78 0.333333 -75 79 -0.066667 -75 80 3.000000 -75 107 -1.000000 -76 77 1.666667 -76 78 1.000000 -76 79 -0.600000 -76 80 0.333333 -76 108 1.000000 -77 85 -0.866667 -78 86 0.866667 -79 87 0.466667 -80 88 0.733333 -81 85 -1.000000 -81 86 1.000000 -81 87 -0.466667 -81 88 3.666667 -81 113 -4.333333 -82 85 0.200000 -82 86 -0.200000 -82 87 0.866667 -82 88 -0.733333 -82 114 0.333333 -83 85 0.733333 -83 86 -0.200000 -83 87 0.066667 -83 88 0.333333 -83 115 -0.200000 -84 85 0.200000 -84 86 0.066667 -84 87 -0.866667 -84 88 -0.733333 -84 116 -0.333333 -85 93 0.333333 -86 94 -1.000000 -87 95 -0.866667 -88 96 -0.200000 -89 93 -0.066667 -89 94 0.600000 -89 95 -0.866667 -89 96 1.000000 -89 121 0.333333 -90 93 -0.466667 -90 94 0.733333 -90 95 1.000000 -90 96 -0.466667 -90 122 0.866667 -91 93 0.733333 -91 94 0.200000 -91 95 0.333333 -91 96 -0.733333 -91 123 -0.600000 -92 93 -0.600000 -92 94 -0.466667 -92 95 0.200000 -92 96 -0.733333 -92 124 0.600000 -97 101 -0.866667 -97 102 -0.333333 -97 103 -0.466667 -97 104 0.733333 -98 101 -2.333333 -98 102 -3.000000 -98 103 0.866667 -98 104 0.733333 -99 101 1.000000 -99 102 -0.866667 -99 103 0.733333 -99 104 -0.733333 -100 101 0.866667 -100 102 -0.066667 -100 103 -1.000000 -100 104 -0.200000 -101 109 0.466667 -102 110 0.600000 -103 111 0.066667 -104 112 0.600000 -105 109 -3.666667 -105 110 1.000000 -105 111 -1.000000 -105 112 0.600000 -106 109 0.466667 -106 110 0.733333 -106 111 0.600000 -106 112 0.866667 -107 109 3.666667 -107 110 -0.466667 -107 111 0.600000 -107 112 0.333333 -108 109 0.866667 -108 110 0.066667 -108 111 0.733333 -108 112 -0.733333 -109 117 0.333333 -110 118 -0.600000 -111 119 0.866667 -112 120 0.333333 -113 117 5.000000 -113 118 -0.866667 -113 119 -1.666667 -113 120 -0.600000 -114 117 1.000000 -114 118 0.333333 -114 119 0.333333 -114 120 -0.600000 -115 117 -0.466667 -115 118 -0.466667 -115 119 0.600000 -115 120 0.066667 -116 117 0.600000 -116 118 0.733333 -116 119 -0.600000 -116 120 0.333333 -117 125 -1.000000 -118 126 0.466667 -119 127 -0.466667 -120 128 0.466667 -121 125 -0.200000 -121 126 0.600000 -121 127 0.066667 -121 128 4.333333 -122 125 0.066667 -122 126 -0.600000 -122 127 1.000000 -122 128 0.333333 -123 125 0.466667 -123 126 -0.733333 -123 127 -0.066667 -123 128 0.600000 -124 125 -0.333333 -124 126 -0.466667 -124 127 -0.200000 -124 128 -0.866667 \ No newline at end of file diff --git a/test/chimera_droplets/2048power/001.txt b/test/chimera_droplets/2048power/001.txt deleted file mode 100755 index bffdb36a..00000000 --- a/test/chimera_droplets/2048power/001.txt +++ /dev/null @@ -1,8065 +0,0 @@ -# -1 1 -0.013333 -2 2 -0.066667 -3 3 -0.040000 -4 4 -0.066667 -5 5 0.120000 -6 6 -0.066667 -7 7 0.066667 -8 8 -0.093333 -9 9 0.173333 -10 10 0.200000 -11 11 0.146667 -12 12 0.066667 -13 13 0.013333 -14 14 0.066667 -15 15 -0.013333 -16 16 -0.093333 -17 17 -0.146667 -18 18 -0.066667 -19 19 0.040000 -20 20 0.146667 -21 21 0.200000 -22 22 0.146667 -23 23 0.066667 -24 24 -0.093333 -25 25 0.173333 -26 26 -0.200000 -27 27 -0.173333 -28 28 0.040000 -29 29 0.120000 -30 30 0.040000 -31 31 0.013333 -32 32 0.040000 -33 33 0.120000 -34 34 -0.146667 -35 35 0.040000 -36 36 0.040000 -37 37 0.066667 -38 38 -0.146667 -39 39 0.120000 -40 40 -0.173333 -41 41 -0.173333 -42 42 0.013333 -43 43 0.120000 -44 44 -0.173333 -45 45 0.120000 -46 46 -0.146667 -47 47 0.040000 -48 48 0.013333 -49 49 0.013333 -50 50 0.146667 -51 51 -0.120000 -52 52 0.040000 -53 53 -0.066667 -54 54 -0.120000 -55 55 -0.040000 -56 56 0.013333 -57 57 0.066667 -58 58 -0.093333 -59 59 -0.173333 -60 60 -0.093333 -61 61 0.173333 -62 62 -0.173333 -63 63 0.013333 -64 64 -0.013333 -65 65 0.146667 -66 66 0.066667 -67 67 -0.146667 -68 68 -0.040000 -69 69 -0.146667 -70 70 -0.093333 -71 71 0.173333 -72 72 0.120000 -73 73 0.093333 -74 74 0.173333 -75 75 0.013333 -76 76 0.173333 -77 77 -0.200000 -78 78 -0.200000 -79 79 -0.066667 -80 80 0.146667 -81 81 0.013333 -82 82 -0.066667 -83 83 -0.040000 -84 84 0.040000 -85 85 -0.040000 -86 86 0.040000 -87 87 -0.040000 -88 88 0.173333 -89 89 0.040000 -90 90 0.200000 -91 91 -0.200000 -92 92 0.040000 -93 93 -0.120000 -94 94 0.093333 -95 95 0.093333 -96 96 0.040000 -97 97 0.146667 -98 98 0.093333 -99 99 -0.173333 -100 100 0.200000 -101 101 -0.093333 -102 102 -0.146667 -103 103 -0.013333 -104 104 -0.173333 -105 105 0.173333 -106 106 -0.040000 -107 107 -0.200000 -108 108 0.146667 -109 109 0.093333 -110 110 -0.173333 -111 111 -0.120000 -112 112 0.173333 -113 113 -0.173333 -114 114 -0.093333 -115 115 0.093333 -116 116 -0.200000 -117 117 -0.066667 -118 118 0.120000 -119 119 0.173333 -120 120 -0.146667 -121 121 0.013333 -122 122 -0.066667 -123 123 -0.066667 -124 124 0.013333 -125 125 -0.093333 -126 126 0.013333 -127 127 0.146667 -128 128 -0.040000 -129 129 -0.066667 -130 130 0.093333 -131 131 -0.146667 -132 132 -0.120000 -133 133 0.200000 -134 134 0.093333 -135 135 -0.066667 -136 136 0.173333 -137 137 -0.120000 -138 138 0.040000 -139 139 -0.120000 -140 140 -0.066667 -141 141 -0.146667 -142 142 0.120000 -143 143 0.040000 -144 144 0.120000 -145 145 0.093333 -146 146 -0.173333 -147 147 0.200000 -148 148 0.013333 -149 149 -0.173333 -150 150 -0.066667 -151 151 -0.093333 -152 152 -0.120000 -153 153 -0.013333 -154 154 -0.040000 -155 155 0.093333 -156 156 -0.173333 -157 157 -0.120000 -158 158 -0.120000 -159 159 -0.013333 -160 160 -0.093333 -161 161 0.066667 -162 162 -0.013333 -163 163 0.040000 -164 164 0.173333 -165 165 0.146667 -166 166 -0.173333 -167 167 0.200000 -168 168 -0.200000 -169 169 -0.200000 -170 170 0.066667 -171 171 0.040000 -172 172 0.066667 -173 173 0.173333 -174 174 0.200000 -175 175 0.093333 -176 176 0.040000 -177 177 0.173333 -178 178 0.040000 -179 179 -0.120000 -180 180 0.066667 -181 181 0.173333 -182 182 0.040000 -183 183 -0.120000 -184 184 0.093333 -185 185 0.173333 -186 186 -0.200000 -187 187 -0.093333 -188 188 -0.013333 -189 189 -0.120000 -190 190 -0.040000 -191 191 -0.093333 -192 192 0.173333 -193 193 0.013333 -194 194 -0.120000 -195 195 0.093333 -196 196 0.013333 -197 197 0.066667 -198 198 0.066667 -199 199 0.173333 -200 200 0.120000 -201 201 0.120000 -202 202 0.093333 -203 203 -0.120000 -204 204 -0.040000 -205 205 0.200000 -206 206 0.093333 -207 207 -0.200000 -208 208 0.093333 -209 209 -0.200000 -210 210 0.040000 -211 211 0.013333 -212 212 -0.200000 -213 213 0.173333 -214 214 -0.093333 -215 215 -0.120000 -216 216 0.066667 -217 217 0.013333 -218 218 -0.120000 -219 219 -0.093333 -220 220 0.146667 -221 221 0.146667 -222 222 -0.146667 -223 223 -0.040000 -224 224 0.066667 -225 225 0.120000 -226 226 -0.066667 -227 227 -0.013333 -228 228 0.173333 -229 229 -0.013333 -230 230 0.173333 -231 231 0.093333 -232 232 0.040000 -233 233 -0.066667 -234 234 -0.200000 -235 235 0.200000 -236 236 -0.066667 -237 237 -0.040000 -238 238 0.146667 -239 239 0.173333 -240 240 -0.200000 -241 241 0.200000 -242 242 -0.146667 -243 243 -0.173333 -244 244 -0.173333 -245 245 0.146667 -246 246 0.013333 -247 247 0.013333 -248 248 -0.146667 -249 249 -0.013333 -250 250 0.013333 -251 251 -0.040000 -252 252 -0.120000 -253 253 0.040000 -254 254 -0.200000 -255 255 0.066667 -256 256 -0.013333 -257 257 0.040000 -258 258 -0.066667 -259 259 0.200000 -260 260 -0.200000 -261 261 0.013333 -262 262 -0.013333 -263 263 0.120000 -264 264 0.200000 -265 265 0.040000 -266 266 -0.066667 -267 267 0.200000 -268 268 0.146667 -269 269 -0.173333 -270 270 -0.040000 -271 271 0.040000 -272 272 0.120000 -273 273 0.173333 -274 274 -0.040000 -275 275 -0.066667 -276 276 0.013333 -277 277 0.173333 -278 278 0.120000 -279 279 0.120000 -280 280 -0.093333 -281 281 0.040000 -282 282 0.173333 -283 283 -0.066667 -284 284 -0.120000 -285 285 -0.200000 -286 286 -0.146667 -287 287 0.013333 -288 288 0.093333 -289 289 -0.040000 -290 290 -0.040000 -291 291 -0.093333 -292 292 -0.093333 -293 293 -0.093333 -294 294 -0.093333 -295 295 -0.173333 -296 296 0.013333 -297 297 0.120000 -298 298 0.146667 -299 299 -0.093333 -300 300 -0.200000 -301 301 0.040000 -302 302 -0.093333 -303 303 -0.093333 -304 304 -0.066667 -305 305 -0.146667 -306 306 -0.093333 -307 307 -0.200000 -308 308 0.120000 -309 309 -0.200000 -310 310 0.066667 -311 311 0.040000 -312 312 -0.013333 -313 313 0.066667 -314 314 -0.066667 -315 315 -0.146667 -316 316 0.200000 -317 317 -0.173333 -318 318 0.040000 -319 319 -0.200000 -320 320 0.200000 -321 321 0.013333 -322 322 0.146667 -323 323 -0.146667 -324 324 0.013333 -325 325 0.200000 -326 326 -0.013333 -327 327 -0.040000 -328 328 -0.173333 -329 329 0.013333 -330 330 -0.200000 -331 331 -0.013333 -332 332 -0.066667 -333 333 0.013333 -334 334 0.146667 -335 335 0.173333 -336 336 0.066667 -337 337 -0.066667 -338 338 -0.146667 -339 339 -0.120000 -340 340 0.040000 -341 341 -0.173333 -342 342 -0.093333 -343 343 0.093333 -344 344 -0.066667 -345 345 0.013333 -346 346 0.173333 -347 347 0.040000 -348 348 -0.120000 -349 349 0.146667 -350 350 -0.066667 -351 351 0.120000 -352 352 0.040000 -353 353 0.120000 -354 354 0.146667 -355 355 -0.013333 -356 356 0.013333 -357 357 -0.066667 -358 358 0.013333 -359 359 -0.173333 -360 360 0.200000 -361 361 0.173333 -362 362 0.013333 -363 363 0.093333 -364 364 -0.120000 -365 365 -0.146667 -366 366 -0.013333 -367 367 0.013333 -368 368 0.093333 -369 369 -0.013333 -370 370 0.200000 -371 371 -0.146667 -372 372 0.146667 -373 373 0.040000 -374 374 0.013333 -375 375 0.146667 -376 376 -0.093333 -377 377 0.093333 -378 378 -0.040000 -379 379 0.146667 -380 380 0.040000 -381 381 0.040000 -382 382 0.146667 -383 383 0.093333 -384 384 0.120000 -385 385 0.040000 -386 386 0.120000 -387 387 0.066667 -388 388 -0.013333 -389 389 0.173333 -390 390 0.173333 -391 391 0.200000 -392 392 -0.200000 -393 393 0.066667 -394 394 -0.013333 -395 395 -0.120000 -396 396 -0.040000 -397 397 0.066667 -398 398 0.093333 -399 399 0.040000 -400 400 -0.146667 -401 401 -0.200000 -402 402 0.200000 -403 403 0.013333 -404 404 0.093333 -405 405 0.066667 -406 406 0.200000 -407 407 0.200000 -408 408 -0.066667 -409 409 0.013333 -410 410 0.040000 -411 411 -0.040000 -412 412 -0.173333 -413 413 0.040000 -414 414 -0.200000 -415 415 -0.066667 -416 416 0.040000 -417 417 -0.173333 -418 418 -0.093333 -419 419 0.040000 -420 420 -0.120000 -421 421 0.173333 -422 422 -0.200000 -423 423 -0.013333 -424 424 -0.093333 -425 425 0.066667 -426 426 0.200000 -427 427 -0.093333 -428 428 -0.200000 -429 429 0.040000 -430 430 0.200000 -431 431 -0.066667 -432 432 -0.173333 -433 433 -0.146667 -434 434 0.146667 -435 435 0.146667 -436 436 -0.120000 -437 437 0.146667 -438 438 -0.013333 -439 439 0.013333 -440 440 0.093333 -441 441 -0.120000 -442 442 0.093333 -443 443 0.093333 -444 444 -0.173333 -445 445 -0.120000 -446 446 -0.120000 -447 447 0.146667 -448 448 -0.013333 -449 449 -0.120000 -450 450 -0.040000 -451 451 -0.013333 -452 452 0.040000 -453 453 0.013333 -454 454 0.013333 -455 455 -0.173333 -456 456 -0.146667 -457 457 0.066667 -458 458 0.200000 -459 459 0.146667 -460 460 0.146667 -461 461 -0.066667 -462 462 0.093333 -463 463 0.146667 -464 464 0.013333 -465 465 -0.040000 -466 466 0.120000 -467 467 0.013333 -468 468 0.173333 -469 469 -0.093333 -470 470 0.093333 -471 471 0.146667 -472 472 0.013333 -473 473 0.120000 -474 474 -0.040000 -475 475 0.120000 -476 476 0.120000 -477 477 0.173333 -478 478 -0.040000 -479 479 0.093333 -480 480 0.200000 -481 481 -0.013333 -482 482 0.093333 -483 483 0.200000 -484 484 0.200000 -485 485 -0.040000 -486 486 -0.040000 -487 487 0.013333 -488 488 0.173333 -489 489 0.013333 -490 490 -0.120000 -491 491 -0.173333 -492 492 0.093333 -493 493 0.093333 -494 494 -0.146667 -495 495 -0.173333 -496 496 -0.040000 -497 497 0.173333 -498 498 0.173333 -499 499 -0.093333 -500 500 0.066667 -501 501 -0.066667 -502 502 -0.093333 -503 503 0.120000 -504 504 -0.173333 -505 505 0.200000 -506 506 -0.066667 -507 507 -0.013333 -508 508 0.200000 -509 509 0.200000 -510 510 0.066667 -511 511 -0.173333 -512 512 0.040000 -513 513 -0.173333 -514 514 0.066667 -515 515 -0.040000 -516 516 0.066667 -517 517 0.200000 -518 518 0.093333 -519 519 -0.200000 -520 520 -0.066667 -521 521 0.146667 -522 522 0.200000 -523 523 0.066667 -524 524 -0.173333 -525 525 0.200000 -526 526 0.200000 -527 527 0.066667 -528 528 -0.093333 -529 529 -0.066667 -530 530 0.200000 -531 531 0.066667 -532 532 0.173333 -533 533 0.066667 -534 534 0.066667 -535 535 -0.173333 -536 536 -0.146667 -537 537 -0.066667 -538 538 -0.200000 -539 539 0.066667 -540 540 -0.013333 -541 541 0.040000 -542 542 -0.093333 -543 543 -0.040000 -544 544 0.093333 -545 545 -0.013333 -546 546 0.040000 -547 547 -0.093333 -548 548 0.066667 -549 549 0.093333 -550 550 -0.120000 -551 551 0.093333 -552 552 -0.146667 -553 553 0.120000 -554 554 0.040000 -555 555 -0.146667 -556 556 0.013333 -557 557 0.013333 -558 558 0.173333 -559 559 -0.120000 -560 560 -0.013333 -561 561 0.040000 -562 562 -0.146667 -563 563 0.120000 -564 564 -0.040000 -565 565 0.146667 -566 566 0.040000 -567 567 -0.146667 -568 568 -0.173333 -569 569 0.013333 -570 570 0.146667 -571 571 0.040000 -572 572 0.066667 -573 573 -0.173333 -574 574 -0.200000 -575 575 -0.013333 -576 576 0.013333 -577 577 -0.173333 -578 578 0.120000 -579 579 -0.120000 -580 580 -0.066667 -581 581 -0.013333 -582 582 -0.093333 -583 583 0.200000 -584 584 0.066667 -585 585 0.120000 -586 586 0.066667 -587 587 0.013333 -588 588 0.146667 -589 589 -0.040000 -590 590 0.200000 -591 591 0.120000 -592 592 0.066667 -593 593 0.066667 -594 594 -0.120000 -595 595 -0.013333 -596 596 0.146667 -597 597 0.066667 -598 598 0.013333 -599 599 0.146667 -600 600 0.146667 -601 601 -0.040000 -602 602 -0.146667 -603 603 0.066667 -604 604 0.066667 -605 605 -0.013333 -606 606 0.173333 -607 607 -0.120000 -608 608 0.120000 -609 609 0.066667 -610 610 -0.173333 -611 611 -0.146667 -612 612 0.066667 -613 613 0.066667 -614 614 0.120000 -615 615 -0.066667 -616 616 0.173333 -617 617 -0.066667 -618 618 0.120000 -619 619 0.146667 -620 620 -0.013333 -621 621 0.173333 -622 622 0.120000 -623 623 -0.093333 -624 624 -0.120000 -625 625 0.066667 -626 626 0.120000 -627 627 -0.173333 -628 628 0.013333 -629 629 0.173333 -630 630 0.093333 -631 631 -0.093333 -632 632 -0.040000 -633 633 -0.146667 -634 634 -0.120000 -635 635 0.146667 -636 636 -0.146667 -637 637 -0.093333 -638 638 -0.040000 -639 639 -0.040000 -640 640 -0.066667 -641 641 -0.066667 -642 642 0.066667 -643 643 0.093333 -644 644 0.040000 -645 645 -0.200000 -646 646 0.066667 -647 647 0.013333 -648 648 0.146667 -649 649 0.173333 -650 650 0.040000 -651 651 0.173333 -652 652 -0.120000 -653 653 -0.120000 -654 654 -0.093333 -655 655 0.040000 -656 656 -0.066667 -657 657 -0.200000 -658 658 -0.173333 -659 659 0.013333 -660 660 0.066667 -661 661 0.013333 -662 662 -0.173333 -663 663 0.093333 -664 664 -0.120000 -665 665 -0.200000 -666 666 0.066667 -667 667 0.200000 -668 668 0.093333 -669 669 0.093333 -670 670 0.066667 -671 671 0.173333 -672 672 -0.200000 -673 673 0.013333 -674 674 -0.093333 -675 675 -0.066667 -676 676 0.066667 -677 677 -0.040000 -678 678 0.120000 -679 679 -0.120000 -680 680 -0.173333 -681 681 -0.173333 -682 682 -0.120000 -683 683 0.013333 -684 684 0.093333 -685 685 -0.120000 -686 686 -0.093333 -687 687 -0.146667 -688 688 -0.040000 -689 689 0.093333 -690 690 -0.066667 -691 691 0.093333 -692 692 -0.093333 -693 693 0.013333 -694 694 0.146667 -695 695 -0.146667 -696 696 -0.066667 -697 697 -0.120000 -698 698 -0.013333 -699 699 -0.040000 -700 700 0.040000 -701 701 -0.013333 -702 702 -0.093333 -703 703 0.093333 -704 704 0.093333 -705 705 0.173333 -706 706 -0.093333 -707 707 0.120000 -708 708 -0.013333 -709 709 -0.200000 -710 710 -0.066667 -711 711 0.146667 -712 712 0.066667 -713 713 0.200000 -714 714 0.200000 -715 715 0.146667 -716 716 0.040000 -717 717 0.013333 -718 718 0.200000 -719 719 -0.093333 -720 720 -0.200000 -721 721 0.013333 -722 722 0.040000 -723 723 -0.040000 -724 724 0.173333 -725 725 -0.093333 -726 726 0.173333 -727 727 0.093333 -728 728 0.200000 -729 729 -0.040000 -730 730 0.093333 -731 731 -0.093333 -732 732 0.040000 -733 733 0.040000 -734 734 0.040000 -735 735 -0.093333 -736 736 -0.093333 -737 737 0.066667 -738 738 0.200000 -739 739 0.066667 -740 740 0.066667 -741 741 -0.120000 -742 742 0.120000 -743 743 -0.200000 -744 744 -0.040000 -745 745 0.173333 -746 746 -0.173333 -747 747 -0.066667 -748 748 -0.120000 -749 749 0.066667 -750 750 0.120000 -751 751 0.013333 -752 752 -0.173333 -753 753 -0.066667 -754 754 0.120000 -755 755 -0.200000 -756 756 -0.200000 -757 757 -0.040000 -758 758 -0.146667 -759 759 0.066667 -760 760 0.013333 -761 761 -0.040000 -762 762 0.173333 -763 763 -0.120000 -764 764 -0.120000 -765 765 0.040000 -766 766 0.013333 -767 767 0.120000 -768 768 0.200000 -769 769 0.066667 -770 770 -0.013333 -771 771 0.040000 -772 772 -0.093333 -773 773 -0.013333 -774 774 -0.093333 -775 775 -0.146667 -776 776 0.146667 -777 777 0.173333 -778 778 -0.120000 -779 779 -0.066667 -780 780 -0.146667 -781 781 0.093333 -782 782 0.040000 -783 783 0.093333 -784 784 0.066667 -785 785 0.173333 -786 786 -0.093333 -787 787 0.040000 -788 788 0.120000 -789 789 0.066667 -790 790 -0.066667 -791 791 0.146667 -792 792 -0.173333 -793 793 -0.146667 -794 794 0.040000 -795 795 -0.013333 -796 796 0.040000 -797 797 -0.040000 -798 798 -0.146667 -799 799 0.146667 -800 800 0.173333 -801 801 0.013333 -802 802 -0.173333 -803 803 -0.173333 -804 804 -0.013333 -805 805 -0.066667 -806 806 -0.173333 -807 807 -0.013333 -808 808 -0.120000 -809 809 -0.200000 -810 810 -0.040000 -811 811 -0.093333 -812 812 0.200000 -813 813 -0.200000 -814 814 0.040000 -815 815 0.066667 -816 816 0.066667 -817 817 -0.120000 -818 818 -0.120000 -819 819 -0.093333 -820 820 0.146667 -821 821 0.093333 -822 822 -0.013333 -823 823 -0.120000 -824 824 -0.013333 -825 825 -0.040000 -826 826 0.146667 -827 827 0.120000 -828 828 -0.013333 -829 829 -0.120000 -830 830 -0.200000 -831 831 -0.120000 -832 832 0.013333 -833 833 -0.173333 -834 834 -0.146667 -835 835 0.066667 -836 836 -0.120000 -837 837 -0.013333 -838 838 0.173333 -839 839 -0.066667 -840 840 0.146667 -841 841 -0.146667 -842 842 -0.200000 -843 843 -0.066667 -844 844 -0.013333 -845 845 0.120000 -846 846 -0.040000 -847 847 0.013333 -848 848 0.093333 -849 849 0.146667 -850 850 -0.146667 -851 851 0.093333 -852 852 -0.013333 -853 853 -0.120000 -854 854 -0.200000 -855 855 0.093333 -856 856 0.013333 -857 857 0.173333 -858 858 -0.173333 -859 859 -0.173333 -860 860 0.120000 -861 861 0.173333 -862 862 0.200000 -863 863 -0.200000 -864 864 -0.146667 -865 865 -0.093333 -866 866 -0.093333 -867 867 -0.013333 -868 868 0.146667 -869 869 0.173333 -870 870 -0.040000 -871 871 0.120000 -872 872 0.040000 -873 873 0.093333 -874 874 -0.066667 -875 875 -0.120000 -876 876 -0.173333 -877 877 -0.173333 -878 878 0.146667 -879 879 -0.146667 -880 880 -0.066667 -881 881 -0.066667 -882 882 0.040000 -883 883 -0.066667 -884 884 -0.146667 -885 885 0.093333 -886 886 0.066667 -887 887 -0.013333 -888 888 -0.120000 -889 889 -0.120000 -890 890 0.040000 -891 891 0.093333 -892 892 -0.093333 -893 893 0.066667 -894 894 0.066667 -895 895 -0.013333 -896 896 -0.200000 -897 897 -0.200000 -898 898 0.120000 -899 899 -0.173333 -900 900 -0.093333 -901 901 0.066667 -902 902 0.013333 -903 903 -0.093333 -904 904 -0.200000 -905 905 0.066667 -906 906 0.066667 -907 907 0.093333 -908 908 0.013333 -909 909 0.040000 -910 910 0.066667 -911 911 0.173333 -912 912 -0.040000 -913 913 -0.093333 -914 914 0.013333 -915 915 0.093333 -916 916 -0.120000 -917 917 0.013333 -918 918 0.120000 -919 919 -0.120000 -920 920 -0.173333 -921 921 -0.120000 -922 922 0.146667 -923 923 -0.093333 -924 924 0.093333 -925 925 -0.040000 -926 926 -0.120000 -927 927 -0.013333 -928 928 0.093333 -929 929 -0.040000 -930 930 -0.200000 -931 931 -0.200000 -932 932 -0.173333 -933 933 -0.013333 -934 934 -0.040000 -935 935 -0.120000 -936 936 0.013333 -937 937 -0.013333 -938 938 -0.173333 -939 939 0.120000 -940 940 0.120000 -941 941 -0.200000 -942 942 0.173333 -943 943 -0.040000 -944 944 -0.173333 -945 945 0.173333 -946 946 0.066667 -947 947 -0.040000 -948 948 0.173333 -949 949 0.093333 -950 950 -0.040000 -951 951 0.066667 -952 952 -0.013333 -953 953 -0.146667 -954 954 0.120000 -955 955 0.093333 -956 956 0.200000 -957 957 -0.120000 -958 958 -0.093333 -959 959 -0.040000 -960 960 -0.120000 -961 961 0.200000 -962 962 0.146667 -963 963 -0.013333 -964 964 0.040000 -965 965 -0.173333 -966 966 0.040000 -967 967 -0.146667 -968 968 0.120000 -969 969 0.120000 -970 970 0.200000 -971 971 0.093333 -972 972 0.173333 -973 973 0.040000 -974 974 -0.120000 -975 975 0.040000 -976 976 -0.040000 -977 977 0.040000 -978 978 0.093333 -979 979 0.173333 -980 980 0.200000 -981 981 -0.066667 -982 982 0.146667 -983 983 0.173333 -984 984 0.173333 -985 985 -0.040000 -986 986 -0.093333 -987 987 -0.066667 -988 988 0.040000 -989 989 -0.040000 -990 990 0.093333 -991 991 0.066667 -992 992 -0.200000 -993 993 -0.066667 -994 994 0.066667 -995 995 0.013333 -996 996 -0.040000 -997 997 0.120000 -998 998 -0.066667 -999 999 -0.173333 -1000 1000 0.173333 -1001 1001 -0.146667 -1002 1002 0.200000 -1003 1003 -0.040000 -1004 1004 0.120000 -1005 1005 0.120000 -1006 1006 0.146667 -1007 1007 0.093333 -1008 1008 -0.066667 -1009 1009 -0.040000 -1010 1010 -0.040000 -1011 1011 -0.200000 -1012 1012 0.093333 -1013 1013 0.013333 -1014 1014 -0.040000 -1015 1015 -0.173333 -1016 1016 0.120000 -1017 1017 -0.173333 -1018 1018 0.146667 -1019 1019 0.146667 -1020 1020 -0.200000 -1021 1021 -0.120000 -1022 1022 -0.093333 -1023 1023 -0.173333 -1024 1024 0.120000 -1025 1025 0.173333 -1026 1026 0.120000 -1027 1027 0.173333 -1028 1028 0.040000 -1029 1029 -0.013333 -1030 1030 0.200000 -1031 1031 -0.146667 -1032 1032 -0.040000 -1033 1033 -0.146667 -1034 1034 -0.040000 -1035 1035 -0.120000 -1036 1036 0.040000 -1037 1037 -0.120000 -1038 1038 0.120000 -1039 1039 0.066667 -1040 1040 0.146667 -1041 1041 -0.146667 -1042 1042 0.200000 -1043 1043 -0.013333 -1044 1044 0.200000 -1045 1045 0.093333 -1046 1046 0.120000 -1047 1047 0.013333 -1048 1048 -0.013333 -1049 1049 -0.066667 -1050 1050 0.040000 -1051 1051 0.120000 -1052 1052 0.040000 -1053 1053 0.120000 -1054 1054 0.146667 -1055 1055 0.013333 -1056 1056 -0.066667 -1057 1057 -0.120000 -1058 1058 0.093333 -1059 1059 -0.173333 -1060 1060 -0.200000 -1061 1061 -0.013333 -1062 1062 0.066667 -1063 1063 -0.120000 -1064 1064 0.093333 -1065 1065 0.200000 -1066 1066 0.146667 -1067 1067 0.093333 -1068 1068 0.066667 -1069 1069 0.146667 -1070 1070 0.146667 -1071 1071 0.093333 -1072 1072 -0.040000 -1073 1073 -0.066667 -1074 1074 0.173333 -1075 1075 -0.200000 -1076 1076 0.066667 -1077 1077 -0.013333 -1078 1078 0.173333 -1079 1079 0.013333 -1080 1080 -0.066667 -1081 1081 -0.093333 -1082 1082 0.200000 -1083 1083 0.066667 -1084 1084 -0.173333 -1085 1085 -0.120000 -1086 1086 0.120000 -1087 1087 0.066667 -1088 1088 -0.120000 -1089 1089 -0.066667 -1090 1090 -0.040000 -1091 1091 0.173333 -1092 1092 0.173333 -1093 1093 -0.173333 -1094 1094 -0.173333 -1095 1095 -0.120000 -1096 1096 0.173333 -1097 1097 0.040000 -1098 1098 -0.093333 -1099 1099 0.013333 -1100 1100 -0.173333 -1101 1101 0.066667 -1102 1102 -0.093333 -1103 1103 0.040000 -1104 1104 0.013333 -1105 1105 -0.120000 -1106 1106 0.013333 -1107 1107 0.013333 -1108 1108 -0.066667 -1109 1109 -0.120000 -1110 1110 -0.013333 -1111 1111 -0.093333 -1112 1112 -0.013333 -1113 1113 -0.173333 -1114 1114 0.013333 -1115 1115 0.120000 -1116 1116 -0.013333 -1117 1117 -0.066667 -1118 1118 0.173333 -1119 1119 -0.093333 -1120 1120 0.066667 -1121 1121 0.200000 -1122 1122 -0.173333 -1123 1123 0.173333 -1124 1124 -0.200000 -1125 1125 -0.173333 -1126 1126 -0.066667 -1127 1127 -0.013333 -1128 1128 0.040000 -1129 1129 0.040000 -1130 1130 -0.146667 -1131 1131 -0.200000 -1132 1132 -0.173333 -1133 1133 -0.200000 -1134 1134 -0.093333 -1135 1135 0.200000 -1136 1136 -0.066667 -1137 1137 -0.013333 -1138 1138 -0.120000 -1139 1139 0.093333 -1140 1140 -0.093333 -1141 1141 0.040000 -1142 1142 0.146667 -1143 1143 -0.040000 -1144 1144 -0.066667 -1145 1145 0.200000 -1146 1146 0.040000 -1147 1147 -0.093333 -1148 1148 -0.040000 -1149 1149 -0.120000 -1150 1150 0.093333 -1151 1151 -0.173333 -1152 1152 0.146667 -1153 1153 -0.146667 -1154 1154 0.173333 -1155 1155 -0.200000 -1156 1156 0.013333 -1157 1157 0.013333 -1158 1158 0.040000 -1159 1159 -0.173333 -1160 1160 -0.200000 -1161 1161 0.093333 -1162 1162 0.013333 -1163 1163 -0.013333 -1164 1164 0.120000 -1165 1165 -0.173333 -1166 1166 -0.146667 -1167 1167 0.040000 -1168 1168 0.013333 -1169 1169 -0.066667 -1170 1170 -0.093333 -1171 1171 0.013333 -1172 1172 -0.093333 -1173 1173 -0.093333 -1174 1174 0.040000 -1175 1175 -0.173333 -1176 1176 0.093333 -1177 1177 -0.066667 -1178 1178 0.013333 -1179 1179 0.146667 -1180 1180 0.200000 -1181 1181 -0.040000 -1182 1182 0.120000 -1183 1183 0.066667 -1184 1184 -0.066667 -1185 1185 -0.200000 -1186 1186 0.120000 -1187 1187 0.013333 -1188 1188 -0.120000 -1189 1189 0.173333 -1190 1190 -0.146667 -1191 1191 0.013333 -1192 1192 0.173333 -1193 1193 0.040000 -1194 1194 0.120000 -1195 1195 0.040000 -1196 1196 -0.040000 -1197 1197 0.013333 -1198 1198 0.013333 -1199 1199 -0.173333 -1200 1200 -0.040000 -1201 1201 0.093333 -1202 1202 0.120000 -1203 1203 -0.093333 -1204 1204 -0.013333 -1205 1205 -0.146667 -1206 1206 -0.040000 -1207 1207 -0.066667 -1208 1208 -0.173333 -1209 1209 -0.200000 -1210 1210 0.120000 -1211 1211 -0.173333 -1212 1212 0.200000 -1213 1213 0.173333 -1214 1214 -0.013333 -1215 1215 0.093333 -1216 1216 -0.146667 -1217 1217 -0.066667 -1218 1218 0.200000 -1219 1219 0.066667 -1220 1220 0.013333 -1221 1221 0.013333 -1222 1222 0.173333 -1223 1223 -0.066667 -1224 1224 0.120000 -1225 1225 -0.093333 -1226 1226 -0.040000 -1227 1227 -0.040000 -1228 1228 0.093333 -1229 1229 0.066667 -1230 1230 0.173333 -1231 1231 -0.146667 -1232 1232 0.066667 -1233 1233 0.013333 -1234 1234 -0.173333 -1235 1235 0.040000 -1236 1236 0.093333 -1237 1237 0.120000 -1238 1238 -0.093333 -1239 1239 -0.146667 -1240 1240 -0.013333 -1241 1241 -0.093333 -1242 1242 0.173333 -1243 1243 0.120000 -1244 1244 0.040000 -1245 1245 0.200000 -1246 1246 -0.040000 -1247 1247 -0.066667 -1248 1248 -0.120000 -1249 1249 -0.173333 -1250 1250 0.146667 -1251 1251 0.173333 -1252 1252 0.146667 -1253 1253 -0.093333 -1254 1254 0.173333 -1255 1255 0.066667 -1256 1256 -0.093333 -1257 1257 -0.173333 -1258 1258 -0.013333 -1259 1259 -0.013333 -1260 1260 -0.040000 -1261 1261 0.120000 -1262 1262 0.013333 -1263 1263 0.040000 -1264 1264 0.200000 -1265 1265 -0.093333 -1266 1266 -0.040000 -1267 1267 0.146667 -1268 1268 0.013333 -1269 1269 -0.200000 -1270 1270 -0.093333 -1271 1271 -0.013333 -1272 1272 -0.066667 -1273 1273 0.146667 -1274 1274 -0.120000 -1275 1275 -0.146667 -1276 1276 -0.040000 -1277 1277 -0.066667 -1278 1278 -0.200000 -1279 1279 0.173333 -1280 1280 0.013333 -1281 1281 -0.120000 -1282 1282 0.040000 -1283 1283 -0.120000 -1284 1284 0.040000 -1285 1285 -0.146667 -1286 1286 -0.120000 -1287 1287 0.040000 -1288 1288 0.146667 -1289 1289 -0.013333 -1290 1290 -0.120000 -1291 1291 0.013333 -1292 1292 -0.120000 -1293 1293 -0.013333 -1294 1294 -0.146667 -1295 1295 -0.173333 -1296 1296 -0.093333 -1297 1297 0.173333 -1298 1298 -0.200000 -1299 1299 -0.146667 -1300 1300 -0.066667 -1301 1301 -0.173333 -1302 1302 0.013333 -1303 1303 -0.200000 -1304 1304 -0.120000 -1305 1305 0.146667 -1306 1306 -0.093333 -1307 1307 -0.040000 -1308 1308 -0.093333 -1309 1309 0.093333 -1310 1310 -0.173333 -1311 1311 -0.173333 -1312 1312 0.146667 -1313 1313 0.013333 -1314 1314 -0.066667 -1315 1315 0.173333 -1316 1316 0.120000 -1317 1317 0.146667 -1318 1318 0.173333 -1319 1319 0.200000 -1320 1320 -0.066667 -1321 1321 -0.200000 -1322 1322 0.173333 -1323 1323 -0.120000 -1324 1324 0.200000 -1325 1325 -0.200000 -1326 1326 -0.066667 -1327 1327 0.040000 -1328 1328 -0.040000 -1329 1329 -0.120000 -1330 1330 -0.200000 -1331 1331 0.200000 -1332 1332 0.040000 -1333 1333 -0.040000 -1334 1334 -0.013333 -1335 1335 0.093333 -1336 1336 0.040000 -1337 1337 0.146667 -1338 1338 0.173333 -1339 1339 0.040000 -1340 1340 0.066667 -1341 1341 0.200000 -1342 1342 -0.013333 -1343 1343 -0.013333 -1344 1344 -0.066667 -1345 1345 -0.013333 -1346 1346 0.093333 -1347 1347 -0.173333 -1348 1348 0.040000 -1349 1349 -0.040000 -1350 1350 -0.146667 -1351 1351 -0.066667 -1352 1352 -0.146667 -1353 1353 0.200000 -1354 1354 -0.093333 -1355 1355 0.040000 -1356 1356 0.120000 -1357 1357 0.200000 -1358 1358 -0.066667 -1359 1359 -0.146667 -1360 1360 0.013333 -1361 1361 -0.146667 -1362 1362 0.093333 -1363 1363 0.146667 -1364 1364 -0.093333 -1365 1365 0.200000 -1366 1366 -0.066667 -1367 1367 0.120000 -1368 1368 0.013333 -1369 1369 -0.173333 -1370 1370 0.013333 -1371 1371 0.146667 -1372 1372 -0.120000 -1373 1373 0.093333 -1374 1374 -0.200000 -1375 1375 0.013333 -1376 1376 -0.200000 -1377 1377 0.200000 -1378 1378 -0.013333 -1379 1379 0.066667 -1380 1380 0.173333 -1381 1381 -0.040000 -1382 1382 -0.173333 -1383 1383 0.173333 -1384 1384 0.200000 -1385 1385 -0.013333 -1386 1386 0.093333 -1387 1387 -0.066667 -1388 1388 -0.120000 -1389 1389 0.200000 -1390 1390 0.066667 -1391 1391 0.120000 -1392 1392 -0.120000 -1393 1393 -0.040000 -1394 1394 -0.040000 -1395 1395 -0.013333 -1396 1396 0.146667 -1397 1397 0.013333 -1398 1398 -0.066667 -1399 1399 0.146667 -1400 1400 -0.173333 -1401 1401 0.013333 -1402 1402 -0.093333 -1403 1403 -0.013333 -1404 1404 0.146667 -1405 1405 -0.040000 -1406 1406 -0.066667 -1407 1407 -0.093333 -1408 1408 0.013333 -1409 1409 -0.120000 -1410 1410 -0.120000 -1411 1411 -0.066667 -1412 1412 -0.066667 -1413 1413 -0.200000 -1414 1414 0.200000 -1415 1415 0.040000 -1416 1416 0.040000 -1417 1417 -0.200000 -1418 1418 0.013333 -1419 1419 0.173333 -1420 1420 0.200000 -1421 1421 -0.200000 -1422 1422 -0.093333 -1423 1423 0.200000 -1424 1424 -0.120000 -1425 1425 -0.120000 -1426 1426 0.173333 -1427 1427 0.146667 -1428 1428 0.093333 -1429 1429 -0.013333 -1430 1430 0.173333 -1431 1431 -0.173333 -1432 1432 -0.146667 -1433 1433 0.093333 -1434 1434 0.013333 -1435 1435 -0.120000 -1436 1436 -0.040000 -1437 1437 0.200000 -1438 1438 -0.066667 -1439 1439 -0.093333 -1440 1440 -0.146667 -1441 1441 0.146667 -1442 1442 -0.066667 -1443 1443 0.200000 -1444 1444 0.066667 -1445 1445 -0.093333 -1446 1446 -0.146667 -1447 1447 -0.013333 -1448 1448 -0.173333 -1449 1449 -0.173333 -1450 1450 -0.120000 -1451 1451 -0.093333 -1452 1452 0.093333 -1453 1453 0.120000 -1454 1454 -0.146667 -1455 1455 -0.200000 -1456 1456 0.120000 -1457 1457 0.173333 -1458 1458 -0.066667 -1459 1459 -0.013333 -1460 1460 0.040000 -1461 1461 -0.066667 -1462 1462 0.093333 -1463 1463 0.200000 -1464 1464 -0.120000 -1465 1465 -0.013333 -1466 1466 -0.173333 -1467 1467 0.120000 -1468 1468 0.146667 -1469 1469 0.066667 -1470 1470 0.120000 -1471 1471 -0.040000 -1472 1472 -0.173333 -1473 1473 0.040000 -1474 1474 0.173333 -1475 1475 -0.040000 -1476 1476 0.146667 -1477 1477 -0.066667 -1478 1478 0.146667 -1479 1479 -0.093333 -1480 1480 0.173333 -1481 1481 0.040000 -1482 1482 0.066667 -1483 1483 0.200000 -1484 1484 -0.013333 -1485 1485 -0.093333 -1486 1486 -0.146667 -1487 1487 -0.200000 -1488 1488 -0.120000 -1489 1489 0.093333 -1490 1490 -0.066667 -1491 1491 -0.040000 -1492 1492 0.200000 -1493 1493 0.066667 -1494 1494 -0.146667 -1495 1495 0.013333 -1496 1496 -0.040000 -1497 1497 -0.120000 -1498 1498 -0.093333 -1499 1499 0.066667 -1500 1500 -0.173333 -1501 1501 0.173333 -1502 1502 0.146667 -1503 1503 0.040000 -1504 1504 -0.040000 -1505 1505 0.066667 -1506 1506 0.066667 -1507 1507 0.146667 -1508 1508 0.040000 -1509 1509 0.066667 -1510 1510 0.066667 -1511 1511 0.173333 -1512 1512 0.040000 -1513 1513 0.066667 -1514 1514 -0.200000 -1515 1515 0.066667 -1516 1516 0.200000 -1517 1517 -0.146667 -1518 1518 -0.093333 -1519 1519 -0.013333 -1520 1520 -0.013333 -1521 1521 0.173333 -1522 1522 0.146667 -1523 1523 -0.146667 -1524 1524 -0.013333 -1525 1525 -0.066667 -1526 1526 0.013333 -1527 1527 -0.200000 -1528 1528 -0.013333 -1529 1529 0.120000 -1530 1530 -0.040000 -1531 1531 -0.093333 -1532 1532 0.200000 -1533 1533 -0.173333 -1534 1534 -0.120000 -1535 1535 0.093333 -1536 1536 0.200000 -1537 1537 -0.120000 -1538 1538 -0.120000 -1539 1539 -0.173333 -1540 1540 -0.040000 -1541 1541 -0.120000 -1542 1542 -0.013333 -1543 1543 -0.173333 -1544 1544 0.040000 -1545 1545 0.173333 -1546 1546 0.200000 -1547 1547 -0.040000 -1548 1548 -0.093333 -1549 1549 -0.173333 -1550 1550 0.040000 -1551 1551 0.066667 -1552 1552 0.013333 -1553 1553 0.120000 -1554 1554 0.173333 -1555 1555 -0.013333 -1556 1556 0.173333 -1557 1557 0.120000 -1558 1558 -0.146667 -1559 1559 0.093333 -1560 1560 -0.093333 -1561 1561 -0.120000 -1562 1562 -0.173333 -1563 1563 -0.040000 -1564 1564 0.120000 -1565 1565 -0.173333 -1566 1566 -0.013333 -1567 1567 0.200000 -1568 1568 -0.093333 -1569 1569 -0.013333 -1570 1570 -0.146667 -1571 1571 0.200000 -1572 1572 0.093333 -1573 1573 -0.120000 -1574 1574 -0.066667 -1575 1575 0.120000 -1576 1576 -0.093333 -1577 1577 -0.200000 -1578 1578 0.146667 -1579 1579 -0.040000 -1580 1580 -0.200000 -1581 1581 -0.200000 -1582 1582 -0.120000 -1583 1583 -0.146667 -1584 1584 0.173333 -1585 1585 0.013333 -1586 1586 -0.093333 -1587 1587 0.146667 -1588 1588 0.093333 -1589 1589 -0.146667 -1590 1590 0.200000 -1591 1591 -0.120000 -1592 1592 -0.013333 -1593 1593 -0.146667 -1594 1594 -0.200000 -1595 1595 -0.066667 -1596 1596 0.093333 -1597 1597 0.093333 -1598 1598 -0.146667 -1599 1599 -0.093333 -1600 1600 -0.013333 -1601 1601 -0.173333 -1602 1602 0.093333 -1603 1603 -0.066667 -1604 1604 -0.120000 -1605 1605 -0.093333 -1606 1606 0.040000 -1607 1607 0.040000 -1608 1608 0.120000 -1609 1609 0.013333 -1610 1610 -0.173333 -1611 1611 0.146667 -1612 1612 0.173333 -1613 1613 0.040000 -1614 1614 0.173333 -1615 1615 -0.200000 -1616 1616 0.066667 -1617 1617 -0.040000 -1618 1618 0.013333 -1619 1619 0.093333 -1620 1620 0.146667 -1621 1621 0.120000 -1622 1622 -0.200000 -1623 1623 -0.173333 -1624 1624 -0.200000 -1625 1625 -0.200000 -1626 1626 0.040000 -1627 1627 -0.040000 -1628 1628 -0.013333 -1629 1629 0.013333 -1630 1630 0.146667 -1631 1631 -0.013333 -1632 1632 0.173333 -1633 1633 -0.066667 -1634 1634 -0.200000 -1635 1635 -0.066667 -1636 1636 -0.013333 -1637 1637 -0.200000 -1638 1638 0.013333 -1639 1639 0.093333 -1640 1640 0.093333 -1641 1641 -0.066667 -1642 1642 -0.200000 -1643 1643 0.146667 -1644 1644 -0.093333 -1645 1645 -0.040000 -1646 1646 0.093333 -1647 1647 -0.040000 -1648 1648 -0.173333 -1649 1649 0.173333 -1650 1650 -0.040000 -1651 1651 -0.040000 -1652 1652 0.040000 -1653 1653 0.146667 -1654 1654 -0.200000 -1655 1655 -0.066667 -1656 1656 0.066667 -1657 1657 0.040000 -1658 1658 0.093333 -1659 1659 0.173333 -1660 1660 0.200000 -1661 1661 -0.200000 -1662 1662 -0.173333 -1663 1663 0.093333 -1664 1664 -0.146667 -1665 1665 -0.200000 -1666 1666 0.013333 -1667 1667 -0.013333 -1668 1668 0.066667 -1669 1669 0.066667 -1670 1670 0.093333 -1671 1671 0.146667 -1672 1672 0.120000 -1673 1673 0.146667 -1674 1674 0.200000 -1675 1675 -0.173333 -1676 1676 0.013333 -1677 1677 0.173333 -1678 1678 0.173333 -1679 1679 -0.013333 -1680 1680 0.120000 -1681 1681 -0.013333 -1682 1682 -0.200000 -1683 1683 -0.093333 -1684 1684 -0.040000 -1685 1685 -0.093333 -1686 1686 0.066667 -1687 1687 -0.066667 -1688 1688 -0.066667 -1689 1689 0.173333 -1690 1690 0.146667 -1691 1691 0.040000 -1692 1692 -0.066667 -1693 1693 -0.120000 -1694 1694 0.200000 -1695 1695 -0.146667 -1696 1696 0.066667 -1697 1697 -0.040000 -1698 1698 -0.066667 -1699 1699 -0.013333 -1700 1700 0.040000 -1701 1701 0.040000 -1702 1702 -0.120000 -1703 1703 0.066667 -1704 1704 0.200000 -1705 1705 -0.120000 -1706 1706 -0.040000 -1707 1707 -0.120000 -1708 1708 0.200000 -1709 1709 -0.200000 -1710 1710 -0.013333 -1711 1711 0.040000 -1712 1712 -0.120000 -1713 1713 0.066667 -1714 1714 0.200000 -1715 1715 -0.146667 -1716 1716 -0.093333 -1717 1717 0.093333 -1718 1718 -0.120000 -1719 1719 -0.066667 -1720 1720 0.093333 -1721 1721 -0.040000 -1722 1722 -0.173333 -1723 1723 0.040000 -1724 1724 -0.200000 -1725 1725 -0.173333 -1726 1726 0.146667 -1727 1727 0.093333 -1728 1728 0.200000 -1729 1729 0.120000 -1730 1730 -0.066667 -1731 1731 0.146667 -1732 1732 -0.200000 -1733 1733 0.066667 -1734 1734 -0.173333 -1735 1735 -0.200000 -1736 1736 0.066667 -1737 1737 0.093333 -1738 1738 0.040000 -1739 1739 -0.066667 -1740 1740 -0.200000 -1741 1741 0.200000 -1742 1742 0.093333 -1743 1743 0.146667 -1744 1744 0.013333 -1745 1745 -0.120000 -1746 1746 -0.066667 -1747 1747 -0.013333 -1748 1748 0.093333 -1749 1749 -0.173333 -1750 1750 -0.200000 -1751 1751 -0.066667 -1752 1752 0.040000 -1753 1753 0.146667 -1754 1754 -0.013333 -1755 1755 -0.173333 -1756 1756 0.120000 -1757 1757 0.066667 -1758 1758 0.173333 -1759 1759 -0.146667 -1760 1760 0.120000 -1761 1761 -0.093333 -1762 1762 -0.146667 -1763 1763 0.120000 -1764 1764 -0.146667 -1765 1765 -0.066667 -1766 1766 -0.200000 -1767 1767 0.200000 -1768 1768 -0.040000 -1769 1769 0.200000 -1770 1770 0.066667 -1771 1771 -0.093333 -1772 1772 0.093333 -1773 1773 0.200000 -1774 1774 0.200000 -1775 1775 -0.146667 -1776 1776 0.200000 -1777 1777 0.013333 -1778 1778 -0.120000 -1779 1779 0.093333 -1780 1780 0.040000 -1781 1781 0.093333 -1782 1782 -0.173333 -1783 1783 0.040000 -1784 1784 -0.200000 -1785 1785 -0.013333 -1786 1786 -0.013333 -1787 1787 0.120000 -1788 1788 -0.013333 -1789 1789 -0.013333 -1790 1790 0.093333 -1791 1791 -0.120000 -1792 1792 0.120000 -1793 1793 0.173333 -1794 1794 -0.146667 -1795 1795 -0.120000 -1796 1796 0.200000 -1797 1797 -0.093333 -1798 1798 0.013333 -1799 1799 0.200000 -1800 1800 0.093333 -1801 1801 0.013333 -1802 1802 -0.173333 -1803 1803 0.013333 -1804 1804 0.146667 -1805 1805 -0.093333 -1806 1806 -0.093333 -1807 1807 0.173333 -1808 1808 -0.093333 -1809 1809 -0.040000 -1810 1810 0.013333 -1811 1811 -0.146667 -1812 1812 0.120000 -1813 1813 0.173333 -1814 1814 -0.040000 -1815 1815 -0.146667 -1816 1816 0.013333 -1817 1817 0.066667 -1818 1818 -0.173333 -1819 1819 -0.200000 -1820 1820 0.040000 -1821 1821 0.173333 -1822 1822 0.040000 -1823 1823 0.040000 -1824 1824 0.120000 -1825 1825 -0.066667 -1826 1826 -0.120000 -1827 1827 -0.013333 -1828 1828 0.200000 -1829 1829 -0.120000 -1830 1830 -0.013333 -1831 1831 0.066667 -1832 1832 0.040000 -1833 1833 -0.173333 -1834 1834 0.013333 -1835 1835 -0.013333 -1836 1836 -0.093333 -1837 1837 -0.040000 -1838 1838 -0.093333 -1839 1839 -0.040000 -1840 1840 0.093333 -1841 1841 0.146667 -1842 1842 0.173333 -1843 1843 0.040000 -1844 1844 0.173333 -1845 1845 0.013333 -1846 1846 0.173333 -1847 1847 -0.120000 -1848 1848 0.146667 -1849 1849 0.040000 -1850 1850 -0.013333 -1851 1851 0.066667 -1852 1852 -0.173333 -1853 1853 -0.200000 -1854 1854 -0.173333 -1855 1855 0.146667 -1856 1856 0.013333 -1857 1857 0.173333 -1858 1858 -0.200000 -1859 1859 -0.040000 -1860 1860 -0.013333 -1861 1861 0.173333 -1862 1862 0.120000 -1863 1863 0.066667 -1864 1864 -0.013333 -1865 1865 0.093333 -1866 1866 0.200000 -1867 1867 0.146667 -1868 1868 0.013333 -1869 1869 0.093333 -1870 1870 -0.040000 -1871 1871 0.146667 -1872 1872 0.013333 -1873 1873 0.146667 -1874 1874 -0.013333 -1875 1875 -0.093333 -1876 1876 -0.093333 -1877 1877 0.120000 -1878 1878 -0.200000 -1879 1879 -0.200000 -1880 1880 -0.120000 -1881 1881 -0.120000 -1882 1882 0.173333 -1883 1883 0.173333 -1884 1884 0.066667 -1885 1885 -0.146667 -1886 1886 0.040000 -1887 1887 0.120000 -1888 1888 -0.200000 -1889 1889 0.146667 -1890 1890 0.093333 -1891 1891 0.120000 -1892 1892 -0.173333 -1893 1893 -0.173333 -1894 1894 -0.200000 -1895 1895 0.066667 -1896 1896 0.066667 -1897 1897 0.040000 -1898 1898 -0.200000 -1899 1899 0.066667 -1900 1900 -0.173333 -1901 1901 -0.200000 -1902 1902 0.040000 -1903 1903 0.120000 -1904 1904 0.013333 -1905 1905 -0.173333 -1906 1906 0.066667 -1907 1907 -0.013333 -1908 1908 -0.146667 -1909 1909 -0.146667 -1910 1910 0.120000 -1911 1911 -0.173333 -1912 1912 -0.013333 -1913 1913 -0.146667 -1914 1914 0.013333 -1915 1915 -0.120000 -1916 1916 -0.066667 -1917 1917 -0.040000 -1918 1918 0.093333 -1919 1919 0.200000 -1920 1920 0.040000 -1921 1921 0.146667 -1922 1922 -0.093333 -1923 1923 -0.173333 -1924 1924 0.146667 -1925 1925 0.040000 -1926 1926 0.120000 -1927 1927 0.173333 -1928 1928 0.173333 -1929 1929 -0.093333 -1930 1930 -0.013333 -1931 1931 -0.013333 -1932 1932 -0.120000 -1933 1933 0.120000 -1934 1934 0.120000 -1935 1935 -0.093333 -1936 1936 -0.013333 -1937 1937 -0.146667 -1938 1938 0.013333 -1939 1939 0.040000 -1940 1940 0.093333 -1941 1941 0.200000 -1942 1942 0.013333 -1943 1943 -0.146667 -1944 1944 0.093333 -1945 1945 0.173333 -1946 1946 -0.200000 -1947 1947 0.200000 -1948 1948 0.040000 -1949 1949 -0.146667 -1950 1950 0.200000 -1951 1951 -0.146667 -1952 1952 0.093333 -1953 1953 0.200000 -1954 1954 -0.173333 -1955 1955 0.040000 -1956 1956 0.013333 -1957 1957 0.200000 -1958 1958 0.040000 -1959 1959 -0.013333 -1960 1960 0.013333 -1961 1961 0.093333 -1962 1962 -0.120000 -1963 1963 0.173333 -1964 1964 0.173333 -1965 1965 0.040000 -1966 1966 0.040000 -1967 1967 -0.173333 -1968 1968 -0.066667 -1969 1969 -0.013333 -1970 1970 -0.066667 -1971 1971 -0.093333 -1972 1972 -0.173333 -1973 1973 -0.120000 -1974 1974 -0.093333 -1975 1975 0.066667 -1976 1976 -0.146667 -1977 1977 0.066667 -1978 1978 0.066667 -1979 1979 -0.013333 -1980 1980 -0.093333 -1981 1981 -0.040000 -1982 1982 0.146667 -1983 1983 -0.040000 -1984 1984 -0.093333 -1985 1985 -0.040000 -1986 1986 0.146667 -1987 1987 -0.173333 -1988 1988 -0.093333 -1989 1989 -0.173333 -1990 1990 0.200000 -1991 1991 0.066667 -1992 1992 0.173333 -1993 1993 -0.040000 -1994 1994 -0.093333 -1995 1995 -0.200000 -1996 1996 -0.173333 -1997 1997 0.066667 -1998 1998 0.173333 -1999 1999 -0.066667 -2000 2000 0.093333 -2001 2001 0.066667 -2002 2002 0.173333 -2003 2003 -0.200000 -2004 2004 0.013333 -2005 2005 0.066667 -2006 2006 -0.040000 -2007 2007 -0.040000 -2008 2008 0.066667 -2009 2009 -0.120000 -2010 2010 0.200000 -2011 2011 -0.040000 -2012 2012 -0.173333 -2013 2013 -0.200000 -2014 2014 -0.146667 -2015 2015 -0.066667 -2016 2016 -0.146667 -2017 2017 -0.173333 -2018 2018 -0.200000 -2019 2019 -0.120000 -2020 2020 0.173333 -2021 2021 0.173333 -2022 2022 0.120000 -2023 2023 -0.120000 -2024 2024 0.146667 -2025 2025 0.173333 -2026 2026 0.173333 -2027 2027 0.013333 -2028 2028 0.146667 -2029 2029 -0.173333 -2030 2030 0.066667 -2031 2031 0.200000 -2032 2032 -0.040000 -2033 2033 0.093333 -2034 2034 0.200000 -2035 2035 -0.120000 -2036 2036 -0.013333 -2037 2037 0.173333 -2038 2038 0.173333 -2039 2039 0.200000 -2040 2040 0.146667 -2041 2041 -0.173333 -2042 2042 0.040000 -2043 2043 0.173333 -2044 2044 0.173333 -2045 2045 0.120000 -2046 2046 0.146667 -2047 2047 -0.040000 -2048 2048 -0.093333 -1 5 3.666667 -1 6 0.333333 -1 7 -0.333333 -1 8 0.733333 -1 129 0.866667 -2 5 0.333333 -2 6 3.666667 -2 7 -0.333333 -2 8 0.466667 -2 130 -3.666667 -3 5 -5.000000 -3 6 5.000000 -3 7 0.333333 -3 8 -3.666667 -3 131 -0.333333 -4 5 0.866667 -4 6 -0.333333 -4 7 0.600000 -4 8 -0.866667 -4 132 4.333333 -5 13 -1.666667 -6 14 -1.000000 -7 15 3.000000 -8 16 -0.333333 -9 13 1.000000 -9 14 0.733333 -9 15 3.000000 -9 16 0.333333 -9 137 -0.600000 -10 13 3.666667 -10 14 -1.000000 -10 15 -0.200000 -10 16 0.200000 -10 138 3.666667 -11 13 -0.466667 -11 14 0.866667 -11 15 -0.200000 -11 16 0.200000 -11 139 -1.000000 -12 13 -1.000000 -12 14 -0.733333 -12 15 0.200000 -12 16 -0.333333 -12 140 0.733333 -13 21 -0.600000 -14 22 0.733333 -15 23 1.000000 -16 24 0.733333 -17 21 -0.733333 -17 22 -0.466667 -17 23 -0.200000 -17 24 1.000000 -17 145 -0.200000 -18 21 1.000000 -18 22 -0.600000 -18 23 -0.333333 -18 24 0.200000 -18 146 -0.200000 -19 21 -0.733333 -19 22 0.866667 -19 23 0.333333 -19 24 0.200000 -19 147 1.000000 -20 21 0.866667 -20 22 0.866667 -20 23 -0.200000 -20 24 0.600000 -20 148 0.866667 -21 29 0.466667 -22 30 0.200000 -23 31 0.200000 -24 32 0.066667 -25 29 0.466667 -25 30 0.333333 -25 31 0.066667 -25 32 -0.866667 -25 153 0.066667 -26 29 0.600000 -26 30 0.733333 -26 31 1.000000 -26 32 0.200000 -26 154 -0.466667 -27 29 -0.466667 -27 30 -0.866667 -27 31 1.000000 -27 32 0.866667 -27 155 -0.066667 -28 29 -1.000000 -28 30 -0.733333 -28 31 -0.466667 -28 32 -0.466667 -28 156 1.000000 -29 37 0.200000 -30 38 -0.866667 -31 39 -0.066667 -32 40 -0.333333 -33 37 0.333333 -33 38 -0.200000 -33 39 -0.733333 -33 40 0.600000 -33 161 0.733333 -34 37 0.600000 -34 38 -0.200000 -34 39 0.066667 -34 40 -0.333333 -34 162 -0.866667 -35 37 -0.333333 -35 38 0.200000 -35 39 -0.066667 -35 40 -0.066667 -35 163 0.066667 -36 37 0.600000 -36 38 0.066667 -36 39 -0.866667 -36 40 0.200000 -36 164 0.333333 -37 45 -0.200000 -38 46 -0.466667 -39 47 -0.466667 -40 48 -0.466667 -41 45 0.600000 -41 46 0.733333 -41 47 -0.200000 -41 48 -0.066667 -41 169 -0.200000 -42 45 0.866667 -42 46 1.000000 -42 47 0.333333 -42 48 1.000000 -42 170 0.466667 -43 45 0.866667 -43 46 -0.066667 -43 47 -0.200000 -43 48 -1.000000 -43 171 -0.600000 -44 45 -0.866667 -44 46 -0.733333 -44 47 -0.466667 -44 48 -0.200000 -44 172 -0.200000 -45 53 -0.333333 -46 54 1.000000 -47 55 -0.733333 -48 56 0.066667 -49 53 0.866667 -49 54 4.333333 -49 55 -0.466667 -49 56 3.000000 -49 177 1.000000 -50 53 0.733333 -50 54 -1.000000 -50 55 0.333333 -50 56 5.000000 -50 178 -0.333333 -51 53 -0.600000 -51 54 -0.200000 -51 55 0.333333 -51 56 -0.066667 -51 179 -0.733333 -52 53 0.200000 -52 54 0.066667 -52 55 -1.000000 -52 56 1.000000 -52 180 -0.066667 -53 61 0.333333 -54 62 0.866667 -55 63 0.200000 -56 64 -0.200000 -57 61 0.066667 -57 62 0.333333 -57 63 -0.600000 -57 64 0.200000 -57 185 -1.000000 -58 61 -0.733333 -58 62 -4.333333 -58 63 0.600000 -58 64 -0.200000 -58 186 5.000000 -59 61 -1.000000 -59 62 1.000000 -59 63 -1.000000 -59 64 0.600000 -59 187 -0.066667 -60 61 -5.000000 -60 62 1.666667 -60 63 0.333333 -60 64 0.600000 -60 188 -0.600000 -61 69 -0.066667 -62 70 -1.000000 -63 71 0.200000 -64 72 -1.000000 -65 69 1.000000 -65 70 -3.666667 -65 71 0.200000 -65 72 -0.066667 -65 193 0.600000 -66 69 -5.000000 -66 70 -0.333333 -66 71 -1.666667 -66 72 0.466667 -66 194 1.000000 -67 69 -0.466667 -67 70 -0.200000 -67 71 -0.200000 -67 72 1.000000 -67 195 0.333333 -68 69 1.000000 -68 70 -1.666667 -68 71 0.466667 -68 72 1.000000 -68 196 0.066667 -69 77 0.466667 -70 78 1.666667 -71 79 -2.333333 -72 80 0.866667 -73 77 -0.466667 -73 78 5.000000 -73 79 -0.866667 -73 80 0.600000 -73 201 -0.600000 -74 77 0.866667 -74 78 -0.466667 -74 79 0.333333 -74 80 0.733333 -74 202 -0.733333 -75 77 -1.000000 -75 78 -0.733333 -75 79 -1.000000 -75 80 -0.466667 -75 203 -0.333333 -76 77 -0.200000 -76 78 0.600000 -76 79 0.333333 -76 80 0.066667 -76 204 -0.733333 -77 85 0.600000 -78 86 -3.000000 -79 87 0.466667 -80 88 0.200000 -81 85 -0.733333 -81 86 -0.733333 -81 87 0.733333 -81 88 -0.600000 -81 209 0.333333 -82 85 0.333333 -82 86 -0.066667 -82 87 0.466667 -82 88 0.466667 -82 210 -0.733333 -83 85 -1.000000 -83 86 -0.466667 -83 87 -1.000000 -83 88 0.866667 -83 211 -0.066667 -84 85 0.066667 -84 86 -0.466667 -84 87 1.000000 -84 88 1.000000 -84 212 0.200000 -85 93 -0.066667 -86 94 0.066667 -87 95 0.600000 -88 96 0.333333 -89 93 -0.600000 -89 94 -0.733333 -89 95 -0.466667 -89 96 0.866667 -89 217 1.000000 -90 93 -0.200000 -90 94 -0.733333 -90 95 -0.733333 -90 96 0.733333 -90 218 1.000000 -91 93 -0.200000 -91 94 -0.733333 -91 95 -1.000000 -91 96 -0.733333 -91 219 -1.000000 -92 93 0.866667 -92 94 0.733333 -92 95 0.733333 -92 96 -0.600000 -92 220 0.066667 -93 101 0.733333 -94 102 -0.600000 -95 103 0.466667 -96 104 -0.066667 -97 101 -0.600000 -97 102 0.066667 -97 103 0.466667 -97 104 1.000000 -97 225 -0.333333 -98 101 0.600000 -98 102 0.733333 -98 103 -0.333333 -98 104 0.600000 -98 226 -0.466667 -99 101 0.866667 -99 102 -0.600000 -99 103 0.066667 -99 104 1.000000 -99 227 -0.466667 -100 101 0.333333 -100 102 0.866667 -100 103 0.466667 -100 104 -0.733333 -100 228 -0.600000 -101 109 0.600000 -102 110 -0.866667 -103 111 -0.333333 -104 112 0.200000 -105 109 -0.466667 -105 110 0.866667 -105 111 -0.733333 -105 112 -0.200000 -105 233 -0.466667 -106 109 -0.466667 -106 110 -0.466667 -106 111 -1.000000 -106 112 0.600000 -106 234 -0.466667 -107 109 -0.866667 -107 110 0.600000 -107 111 -0.600000 -107 112 0.333333 -107 235 -0.333333 -108 109 0.866667 -108 110 -1.000000 -108 111 0.200000 -108 112 0.066667 -108 236 -0.333333 -109 117 -1.000000 -110 118 1.666667 -111 119 0.600000 -112 120 0.466667 -113 117 0.733333 -113 118 1.000000 -113 119 0.066667 -113 120 0.866667 -113 241 0.466667 -114 117 -0.066667 -114 118 -3.666667 -114 119 0.600000 -114 120 -0.466667 -114 242 0.866667 -115 117 -0.866667 -115 118 -1.000000 -115 119 0.733333 -115 120 3.000000 -115 243 -2.333333 -116 117 -0.600000 -116 118 4.333333 -116 119 -3.666667 -116 120 -0.733333 -116 244 -0.600000 -117 125 -1.000000 -118 126 1.000000 -119 127 -0.066667 -120 128 0.200000 -121 125 0.466667 -121 126 3.000000 -121 127 0.866667 -121 128 1.000000 -121 249 -0.600000 -122 125 0.733333 -122 126 0.066667 -122 127 -0.466667 -122 128 0.466667 -122 250 0.600000 -123 125 -0.200000 -123 126 0.733333 -123 127 -0.200000 -123 128 -0.066667 -123 251 -0.200000 -124 125 -0.866667 -124 126 -1.000000 -124 127 1.000000 -124 128 -0.733333 -124 252 0.733333 -129 133 -0.600000 -129 134 -4.333333 -129 135 1.000000 -129 136 -3.666667 -129 257 -1.666667 -130 133 5.000000 -130 134 0.066667 -130 135 0.200000 -130 136 3.000000 -130 258 0.333333 -131 133 0.333333 -131 134 0.600000 -131 135 -1.000000 -131 136 0.066667 -131 259 -0.066667 -132 133 -0.866667 -132 134 -0.600000 -132 135 -1.666667 -132 136 -0.200000 -132 260 5.000000 -133 141 -0.600000 -134 142 0.066667 -135 143 5.000000 -136 144 -1.000000 -137 141 0.866667 -137 142 -0.866667 -137 143 -0.866667 -137 144 -0.733333 -137 265 -1.000000 -138 141 0.466667 -138 142 0.333333 -138 143 0.733333 -138 144 3.666667 -138 266 -0.600000 -139 141 -0.733333 -139 142 -1.666667 -139 143 0.333333 -139 144 -0.466667 -139 267 -0.333333 -140 141 1.000000 -140 142 0.333333 -140 143 -0.066667 -140 144 -0.200000 -140 268 1.000000 -141 149 0.733333 -142 150 -0.466667 -143 151 1.000000 -144 152 -0.600000 -145 149 -0.066667 -145 150 0.733333 -145 151 0.466667 -145 152 0.333333 -145 273 -0.466667 -146 149 -0.866667 -146 150 -0.733333 -146 151 -0.066667 -146 152 0.200000 -146 274 0.200000 -147 149 0.066667 -147 150 0.466667 -147 151 1.000000 -147 152 0.066667 -147 275 0.466667 -148 149 -0.066667 -148 150 0.200000 -148 151 -0.466667 -148 152 -0.200000 -148 276 0.466667 -149 157 0.066667 -150 158 0.200000 -151 159 -0.866667 -152 160 -0.600000 -153 157 1.000000 -153 158 -0.600000 -153 159 0.600000 -153 160 -0.600000 -153 281 0.733333 -154 157 -0.066667 -154 158 0.066667 -154 159 -0.733333 -154 160 -0.066667 -154 282 0.600000 -155 157 0.333333 -155 158 0.600000 -155 159 0.466667 -155 160 -0.200000 -155 283 -1.000000 -156 157 -0.466667 -156 158 -0.333333 -156 159 -1.000000 -156 160 -0.200000 -156 284 -0.600000 -157 165 0.333333 -158 166 -0.333333 -159 167 -0.066667 -160 168 -0.733333 -161 165 -0.200000 -161 166 -0.600000 -161 167 1.000000 -161 168 0.466667 -161 289 -1.000000 -162 165 -0.466667 -162 166 -0.600000 -162 167 0.066667 -162 168 -0.066667 -162 290 0.733333 -163 165 -0.600000 -163 166 -0.866667 -163 167 1.000000 -163 168 0.600000 -163 291 -0.066667 -164 165 0.733333 -164 166 0.066667 -164 167 0.466667 -164 168 -0.866667 -164 292 0.466667 -165 173 -1.000000 -166 174 0.466667 -167 175 -3.000000 -168 176 -0.200000 -169 173 -1.000000 -169 174 0.866667 -169 175 0.200000 -169 176 1.666667 -169 297 0.466667 -170 173 -0.466667 -170 174 -0.333333 -170 175 -0.733333 -170 176 1.000000 -170 298 -0.466667 -171 173 -1.000000 -171 174 -0.333333 -171 175 1.666667 -171 176 -4.333333 -171 299 -0.333333 -172 173 -0.733333 -172 174 -0.600000 -172 175 0.333333 -172 176 3.666667 -172 300 -0.333333 -173 181 -1.000000 -174 182 -0.200000 -175 183 -0.733333 -176 184 -0.733333 -177 181 0.866667 -177 182 -1.000000 -177 183 0.200000 -177 184 -2.333333 -177 305 -0.733333 -178 181 0.600000 -178 182 -0.200000 -178 183 0.600000 -178 184 1.000000 -178 306 0.466667 -179 181 0.066667 -179 182 0.466667 -179 183 0.733333 -179 184 -1.000000 -179 307 0.066667 -180 181 -1.000000 -180 182 -0.733333 -180 183 -0.066667 -180 184 -0.200000 -180 308 0.333333 -181 189 -0.466667 -182 190 -0.333333 -183 191 -0.866667 -184 192 -0.600000 -185 189 -1.000000 -185 190 0.600000 -185 191 0.200000 -185 192 -0.466667 -185 313 -0.733333 -186 189 -0.066667 -186 190 -0.600000 -186 191 0.333333 -186 192 -0.066667 -186 314 0.600000 -187 189 0.733333 -187 190 -0.866667 -187 191 -0.600000 -187 192 -0.733333 -187 315 -0.333333 -188 189 0.866667 -188 190 0.200000 -188 191 0.866667 -188 192 0.333333 -188 316 0.200000 -189 197 -0.866667 -190 198 -0.733333 -191 199 -0.333333 -192 200 -0.866667 -193 197 0.333333 -193 198 -0.066667 -193 199 1.000000 -193 200 0.866667 -193 321 -0.733333 -194 197 -0.066667 -194 198 -0.600000 -194 199 -0.466667 -194 200 -0.733333 -194 322 0.466667 -195 197 -0.066667 -195 198 -0.333333 -195 199 0.066667 -195 200 -1.000000 -195 323 -0.200000 -196 197 -1.000000 -196 198 -0.733333 -196 199 1.000000 -196 200 0.333333 -196 324 -0.600000 -197 205 0.600000 -198 206 -0.600000 -199 207 -1.000000 -200 208 0.200000 -201 205 0.733333 -201 206 0.066667 -201 207 1.000000 -201 208 -1.000000 -201 329 -0.066667 -202 205 -1.000000 -202 206 0.866667 -202 207 -0.466667 -202 208 0.466667 -202 330 -0.600000 -203 205 0.466667 -203 206 -0.466667 -203 207 -0.200000 -203 208 0.200000 -203 331 0.733333 -204 205 -0.333333 -204 206 0.466667 -204 207 -0.466667 -204 208 -0.600000 -204 332 -0.066667 -205 213 1.000000 -206 214 0.200000 -207 215 1.000000 -208 216 -0.600000 -209 213 -0.200000 -209 214 -0.866667 -209 215 -0.066667 -209 216 0.866667 -209 337 -0.466667 -210 213 -0.600000 -210 214 0.066667 -210 215 -1.000000 -210 216 0.333333 -210 338 -1.000000 -211 213 0.733333 -211 214 -0.200000 -211 215 -1.000000 -211 216 0.866667 -211 339 0.733333 -212 213 -0.066667 -212 214 -0.200000 -212 215 -0.866667 -212 216 -0.066667 -212 340 1.000000 -213 221 -0.600000 -214 222 -0.733333 -215 223 0.200000 -216 224 -0.866667 -217 221 0.333333 -217 222 -0.333333 -217 223 0.066667 -217 224 0.466667 -217 345 0.200000 -218 221 0.600000 -218 222 -0.600000 -218 223 -0.066667 -218 224 -0.066667 -218 346 0.066667 -219 221 -0.333333 -219 222 -0.733333 -219 223 0.333333 -219 224 -0.866667 -219 347 -0.466667 -220 221 -0.200000 -220 222 0.466667 -220 223 0.333333 -220 224 -0.733333 -220 348 1.000000 -221 229 0.733333 -222 230 -0.466667 -223 231 0.600000 -224 232 -0.333333 -225 229 0.600000 -225 230 0.866667 -225 231 -0.866667 -225 232 -0.466667 -225 353 0.200000 -226 229 0.200000 -226 230 0.466667 -226 231 -0.200000 -226 232 1.000000 -226 354 1.000000 -227 229 0.200000 -227 230 5.000000 -227 231 0.333333 -227 232 0.466667 -227 355 -0.866667 -228 229 0.466667 -228 230 1.000000 -228 231 0.066667 -228 232 0.466667 -228 356 -0.600000 -229 237 -1.000000 -230 238 -0.333333 -231 239 0.600000 -232 240 -1.000000 -233 237 -0.466667 -233 238 -0.600000 -233 239 -0.600000 -233 240 -0.066667 -233 361 0.066667 -234 237 -0.733333 -234 238 -0.200000 -234 239 -0.066667 -234 240 1.000000 -234 362 -0.466667 -235 237 0.333333 -235 238 1.000000 -235 239 0.333333 -235 240 1.000000 -235 363 0.600000 -236 237 -0.333333 -236 238 0.466667 -236 239 -1.000000 -236 240 0.466667 -236 364 -1.000000 -237 245 0.466667 -238 246 -0.066667 -239 247 0.333333 -240 248 -0.333333 -241 245 0.466667 -241 246 0.066667 -241 247 -0.733333 -241 248 -0.333333 -241 369 -0.866667 -242 245 -0.466667 -242 246 -1.000000 -242 247 -3.666667 -242 248 -0.066667 -242 370 0.866667 -243 245 0.866667 -243 246 -0.866667 -243 247 -1.000000 -243 248 0.200000 -243 371 4.333333 -244 245 0.333333 -244 246 -0.600000 -244 247 1.666667 -244 248 -0.333333 -244 372 -1.666667 -245 253 -0.200000 -246 254 0.200000 -247 255 0.066667 -248 256 0.600000 -249 253 -0.600000 -249 254 -0.466667 -249 255 -0.733333 -249 256 0.200000 -249 377 -0.733333 -250 253 -0.333333 -250 254 -0.333333 -250 255 -0.466667 -250 256 0.200000 -250 378 0.733333 -251 253 -0.600000 -251 254 0.200000 -251 255 1.000000 -251 256 -1.000000 -251 379 -0.200000 -252 253 -0.600000 -252 254 -0.200000 -252 255 -0.600000 -252 256 -0.333333 -252 380 -1.000000 -257 261 3.666667 -257 262 0.866667 -257 263 -0.733333 -257 264 -0.066667 -257 385 5.000000 -258 261 2.333333 -258 262 -5.000000 -258 263 -0.600000 -258 264 -0.600000 -258 386 0.333333 -259 261 1.000000 -259 262 0.466667 -259 263 -4.333333 -259 264 3.000000 -259 387 -0.333333 -260 261 0.733333 -260 262 5.000000 -260 263 -0.733333 -260 264 -0.600000 -260 388 3.666667 -261 269 3.000000 -262 270 -0.200000 -263 271 0.866667 -264 272 -3.666667 -265 269 0.866667 -265 270 1.000000 -265 271 -0.333333 -265 272 0.733333 -265 393 0.066667 -266 269 -0.600000 -266 270 -0.466667 -266 271 0.200000 -266 272 0.200000 -266 394 -0.466667 -267 269 1.000000 -267 270 -0.600000 -267 271 -0.333333 -267 272 0.066667 -267 395 -0.600000 -268 269 -0.733333 -268 270 -0.466667 -268 271 -0.733333 -268 272 -0.866667 -268 396 -0.866667 -269 277 -0.466667 -270 278 -0.066667 -271 279 0.866667 -272 280 0.600000 -273 277 0.600000 -273 278 -0.733333 -273 279 -0.866667 -273 280 -0.733333 -273 401 0.066667 -274 277 -0.466667 -274 278 -0.600000 -274 279 0.066667 -274 280 -1.000000 -274 402 -0.066667 -275 277 0.866667 -275 278 -0.066667 -275 279 0.733333 -275 280 0.733333 -275 403 0.733333 -276 277 -0.200000 -276 278 -0.466667 -276 279 0.200000 -276 280 0.200000 -276 404 -0.866667 -277 285 0.600000 -278 286 0.333333 -279 287 0.600000 -280 288 -0.333333 -281 285 -0.200000 -281 286 0.333333 -281 287 0.066667 -281 288 0.866667 -281 409 0.066667 -282 285 0.866667 -282 286 -0.200000 -282 287 0.600000 -282 288 -0.733333 -282 410 -0.866667 -283 285 0.866667 -283 286 -1.000000 -283 287 -0.466667 -283 288 0.600000 -283 411 0.866667 -284 285 0.733333 -284 286 0.466667 -284 287 -0.733333 -284 288 0.066667 -284 412 -0.466667 -285 293 0.333333 -286 294 0.600000 -287 295 -0.066667 -288 296 1.000000 -289 293 -0.866667 -289 294 0.466667 -289 295 -0.866667 -289 296 -0.466667 -289 417 0.333333 -290 293 -0.466667 -290 294 0.066667 -290 295 -0.333333 -290 296 -0.466667 -290 418 -0.600000 -291 293 -0.066667 -291 294 0.200000 -291 295 0.600000 -291 296 0.200000 -291 419 -0.066667 -292 293 0.333333 -292 294 0.333333 -292 295 -0.200000 -292 296 -0.466667 -292 420 0.600000 -293 301 -0.466667 -294 302 -0.600000 -295 303 -0.600000 -296 304 -0.733333 -297 301 -0.200000 -297 302 0.200000 -297 303 -0.066667 -297 304 -3.666667 -297 425 0.200000 -298 301 -0.333333 -298 302 -1.000000 -298 303 0.066667 -298 304 0.200000 -298 426 -0.733333 -299 301 -0.066667 -299 302 -0.466667 -299 303 -1.000000 -299 304 3.000000 -299 427 -0.333333 -300 301 0.866667 -300 302 0.733333 -300 303 0.600000 -300 304 -5.000000 -300 428 0.866667 -301 309 -1.000000 -302 310 -0.733333 -303 311 0.200000 -304 312 0.866667 -305 309 -0.466667 -305 310 0.733333 -305 311 -0.600000 -305 312 -1.000000 -305 433 -0.200000 -306 309 0.733333 -306 310 0.866667 -306 311 0.600000 -306 312 -0.866667 -306 434 0.066667 -307 309 1.000000 -307 310 -0.066667 -307 311 -1.000000 -307 312 -0.600000 -307 435 -0.200000 -308 309 0.866667 -308 310 0.200000 -308 311 0.066667 -308 312 -0.333333 -308 436 -0.466667 -309 317 -0.866667 -310 318 0.066667 -311 319 -0.200000 -312 320 0.200000 -313 317 -0.066667 -313 318 0.466667 -313 319 1.000000 -313 320 0.866667 -313 441 -0.466667 -314 317 -0.866667 -314 318 -0.600000 -314 319 -0.866667 -314 320 -0.200000 -314 442 0.466667 -315 317 -1.000000 -315 318 1.000000 -315 319 0.866667 -315 320 -0.066667 -315 443 -0.200000 -316 317 1.000000 -316 318 -0.866667 -316 319 0.333333 -316 320 -0.466667 -316 444 -0.733333 -317 325 0.600000 -318 326 -1.666667 -319 327 0.333333 -320 328 0.066667 -321 325 -0.333333 -321 326 0.866667 -321 327 0.333333 -321 328 0.866667 -321 449 0.466667 -322 325 0.333333 -322 326 -3.666667 -322 327 -4.333333 -322 328 -0.600000 -322 450 -1.000000 -323 325 -1.000000 -323 326 -3.666667 -323 327 0.333333 -323 328 -0.066667 -323 451 -0.866667 -324 325 -0.466667 -324 326 0.866667 -324 327 0.466667 -324 328 0.733333 -324 452 0.333333 -325 333 -0.866667 -326 334 -0.200000 -327 335 3.000000 -328 336 -0.733333 -329 333 0.866667 -329 334 1.000000 -329 335 -1.000000 -329 336 0.333333 -329 457 -0.866667 -330 333 0.466667 -330 334 -1.000000 -330 335 1.000000 -330 336 1.000000 -330 458 -1.000000 -331 333 0.200000 -331 334 -0.066667 -331 335 -0.066667 -331 336 -0.866667 -331 459 -0.066667 -332 333 0.600000 -332 334 0.066667 -332 335 0.333333 -332 336 -0.066667 -332 460 -0.066667 -333 341 0.200000 -334 342 -0.600000 -335 343 -0.066667 -336 344 0.733333 -337 341 0.466667 -337 342 0.200000 -337 343 -0.866667 -337 344 -0.466667 -337 465 0.333333 -338 341 -0.466667 -338 342 -1.000000 -338 343 -1.000000 -338 344 -0.466667 -338 466 -1.000000 -339 341 -5.000000 -339 342 -1.000000 -339 343 0.866667 -339 344 -0.733333 -339 467 1.000000 -340 341 1.000000 -340 342 -0.066667 -340 343 -0.200000 -340 344 0.200000 -340 468 0.600000 -341 349 -0.333333 -342 350 0.466667 -343 351 0.466667 -344 352 0.733333 -345 349 0.066667 -345 350 -0.600000 -345 351 -0.600000 -345 352 0.466667 -345 473 0.200000 -346 349 -0.733333 -346 350 -0.600000 -346 351 -1.000000 -346 352 0.733333 -346 474 -0.866667 -347 349 0.600000 -347 350 0.600000 -347 351 0.600000 -347 352 0.600000 -347 475 0.333333 -348 349 1.000000 -348 350 -0.866667 -348 351 0.733333 -348 352 0.066667 -348 476 -0.600000 -349 357 -0.066667 -350 358 0.466667 -351 359 -0.466667 -352 360 -0.200000 -353 357 -0.866667 -353 358 -0.866667 -353 359 0.466667 -353 360 0.333333 -353 481 0.066667 -354 357 0.466667 -354 358 -0.466667 -354 359 0.466667 -354 360 -0.066667 -354 482 0.600000 -355 357 -0.733333 -355 358 0.333333 -355 359 -0.600000 -355 360 1.000000 -355 483 0.733333 -356 357 0.200000 -356 358 -0.066667 -356 359 -0.600000 -356 360 0.200000 -356 484 0.866667 -357 365 0.200000 -358 366 -0.333333 -359 367 -0.866667 -360 368 0.466667 -361 365 -0.466667 -361 366 0.600000 -361 367 -0.600000 -361 368 0.600000 -361 489 -0.066667 -362 365 -0.733333 -362 366 0.466667 -362 367 1.000000 -362 368 0.066667 -362 490 0.600000 -363 365 0.466667 -363 366 -1.000000 -363 367 -0.600000 -363 368 -1.000000 -363 491 -1.000000 -364 365 -0.066667 -364 366 0.200000 -364 367 0.066667 -364 368 -0.333333 -364 492 -0.600000 -365 373 0.066667 -366 374 0.466667 -367 375 0.333333 -368 376 -0.733333 -369 373 0.200000 -369 374 3.000000 -369 375 0.466667 -369 376 -0.600000 -369 497 2.333333 -370 373 0.200000 -370 374 -1.666667 -370 375 -0.066667 -370 376 -0.200000 -370 498 0.333333 -371 373 -0.333333 -371 374 -0.200000 -371 375 0.333333 -371 376 -1.666667 -371 499 -2.333333 -372 373 0.200000 -372 374 -0.333333 -372 375 -1.000000 -372 376 -0.466667 -372 500 -0.066667 -373 381 0.333333 -374 382 0.466667 -375 383 -1.000000 -376 384 0.333333 -377 381 1.000000 -377 382 0.200000 -377 383 -0.466667 -377 384 0.466667 -377 505 -0.200000 -378 381 -0.466667 -378 382 -0.333333 -378 383 0.600000 -378 384 0.066667 -378 506 0.333333 -379 381 0.466667 -379 382 -0.600000 -379 383 0.600000 -379 384 -0.466667 -379 507 -0.866667 -380 381 -1.000000 -380 382 -0.866667 -380 383 0.333333 -380 384 0.733333 -380 508 0.200000 -385 389 -0.600000 -385 390 4.333333 -385 391 0.333333 -385 392 -1.000000 -385 513 5.000000 -386 389 1.000000 -386 390 3.666667 -386 391 -0.200000 -386 392 5.000000 -386 514 0.333333 -387 389 -0.466667 -387 390 0.200000 -387 391 0.200000 -387 392 1.000000 -387 515 -0.200000 -388 389 0.600000 -388 390 0.733333 -388 391 0.466667 -388 392 5.000000 -388 516 0.733333 -389 397 -0.466667 -390 398 -1.666667 -391 399 0.200000 -392 400 -5.000000 -393 397 -0.066667 -393 398 -0.866667 -393 399 0.333333 -393 400 3.666667 -393 521 -1.000000 -394 397 -1.000000 -394 398 -0.200000 -394 399 1.000000 -394 400 -1.000000 -394 522 0.066667 -395 397 -0.866667 -395 398 0.733333 -395 399 0.866667 -395 400 -0.066667 -395 523 -0.066667 -396 397 -0.600000 -396 398 -0.600000 -396 399 1.000000 -396 400 0.466667 -396 524 -0.333333 -397 405 -0.600000 -398 406 -0.866667 -399 407 -0.333333 -400 408 -2.333333 -401 405 -0.466667 -401 406 0.733333 -401 407 -0.466667 -401 408 -0.066667 -401 529 0.200000 -402 405 0.466667 -402 406 3.000000 -402 407 -0.866667 -402 408 3.666667 -402 530 0.066667 -403 405 0.866667 -403 406 -0.733333 -403 407 -0.066667 -403 408 0.600000 -403 531 0.733333 -404 405 -0.066667 -404 406 0.200000 -404 407 -0.333333 -404 408 -0.200000 -404 532 -0.066667 -405 413 -0.066667 -406 414 0.066667 -407 415 -0.333333 -408 416 -5.000000 -409 413 0.066667 -409 414 -0.866667 -409 415 -1.000000 -409 416 -0.333333 -409 537 0.066667 -410 413 0.200000 -410 414 0.066667 -410 415 0.466667 -410 416 -1.000000 -410 538 -0.200000 -411 413 0.866667 -411 414 -0.333333 -411 415 -5.000000 -411 416 0.866667 -411 539 -0.333333 -412 413 0.066667 -412 414 0.466667 -412 415 0.200000 -412 416 0.866667 -412 540 -0.466667 -413 421 0.200000 -414 422 -0.066667 -415 423 -0.333333 -416 424 0.066667 -417 421 0.066667 -417 422 -0.466667 -417 423 0.600000 -417 424 1.000000 -417 545 0.466667 -418 421 0.333333 -418 422 -0.200000 -418 423 -1.000000 -418 424 -0.866667 -418 546 0.066667 -419 421 0.200000 -419 422 0.866667 -419 423 0.066667 -419 424 -0.333333 -419 547 0.466667 -420 421 -0.066667 -420 422 0.466667 -420 423 0.600000 -420 424 0.200000 -420 548 -0.333333 -421 429 -0.866667 -422 430 0.333333 -423 431 -0.866667 -424 432 1.000000 -425 429 -0.600000 -425 430 -0.866667 -425 431 0.466667 -425 432 0.733333 -425 553 -0.600000 -426 429 -0.066667 -426 430 3.000000 -426 431 -2.333333 -426 432 -1.000000 -426 554 0.466667 -427 429 1.000000 -427 430 -2.333333 -427 431 -0.866667 -427 432 -0.466667 -427 555 1.000000 -428 429 -0.733333 -428 430 0.733333 -428 431 -0.466667 -428 432 -1.000000 -428 556 -0.200000 -429 437 1.000000 -430 438 -0.066667 -431 439 0.333333 -432 440 -0.333333 -433 437 -0.466667 -433 438 -1.000000 -433 439 0.333333 -433 440 0.066667 -433 561 0.333333 -434 437 0.200000 -434 438 1.000000 -434 439 1.000000 -434 440 0.466667 -434 562 -0.866667 -435 437 -0.066667 -435 438 0.866667 -435 439 3.666667 -435 440 -0.466667 -435 563 -1.000000 -436 437 -0.866667 -436 438 -0.333333 -436 439 -0.733333 -436 440 -0.466667 -436 564 0.200000 -437 445 -0.333333 -438 446 -0.600000 -439 447 -1.000000 -440 448 -0.866667 -441 445 0.733333 -441 446 -0.333333 -441 447 -0.733333 -441 448 -0.466667 -441 569 0.600000 -442 445 -0.066667 -442 446 -0.466667 -442 447 0.200000 -442 448 0.866667 -442 570 -0.066667 -443 445 1.000000 -443 446 0.733333 -443 447 -0.466667 -443 448 0.066667 -443 571 0.866667 -444 445 -0.866667 -444 446 -0.200000 -444 447 -0.733333 -444 448 -1.000000 -444 572 -0.066667 -445 453 0.466667 -446 454 0.866667 -447 455 0.733333 -448 456 -0.200000 -449 453 -0.466667 -449 454 0.866667 -449 455 0.066667 -449 456 -0.600000 -449 577 0.733333 -450 453 0.866667 -450 454 0.733333 -450 455 0.466667 -450 456 -0.066667 -450 578 -0.333333 -451 453 -0.866667 -451 454 -0.200000 -451 455 -0.066667 -451 456 -0.200000 -451 579 0.200000 -452 453 -1.000000 -452 454 -0.733333 -452 455 -0.866667 -452 456 0.866667 -452 580 -0.066667 -453 461 -0.866667 -454 462 -0.866667 -455 463 -0.200000 -456 464 -0.066667 -457 461 -0.066667 -457 462 0.733333 -457 463 -0.466667 -457 464 -0.066667 -457 585 -0.200000 -458 461 0.066667 -458 462 0.066667 -458 463 0.733333 -458 464 -0.733333 -458 586 0.466667 -459 461 1.000000 -459 462 -0.733333 -459 463 -0.200000 -459 464 1.000000 -459 587 0.066667 -460 461 0.466667 -460 462 -0.466667 -460 463 -0.733333 -460 464 -1.000000 -460 588 0.466667 -461 469 0.066667 -462 470 0.200000 -463 471 1.000000 -464 472 0.600000 -465 469 -0.333333 -465 470 -0.066667 -465 471 -0.200000 -465 472 0.066667 -465 593 0.466667 -466 469 -0.733333 -466 470 0.466667 -466 471 -0.333333 -466 472 0.066667 -466 594 0.466667 -467 469 -0.733333 -467 470 0.600000 -467 471 0.066667 -467 472 -0.200000 -467 595 -0.333333 -468 469 0.333333 -468 470 -0.866667 -468 471 1.000000 -468 472 -0.066667 -468 596 0.466667 -469 477 0.466667 -470 478 -0.866667 -471 479 0.866667 -472 480 -0.466667 -473 477 -0.733333 -473 478 -0.466667 -473 479 -0.733333 -473 480 0.066667 -473 601 0.866667 -474 477 0.866667 -474 478 0.333333 -474 479 -0.200000 -474 480 0.733333 -474 602 0.333333 -475 477 -1.000000 -475 478 -0.866667 -475 479 0.333333 -475 480 0.600000 -475 603 1.666667 -476 477 0.733333 -476 478 0.200000 -476 479 0.600000 -476 480 0.066667 -476 604 -0.866667 -477 485 1.000000 -478 486 -0.466667 -479 487 3.666667 -480 488 -1.000000 -481 485 1.000000 -481 486 1.000000 -481 487 0.066667 -481 488 0.600000 -481 609 -1.000000 -482 485 -0.066667 -482 486 0.866667 -482 487 -0.733333 -482 488 0.600000 -482 610 0.066667 -483 485 -0.200000 -483 486 0.466667 -483 487 1.000000 -483 488 -1.000000 -483 611 0.600000 -484 485 1.000000 -484 486 0.066667 -484 487 -0.333333 -484 488 0.733333 -484 612 -0.466667 -485 493 -0.066667 -486 494 -1.000000 -487 495 -0.733333 -488 496 0.333333 -489 493 0.733333 -489 494 0.733333 -489 495 -0.333333 -489 496 0.866667 -489 617 0.200000 -490 493 -0.733333 -490 494 -0.600000 -490 495 -3.000000 -490 496 -1.000000 -490 618 -0.866667 -491 493 0.333333 -491 494 -1.000000 -491 495 -0.466667 -491 496 -0.200000 -491 619 0.733333 -492 493 0.200000 -492 494 0.333333 -492 495 1.000000 -492 496 1.666667 -492 620 -3.666667 -493 501 -1.000000 -494 502 1.000000 -495 503 3.666667 -496 504 2.333333 -497 501 -0.200000 -497 502 1.000000 -497 503 0.733333 -497 504 -0.733333 -497 625 -0.200000 -498 501 -1.000000 -498 502 1.000000 -498 503 -0.200000 -498 504 -3.666667 -498 626 4.333333 -499 501 -1.666667 -499 502 0.333333 -499 503 -0.600000 -499 504 3.000000 -499 627 2.333333 -500 501 -0.466667 -500 502 1.666667 -500 503 0.733333 -500 504 0.333333 -500 628 -0.466667 -501 509 0.600000 -502 510 0.733333 -503 511 0.066667 -504 512 -3.000000 -505 509 -0.600000 -505 510 1.000000 -505 511 -0.066667 -505 512 -1.000000 -505 633 -0.333333 -506 509 0.600000 -506 510 -0.866667 -506 511 0.466667 -506 512 0.733333 -506 634 -0.866667 -507 509 0.733333 -507 510 0.066667 -507 511 -0.333333 -507 512 -3.000000 -507 635 -1.000000 -508 509 0.066667 -508 510 0.200000 -508 511 1.000000 -508 512 -5.000000 -508 636 0.066667 -513 517 -0.200000 -513 518 0.600000 -513 519 0.333333 -513 520 1.000000 -513 641 -0.466667 -514 517 1.000000 -514 518 0.466667 -514 519 1.000000 -514 520 -0.600000 -514 642 1.000000 -515 517 -0.333333 -515 518 0.600000 -515 519 -0.600000 -515 520 -0.600000 -515 643 -0.866667 -516 517 4.333333 -516 518 -0.066667 -516 519 -0.333333 -516 520 -0.733333 -516 644 0.333333 -517 525 -0.200000 -518 526 -1.000000 -519 527 0.333333 -520 528 0.200000 -521 525 -3.666667 -521 526 3.000000 -521 527 -0.200000 -521 528 -1.000000 -521 649 -0.333333 -522 525 -0.733333 -522 526 -0.733333 -522 527 -0.733333 -522 528 -1.000000 -522 650 0.200000 -523 525 0.600000 -523 526 0.600000 -523 527 -0.066667 -523 528 0.066667 -523 651 -1.000000 -524 525 0.333333 -524 526 0.600000 -524 527 -1.000000 -524 528 0.333333 -524 652 -0.066667 -525 533 -0.466667 -526 534 0.866667 -527 535 0.866667 -528 536 1.000000 -529 533 1.000000 -529 534 0.600000 -529 535 -1.000000 -529 536 0.733333 -529 657 -0.333333 -530 533 0.466667 -530 534 0.333333 -530 535 -5.000000 -530 536 -0.600000 -530 658 -0.066667 -531 533 -0.866667 -531 534 -0.600000 -531 535 -0.600000 -531 536 0.866667 -531 659 0.600000 -532 533 0.866667 -532 534 -0.466667 -532 535 -0.066667 -532 536 0.066667 -532 660 -0.600000 -533 541 -0.600000 -534 542 -0.466667 -535 543 0.066667 -536 544 -0.733333 -537 541 0.200000 -537 542 -0.333333 -537 543 -0.466667 -537 544 -0.466667 -537 665 -0.066667 -538 541 0.600000 -538 542 -1.000000 -538 543 0.466667 -538 544 -0.866667 -538 666 -0.200000 -539 541 -0.200000 -539 542 -0.733333 -539 543 -0.866667 -539 544 -0.200000 -539 667 -1.000000 -540 541 -0.200000 -540 542 -0.333333 -540 543 -0.600000 -540 544 0.600000 -540 668 0.733333 -541 549 -0.466667 -542 550 0.066667 -543 551 -0.866667 -544 552 0.866667 -545 549 -0.466667 -545 550 -0.600000 -545 551 -1.000000 -545 552 0.866667 -545 673 0.466667 -546 549 0.866667 -546 550 -0.733333 -546 551 -0.866667 -546 552 -0.600000 -546 674 0.466667 -547 549 -0.200000 -547 550 -0.733333 -547 551 -1.000000 -547 552 1.000000 -547 675 -0.066667 -548 549 0.733333 -548 550 -0.866667 -548 551 -0.200000 -548 552 0.733333 -548 676 -0.866667 -549 557 -0.866667 -550 558 0.866667 -551 559 0.733333 -552 560 -0.866667 -553 557 0.733333 -553 558 0.066667 -553 559 -0.333333 -553 560 -0.333333 -553 681 -0.200000 -554 557 -1.000000 -554 558 -0.200000 -554 559 -0.333333 -554 560 0.333333 -554 682 -0.733333 -555 557 0.600000 -555 558 1.000000 -555 559 0.733333 -555 560 0.066667 -555 683 -0.066667 -556 557 0.466667 -556 558 0.333333 -556 559 0.066667 -556 560 0.333333 -556 684 -1.000000 -557 565 -0.733333 -558 566 0.333333 -559 567 0.733333 -560 568 -0.200000 -561 565 -0.466667 -561 566 0.333333 -561 567 0.866667 -561 568 -0.200000 -561 689 0.200000 -562 565 -1.000000 -562 566 0.466667 -562 567 0.066667 -562 568 -0.333333 -562 690 0.600000 -563 565 -0.866667 -563 566 -0.066667 -563 567 0.066667 -563 568 -0.466667 -563 691 0.200000 -564 565 -0.600000 -564 566 0.333333 -564 567 -0.600000 -564 568 0.466667 -564 692 -0.600000 -565 573 -0.333333 -566 574 -0.333333 -567 575 0.466667 -568 576 -0.200000 -569 573 0.466667 -569 574 -0.866667 -569 575 -0.066667 -569 576 -1.000000 -569 697 -0.200000 -570 573 0.066667 -570 574 0.733333 -570 575 0.066667 -570 576 -0.333333 -570 698 0.866667 -571 573 -0.066667 -571 574 -0.733333 -571 575 -1.000000 -571 576 -0.733333 -571 699 -1.000000 -572 573 -0.066667 -572 574 -0.466667 -572 575 -0.600000 -572 576 0.200000 -572 700 -0.466667 -573 581 0.333333 -574 582 -0.600000 -575 583 -0.866667 -576 584 -0.466667 -577 581 -0.600000 -577 582 1.000000 -577 583 -0.200000 -577 584 0.066667 -577 705 -0.333333 -578 581 -0.866667 -578 582 0.066667 -578 583 -0.200000 -578 584 -0.466667 -578 706 0.600000 -579 581 -0.466667 -579 582 0.200000 -579 583 -0.200000 -579 584 -0.600000 -579 707 -0.333333 -580 581 0.200000 -580 582 -0.466667 -580 583 0.866667 -580 584 0.066667 -580 708 -0.200000 -581 589 -0.333333 -582 590 -3.000000 -583 591 0.466667 -584 592 -0.200000 -585 589 -0.333333 -585 590 0.600000 -585 591 0.866667 -585 592 1.000000 -585 713 0.200000 -586 589 -0.333333 -586 590 0.733333 -586 591 -0.466667 -586 592 0.333333 -586 714 0.333333 -587 589 -0.733333 -587 590 -0.066667 -587 591 -0.733333 -587 592 -0.866667 -587 715 -0.466667 -588 589 -1.000000 -588 590 -0.066667 -588 591 0.600000 -588 592 -0.600000 -588 716 0.200000 -589 597 -0.333333 -590 598 -0.733333 -591 599 -0.866667 -592 600 0.200000 -593 597 1.000000 -593 598 -0.600000 -593 599 -0.333333 -593 600 -0.733333 -593 721 -0.600000 -594 597 -1.000000 -594 598 0.066667 -594 599 -0.333333 -594 600 -0.733333 -594 722 0.333333 -595 597 0.466667 -595 598 1.000000 -595 599 0.333333 -595 600 -0.200000 -595 723 -0.733333 -596 597 -0.200000 -596 598 -0.600000 -596 599 -1.000000 -596 600 -0.600000 -596 724 0.466667 -597 605 0.333333 -598 606 -0.066667 -599 607 1.000000 -600 608 0.066667 -601 605 -0.600000 -601 606 -0.066667 -601 607 0.466667 -601 608 0.333333 -601 729 -0.066667 -602 605 0.733333 -602 606 -0.600000 -602 607 0.866667 -602 608 -0.733333 -602 730 0.066667 -603 605 4.333333 -603 606 -1.666667 -603 607 5.000000 -603 608 -0.333333 -603 731 -0.333333 -604 605 -1.000000 -604 606 -0.200000 -604 607 4.333333 -604 608 -0.200000 -604 732 3.666667 -605 613 0.333333 -606 614 0.066667 -607 615 -4.333333 -608 616 -0.066667 -609 613 0.333333 -609 614 -0.466667 -609 615 1.666667 -609 616 0.200000 -609 737 -0.466667 -610 613 -1.000000 -610 614 0.200000 -610 615 -1.666667 -610 616 0.200000 -610 738 0.733333 -611 613 0.866667 -611 614 -0.866667 -611 615 1.000000 -611 616 -0.066667 -611 739 1.000000 -612 613 -1.000000 -612 614 -0.866667 -612 615 -1.666667 -612 616 0.600000 -612 740 0.466667 -613 621 0.466667 -614 622 0.066667 -615 623 -0.600000 -616 624 -0.866667 -617 621 0.066667 -617 622 0.466667 -617 623 -0.733333 -617 624 -0.200000 -617 745 0.466667 -618 621 1.666667 -618 622 1.000000 -618 623 -0.600000 -618 624 0.200000 -618 746 3.000000 -619 621 -3.000000 -619 622 0.600000 -619 623 -0.866667 -619 624 0.333333 -619 747 -0.333333 -620 621 -0.466667 -620 622 -0.466667 -620 623 -0.733333 -620 624 -0.866667 -620 748 -0.200000 -621 629 -3.666667 -622 630 0.333333 -623 631 0.333333 -624 632 1.666667 -625 629 -1.000000 -625 630 -5.000000 -625 631 -0.466667 -625 632 1.000000 -625 753 1.000000 -626 629 0.333333 -626 630 -0.333333 -626 631 -2.333333 -626 632 -5.000000 -626 754 3.000000 -627 629 -0.866667 -627 630 -0.866667 -627 631 2.333333 -627 632 -0.733333 -627 755 0.200000 -628 629 0.733333 -628 630 0.200000 -628 631 -0.733333 -628 632 -0.466667 -628 756 -0.466667 -629 637 0.866667 -630 638 -1.000000 -631 639 4.333333 -632 640 0.333333 -633 637 -0.733333 -633 638 -0.066667 -633 639 -0.333333 -633 640 -0.866667 -633 761 -0.200000 -634 637 0.333333 -634 638 -0.600000 -634 639 0.333333 -634 640 0.200000 -634 762 0.200000 -635 637 0.866667 -635 638 -0.866667 -635 639 3.000000 -635 640 3.666667 -635 763 0.866667 -636 637 0.066667 -636 638 -0.200000 -636 639 -0.866667 -636 640 0.066667 -636 764 0.466667 -641 645 -0.866667 -641 646 -0.600000 -641 647 -0.600000 -641 648 -0.466667 -641 769 -0.733333 -642 645 0.600000 -642 646 -0.466667 -642 647 -0.066667 -642 648 0.866667 -642 770 -0.466667 -643 645 0.333333 -643 646 0.333333 -643 647 -0.733333 -643 648 0.066667 -643 771 1.000000 -644 645 -0.866667 -644 646 0.600000 -644 647 0.200000 -644 648 -0.200000 -644 772 -1.000000 -645 653 -0.466667 -646 654 -0.600000 -647 655 0.866667 -648 656 -0.866667 -649 653 -1.000000 -649 654 0.333333 -649 655 -0.733333 -649 656 0.866667 -649 777 0.600000 -650 653 -1.000000 -650 654 -0.200000 -650 655 0.466667 -650 656 -0.333333 -650 778 0.866667 -651 653 0.866667 -651 654 1.000000 -651 655 0.200000 -651 656 -0.866667 -651 779 0.733333 -652 653 0.200000 -652 654 -0.866667 -652 655 -0.466667 -652 656 -0.200000 -652 780 0.733333 -653 661 -0.866667 -654 662 -0.200000 -655 663 0.200000 -656 664 0.600000 -657 661 0.333333 -657 662 0.466667 -657 663 -1.000000 -657 664 -0.200000 -657 785 -0.200000 -658 661 0.466667 -658 662 -0.733333 -658 663 0.066667 -658 664 -0.333333 -658 786 -0.600000 -659 661 0.066667 -659 662 -0.600000 -659 663 0.466667 -659 664 -0.066667 -659 787 0.466667 -660 661 -0.733333 -660 662 -0.600000 -660 663 1.000000 -660 664 -0.600000 -660 788 0.066667 -661 669 -0.200000 -662 670 0.466667 -663 671 -0.733333 -664 672 1.000000 -665 669 -0.466667 -665 670 0.600000 -665 671 0.200000 -665 672 -0.200000 -665 793 0.733333 -666 669 1.000000 -666 670 -0.333333 -666 671 1.000000 -666 672 -0.466667 -666 794 1.000000 -667 669 -0.733333 -667 670 0.200000 -667 671 0.466667 -667 672 -0.600000 -667 795 0.600000 -668 669 0.466667 -668 670 -0.333333 -668 671 -0.866667 -668 672 -0.333333 -668 796 1.000000 -669 677 1.000000 -670 678 0.200000 -671 679 -0.200000 -672 680 -0.866667 -673 677 0.200000 -673 678 -0.866667 -673 679 -0.600000 -673 680 -0.066667 -673 801 -0.866667 -674 677 0.066667 -674 678 0.333333 -674 679 0.200000 -674 680 0.866667 -674 802 0.600000 -675 677 -0.333333 -675 678 0.066667 -675 679 -0.866667 -675 680 -0.200000 -675 803 0.733333 -676 677 -1.000000 -676 678 1.000000 -676 679 0.466667 -676 680 0.866667 -676 804 0.333333 -677 685 -0.333333 -678 686 -0.866667 -679 687 0.866667 -680 688 -0.200000 -681 685 -0.466667 -681 686 0.333333 -681 687 -0.066667 -681 688 -0.866667 -681 809 0.866667 -682 685 -0.200000 -682 686 -0.066667 -682 687 -0.733333 -682 688 -0.866667 -682 810 0.333333 -683 685 -0.200000 -683 686 0.733333 -683 687 0.066667 -683 688 -0.066667 -683 811 -0.200000 -684 685 0.466667 -684 686 -0.333333 -684 687 -0.866667 -684 688 0.733333 -684 812 0.866667 -685 693 0.600000 -686 694 -0.200000 -687 695 0.466667 -688 696 -0.600000 -689 693 -0.733333 -689 694 0.466667 -689 695 -0.600000 -689 696 0.733333 -689 817 0.333333 -690 693 -0.600000 -690 694 0.333333 -690 695 -0.200000 -690 696 0.200000 -690 818 0.600000 -691 693 -0.466667 -691 694 0.066667 -691 695 -0.466667 -691 696 -0.866667 -691 819 -0.333333 -692 693 0.733333 -692 694 0.066667 -692 695 0.066667 -692 696 2.333333 -692 820 2.333333 -693 701 0.200000 -694 702 0.866667 -695 703 1.000000 -696 704 0.600000 -697 701 -0.600000 -697 702 0.600000 -697 703 -0.733333 -697 704 0.466667 -697 825 -4.333333 -698 701 -2.333333 -698 702 -1.000000 -698 703 -0.466667 -698 704 -0.600000 -698 826 -2.333333 -699 701 -0.466667 -699 702 0.066667 -699 703 1.000000 -699 704 -0.733333 -699 827 -0.333333 -700 701 -0.333333 -700 702 -0.733333 -700 703 -0.333333 -700 704 0.466667 -700 828 1.000000 -701 709 -1.000000 -702 710 -1.000000 -703 711 -0.733333 -704 712 0.600000 -705 709 0.066667 -705 710 1.000000 -705 711 -0.200000 -705 712 0.200000 -705 833 0.333333 -706 709 0.866667 -706 710 -1.000000 -706 711 1.000000 -706 712 0.733333 -706 834 -0.333333 -707 709 0.866667 -707 710 0.600000 -707 711 -0.600000 -707 712 -0.866667 -707 835 -5.000000 -708 709 1.000000 -708 710 -0.066667 -708 711 -0.466667 -708 712 -0.733333 -708 836 0.733333 -709 717 0.200000 -710 718 0.066667 -711 719 0.466667 -712 720 -0.200000 -713 717 -1.000000 -713 718 0.200000 -713 719 0.200000 -713 720 -0.066667 -713 841 -0.200000 -714 717 -0.333333 -714 718 0.466667 -714 719 0.200000 -714 720 -0.866667 -714 842 -0.066667 -715 717 0.866667 -715 718 -0.333333 -715 719 -0.866667 -715 720 2.333333 -715 843 -5.000000 -716 717 0.333333 -716 718 0.600000 -716 719 -0.733333 -716 720 -0.600000 -716 844 2.333333 -717 725 -0.600000 -718 726 0.333333 -719 727 0.066667 -720 728 0.200000 -721 725 0.200000 -721 726 -0.866667 -721 727 -0.466667 -721 728 -0.066667 -721 849 -0.066667 -722 725 0.466667 -722 726 -0.733333 -722 727 -0.600000 -722 728 1.000000 -722 850 -0.200000 -723 725 -1.000000 -723 726 -0.866667 -723 727 0.466667 -723 728 0.466667 -723 851 0.466667 -724 725 -0.600000 -724 726 0.600000 -724 727 -0.466667 -724 728 -0.333333 -724 852 -0.466667 -725 733 -1.000000 -726 734 0.200000 -727 735 0.733333 -728 736 0.733333 -729 733 -0.866667 -729 734 0.066667 -729 735 0.466667 -729 736 1.000000 -729 857 0.333333 -730 733 1.000000 -730 734 -0.866667 -730 735 0.200000 -730 736 -0.466667 -730 858 -0.866667 -731 733 -0.600000 -731 734 0.466667 -731 735 0.600000 -731 736 -0.733333 -731 859 -0.600000 -732 733 0.066667 -732 734 -0.466667 -732 735 0.200000 -732 736 0.333333 -732 860 -0.600000 -733 741 -1.000000 -734 742 0.733333 -735 743 -1.000000 -736 744 -0.200000 -737 741 0.200000 -737 742 3.000000 -737 743 0.333333 -737 744 1.000000 -737 865 -1.000000 -738 741 0.733333 -738 742 -0.333333 -738 743 4.333333 -738 744 4.333333 -738 866 3.666667 -739 741 0.466667 -739 742 -0.466667 -739 743 -0.466667 -739 744 0.600000 -739 867 0.600000 -740 741 0.866667 -740 742 -1.666667 -740 743 -0.066667 -740 744 5.000000 -740 868 0.866667 -741 749 -0.200000 -742 750 -0.600000 -743 751 1.000000 -744 752 -0.600000 -745 749 -0.200000 -745 750 -0.466667 -745 751 0.333333 -745 752 0.066667 -745 873 0.200000 -746 749 0.866667 -746 750 -0.333333 -746 751 -0.600000 -746 752 -0.066667 -746 874 -0.466667 -747 749 -0.866667 -747 750 0.200000 -747 751 -0.733333 -747 752 0.600000 -747 875 0.333333 -748 749 -0.200000 -748 750 0.733333 -748 751 1.000000 -748 752 -0.200000 -748 876 3.666667 -749 757 -0.333333 -750 758 0.066667 -751 759 0.066667 -752 760 1.000000 -753 757 -0.733333 -753 758 1.000000 -753 759 1.000000 -753 760 -1.000000 -753 881 -0.866667 -754 757 -0.333333 -754 758 0.600000 -754 759 -0.200000 -754 760 2.333333 -754 882 -4.333333 -755 757 0.066667 -755 758 1.000000 -755 759 0.600000 -755 760 0.200000 -755 883 0.200000 -756 757 -0.866667 -756 758 0.200000 -756 759 0.333333 -756 760 3.000000 -756 884 -0.200000 -757 765 0.333333 -758 766 -0.200000 -759 767 0.066667 -760 768 5.000000 -761 765 -1.000000 -761 766 -0.600000 -761 767 -0.333333 -761 768 4.333333 -761 889 0.466667 -762 765 0.733333 -762 766 0.333333 -762 767 1.000000 -762 768 3.666667 -762 890 -0.866667 -763 765 0.866667 -763 766 0.200000 -763 767 0.733333 -763 768 -4.333333 -763 891 -4.333333 -764 765 -0.733333 -764 766 0.066667 -764 767 -0.333333 -764 768 -0.466667 -764 892 -0.200000 -769 773 0.466667 -769 774 0.200000 -769 775 0.866667 -769 776 -5.000000 -769 897 0.333333 -770 773 -0.600000 -770 774 -0.333333 -770 775 -0.600000 -770 776 -3.000000 -770 898 1.000000 -771 773 0.466667 -771 774 0.733333 -771 775 0.066667 -771 776 -0.333333 -771 899 0.066667 -772 773 0.600000 -772 774 0.333333 -772 775 -0.866667 -772 776 1.000000 -772 900 0.600000 -773 781 -0.866667 -774 782 -1.000000 -775 783 0.066667 -776 784 -0.466667 -777 781 0.200000 -777 782 0.733333 -777 783 -0.866667 -777 784 0.066667 -777 905 -0.600000 -778 781 0.066667 -778 782 0.466667 -778 783 0.466667 -778 784 0.333333 -778 906 0.066667 -779 781 0.600000 -779 782 -0.600000 -779 783 0.200000 -779 784 -0.733333 -779 907 -0.200000 -780 781 0.333333 -780 782 -0.866667 -780 783 -0.866667 -780 784 0.466667 -780 908 0.466667 -781 789 -0.333333 -782 790 -2.333333 -783 791 -0.733333 -784 792 0.866667 -785 789 0.200000 -785 790 -0.066667 -785 791 -0.466667 -785 792 1.000000 -785 913 1.000000 -786 789 -0.733333 -786 790 -1.000000 -786 791 -0.600000 -786 792 0.066667 -786 914 0.066667 -787 789 0.866667 -787 790 -0.600000 -787 791 0.066667 -787 792 -0.200000 -787 915 -5.000000 -788 789 -0.466667 -788 790 0.066667 -788 791 -0.333333 -788 792 -0.066667 -788 916 0.333333 -789 797 0.066667 -790 798 0.066667 -791 799 -0.466667 -792 800 0.733333 -793 797 0.200000 -793 798 3.666667 -793 799 0.866667 -793 800 -0.600000 -793 921 0.200000 -794 797 1.000000 -794 798 -0.600000 -794 799 -1.000000 -794 800 -1.000000 -794 922 1.000000 -795 797 0.600000 -795 798 5.000000 -795 799 0.466667 -795 800 -1.000000 -795 923 0.333333 -796 797 -0.200000 -796 798 -0.466667 -796 799 0.866667 -796 800 0.066667 -796 924 0.866667 -797 805 -0.200000 -798 806 -0.333333 -799 807 -0.733333 -800 808 -0.333333 -801 805 -0.066667 -801 806 0.866667 -801 807 1.000000 -801 808 1.000000 -801 929 0.333333 -802 805 0.466667 -802 806 -2.333333 -802 807 -0.066667 -802 808 -1.000000 -802 930 3.000000 -803 805 0.200000 -803 806 -0.466667 -803 807 -0.066667 -803 808 1.000000 -803 931 0.333333 -804 805 0.200000 -804 806 -0.600000 -804 807 -0.466667 -804 808 -0.600000 -804 932 0.333333 -805 813 0.200000 -806 814 -0.333333 -807 815 -0.200000 -808 816 0.066667 -809 813 -1.000000 -809 814 -0.866667 -809 815 -1.000000 -809 816 0.333333 -809 937 -0.600000 -810 813 1.000000 -810 814 3.666667 -810 815 0.866667 -810 816 0.466667 -810 938 0.600000 -811 813 -0.600000 -811 814 0.866667 -811 815 0.333333 -811 816 1.000000 -811 939 0.466667 -812 813 0.333333 -812 814 0.333333 -812 815 0.333333 -812 816 0.600000 -812 940 -0.066667 -813 821 1.000000 -814 822 0.333333 -815 823 1.000000 -816 824 -0.733333 -817 821 0.733333 -817 822 -0.466667 -817 823 -0.600000 -817 824 0.466667 -817 945 1.000000 -818 821 0.600000 -818 822 -1.666667 -818 823 -0.600000 -818 824 0.866667 -818 946 -0.733333 -819 821 0.200000 -819 822 1.666667 -819 823 -0.333333 -819 824 -1.000000 -819 947 -1.000000 -820 821 1.666667 -820 822 5.000000 -820 823 5.000000 -820 824 -0.866667 -820 948 -0.466667 -821 829 -0.200000 -822 830 -1.000000 -823 831 -0.600000 -824 832 -0.200000 -825 829 2.333333 -825 830 -1.000000 -825 831 -0.333333 -825 832 -0.600000 -825 953 0.466667 -826 829 -0.066667 -826 830 0.066667 -826 831 1.000000 -826 832 -1.000000 -826 954 -0.600000 -827 829 0.733333 -827 830 -0.466667 -827 831 0.600000 -827 832 -0.066667 -827 955 -0.466667 -828 829 0.066667 -828 830 -0.333333 -828 831 0.866667 -828 832 0.733333 -828 956 0.466667 -829 837 -0.733333 -830 838 1.000000 -831 839 -1.000000 -832 840 0.333333 -833 837 0.733333 -833 838 1.000000 -833 839 1.000000 -833 840 0.200000 -833 961 0.600000 -834 837 0.866667 -834 838 0.733333 -834 839 -0.733333 -834 840 -0.600000 -834 962 0.466667 -835 837 1.000000 -835 838 3.666667 -835 839 -0.733333 -835 840 -0.466667 -835 963 0.333333 -836 837 0.600000 -836 838 1.000000 -836 839 -0.333333 -836 840 1.000000 -836 964 0.333333 -837 845 0.733333 -838 846 4.333333 -839 847 -0.600000 -840 848 -2.333333 -841 845 -0.333333 -841 846 0.066667 -841 847 -0.333333 -841 848 -3.666667 -841 969 0.200000 -842 845 0.600000 -842 846 0.333333 -842 847 -2.333333 -842 848 -0.600000 -842 970 -5.000000 -843 845 1.000000 -843 846 -0.066667 -843 847 -3.000000 -843 848 0.333333 -843 971 0.066667 -844 845 -2.333333 -844 846 -5.000000 -844 847 1.666667 -844 848 -4.333333 -844 972 -1.666667 -845 853 0.200000 -846 854 0.866667 -847 855 -0.600000 -848 856 1.000000 -849 853 0.866667 -849 854 -0.600000 -849 855 -0.333333 -849 856 -0.600000 -849 977 -0.866667 -850 853 0.733333 -850 854 -0.333333 -850 855 -0.600000 -850 856 0.600000 -850 978 -0.066667 -851 853 0.333333 -851 854 0.866667 -851 855 -0.600000 -851 856 -0.066667 -851 979 -0.333333 -852 853 -0.600000 -852 854 -0.466667 -852 855 -0.333333 -852 856 -0.866667 -852 980 -0.600000 -853 861 -0.200000 -854 862 0.866667 -855 863 0.466667 -856 864 -1.000000 -857 861 0.333333 -857 862 -0.066667 -857 863 0.333333 -857 864 -0.600000 -857 985 0.200000 -858 861 3.000000 -858 862 -0.733333 -858 863 -0.333333 -858 864 0.866667 -858 986 0.200000 -859 861 -1.000000 -859 862 -0.866667 -859 863 0.333333 -859 864 -0.066667 -859 987 -0.866667 -860 861 0.866667 -860 862 0.600000 -860 863 0.066667 -860 864 0.466667 -860 988 -1.000000 -861 869 -0.600000 -862 870 -1.000000 -863 871 0.066667 -864 872 0.066667 -865 869 -0.466667 -865 870 -0.200000 -865 871 -0.200000 -865 872 -0.866667 -865 993 -0.866667 -866 869 -1.000000 -866 870 -0.200000 -866 871 0.466667 -866 872 0.600000 -866 994 0.866667 -867 869 0.466667 -867 870 0.733333 -867 871 -0.733333 -867 872 -0.200000 -867 995 0.866667 -868 869 -1.000000 -868 870 -0.466667 -868 871 -0.600000 -868 872 -0.600000 -868 996 -0.600000 -869 877 -0.066667 -870 878 -3.666667 -871 879 0.466667 -872 880 -4.333333 -873 877 -0.466667 -873 878 -3.666667 -873 879 0.600000 -873 880 0.600000 -873 1001 -1.000000 -874 877 -0.066667 -874 878 0.466667 -874 879 -1.000000 -874 880 -0.466667 -874 1002 -1.000000 -875 877 -0.200000 -875 878 0.733333 -875 879 -0.333333 -875 880 -0.600000 -875 1003 -1.000000 -876 877 4.333333 -876 878 0.066667 -876 879 -0.733333 -876 880 -2.333333 -876 1004 2.333333 -877 885 0.866667 -878 886 -1.666667 -879 887 0.200000 -880 888 -3.666667 -881 885 3.000000 -881 886 -1.000000 -881 887 0.200000 -881 888 -0.733333 -881 1009 -0.866667 -882 885 0.466667 -882 886 -1.000000 -882 887 -1.000000 -882 888 0.466667 -882 1010 -3.000000 -883 885 -1.000000 -883 886 0.200000 -883 887 0.200000 -883 888 -0.600000 -883 1011 -2.333333 -884 885 0.333333 -884 886 -0.733333 -884 887 -0.066667 -884 888 1.666667 -884 1012 -0.733333 -885 893 0.200000 -886 894 0.866667 -887 895 -0.333333 -888 896 0.200000 -889 893 -1.000000 -889 894 -0.600000 -889 895 0.866667 -889 896 -0.333333 -889 1017 -0.600000 -890 893 0.333333 -890 894 0.466667 -890 895 1.000000 -890 896 0.733333 -890 1018 -0.066667 -891 893 -0.466667 -891 894 -0.066667 -891 895 0.466667 -891 896 0.066667 -891 1019 -0.466667 -892 893 0.600000 -892 894 -0.600000 -892 895 -0.600000 -892 896 -1.000000 -892 1020 0.200000 -897 901 -0.333333 -897 902 -0.866667 -897 903 -5.000000 -897 904 0.600000 -897 1025 -0.466667 -898 901 -0.866667 -898 902 0.733333 -898 903 3.666667 -898 904 -1.000000 -898 1026 0.200000 -899 901 -0.733333 -899 902 -0.733333 -899 903 -0.600000 -899 904 0.466667 -899 1027 -0.600000 -900 901 -0.866667 -900 902 1.000000 -900 903 -0.866667 -900 904 0.733333 -900 1028 -0.866667 -901 909 -0.200000 -902 910 0.200000 -903 911 0.200000 -904 912 0.333333 -905 909 0.866667 -905 910 -0.733333 -905 911 -0.866667 -905 912 -0.066667 -905 1033 -0.333333 -906 909 -0.600000 -906 910 -0.333333 -906 911 0.866667 -906 912 0.733333 -906 1034 -1.000000 -907 909 -1.000000 -907 910 -0.600000 -907 911 -1.000000 -907 912 -0.466667 -907 1035 -0.200000 -908 909 0.733333 -908 910 -0.733333 -908 911 -0.600000 -908 912 0.733333 -908 1036 0.466667 -909 917 -0.200000 -910 918 0.733333 -911 919 0.600000 -912 920 0.066667 -913 917 0.333333 -913 918 0.466667 -913 919 0.333333 -913 920 0.200000 -913 1041 -0.333333 -914 917 -0.733333 -914 918 -0.733333 -914 919 0.600000 -914 920 -0.600000 -914 1042 0.866667 -915 917 -0.333333 -915 918 4.333333 -915 919 -0.600000 -915 920 1.000000 -915 1043 -0.733333 -916 917 0.733333 -916 918 -0.066667 -916 919 0.066667 -916 920 -0.600000 -916 1044 0.066667 -917 925 0.200000 -918 926 4.333333 -919 927 1.000000 -920 928 0.733333 -921 925 1.000000 -921 926 -0.333333 -921 927 0.733333 -921 928 0.333333 -921 1049 0.066667 -922 925 0.733333 -922 926 -0.733333 -922 927 -1.000000 -922 928 -0.733333 -922 1050 -0.866667 -923 925 -0.200000 -923 926 -0.066667 -923 927 -1.000000 -923 928 0.200000 -923 1051 -0.333333 -924 925 0.866667 -924 926 1.000000 -924 927 -0.066667 -924 928 -0.733333 -924 1052 0.333333 -925 933 -0.200000 -926 934 0.866667 -927 935 0.200000 -928 936 -0.200000 -929 933 -0.466667 -929 934 -0.733333 -929 935 -0.866667 -929 936 -0.866667 -929 1057 -0.066667 -930 933 -1.000000 -930 934 -0.466667 -930 935 0.866667 -930 936 -0.733333 -930 1058 0.333333 -931 933 -0.333333 -931 934 -1.000000 -931 935 0.066667 -931 936 -0.733333 -931 1059 0.466667 -932 933 -0.733333 -932 934 0.200000 -932 935 -0.600000 -932 936 -0.466667 -932 1060 -0.066667 -933 941 0.466667 -934 942 -0.333333 -935 943 -0.600000 -936 944 1.000000 -937 941 0.866667 -937 942 0.866667 -937 943 0.733333 -937 944 -0.066667 -937 1065 0.066667 -938 941 0.333333 -938 942 0.733333 -938 943 -0.333333 -938 944 -0.333333 -938 1066 -0.200000 -939 941 0.200000 -939 942 -0.066667 -939 943 0.466667 -939 944 -0.333333 -939 1067 0.466667 -940 941 0.333333 -940 942 0.733333 -940 943 1.000000 -940 944 0.066667 -940 1068 -0.066667 -941 949 -0.466667 -942 950 -0.200000 -943 951 -0.600000 -944 952 0.733333 -945 949 -0.333333 -945 950 1.000000 -945 951 -0.600000 -945 952 0.200000 -945 1073 0.466667 -946 949 0.600000 -946 950 1.000000 -946 951 0.733333 -946 952 -0.200000 -946 1074 1.000000 -947 949 0.466667 -947 950 -1.000000 -947 951 -0.733333 -947 952 -0.866667 -947 1075 -0.066667 -948 949 0.733333 -948 950 0.733333 -948 951 -0.066667 -948 952 0.066667 -948 1076 1.000000 -949 957 0.733333 -950 958 -0.866667 -951 959 0.066667 -952 960 -0.466667 -953 957 0.333333 -953 958 2.333333 -953 959 1.666667 -953 960 0.466667 -953 1081 -0.866667 -954 957 0.600000 -954 958 -0.333333 -954 959 0.466667 -954 960 -0.066667 -954 1082 0.600000 -955 957 0.466667 -955 958 0.866667 -955 959 -2.333333 -955 960 0.866667 -955 1083 0.866667 -956 957 -0.733333 -956 958 -0.466667 -956 959 -0.066667 -956 960 -0.200000 -956 1084 -0.600000 -957 965 0.333333 -958 966 -0.200000 -959 967 -5.000000 -960 968 -0.466667 -961 965 -0.200000 -961 966 2.333333 -961 967 -0.600000 -961 968 0.066667 -961 1089 2.333333 -962 965 0.066667 -962 966 0.066667 -962 967 -0.333333 -962 968 -0.866667 -962 1090 0.333333 -963 965 -1.000000 -963 966 0.600000 -963 967 0.200000 -963 968 0.466667 -963 1091 -0.200000 -964 965 0.466667 -964 966 -1.000000 -964 967 1.000000 -964 968 0.200000 -964 1092 -0.466667 -965 973 1.000000 -966 974 -0.200000 -967 975 0.600000 -968 976 0.466667 -969 973 4.333333 -969 974 0.866667 -969 975 -0.866667 -969 976 0.466667 -969 1097 0.600000 -970 973 -0.200000 -970 974 -0.600000 -970 975 0.733333 -970 976 -1.000000 -970 1098 1.666667 -971 973 5.000000 -971 974 -0.600000 -971 975 -0.466667 -971 976 0.066667 -971 1099 0.200000 -972 973 3.000000 -972 974 3.000000 -972 975 1.000000 -972 976 -1.000000 -972 1100 0.333333 -973 981 -4.333333 -974 982 -0.066667 -975 983 -2.333333 -976 984 -0.733333 -977 981 -5.000000 -977 982 0.600000 -977 983 -4.333333 -977 984 -0.866667 -977 1105 -0.733333 -978 981 -4.333333 -978 982 -0.733333 -978 983 1.000000 -978 984 5.000000 -978 1106 0.600000 -979 981 -0.066667 -979 982 0.600000 -979 983 -0.200000 -979 984 0.200000 -979 1107 0.866667 -980 981 -0.466667 -980 982 0.333333 -980 983 1.000000 -980 984 -0.333333 -980 1108 0.333333 -981 989 0.866667 -982 990 -0.466667 -983 991 0.333333 -984 992 -0.333333 -985 989 0.200000 -985 990 0.600000 -985 991 -0.600000 -985 992 -1.000000 -985 1113 -0.333333 -986 989 -0.333333 -986 990 0.466667 -986 991 -0.066667 -986 992 1.000000 -986 1114 -0.733333 -987 989 0.200000 -987 990 0.466667 -987 991 0.866667 -987 992 -0.733333 -987 1115 -0.733333 -988 989 -0.200000 -988 990 -0.066667 -988 991 0.333333 -988 992 -0.066667 -988 1116 -0.600000 -989 997 -0.866667 -990 998 0.733333 -991 999 0.333333 -992 1000 0.466667 -993 997 1.000000 -993 998 -0.866667 -993 999 -1.000000 -993 1000 1.000000 -993 1121 0.600000 -994 997 -0.066667 -994 998 0.200000 -994 999 0.866667 -994 1000 -0.333333 -994 1122 -1.000000 -995 997 0.333333 -995 998 -0.333333 -995 999 0.066667 -995 1000 1.000000 -995 1123 -0.333333 -996 997 -0.866667 -996 998 -0.600000 -996 999 1.000000 -996 1000 -0.466667 -996 1124 0.733333 -997 1005 0.466667 -998 1006 0.600000 -999 1007 -0.733333 -1000 1008 0.600000 -1001 1005 -1.000000 -1001 1006 0.333333 -1001 1007 -0.600000 -1001 1008 0.200000 -1001 1129 1.000000 -1002 1005 0.866667 -1002 1006 0.600000 -1002 1007 0.600000 -1002 1008 0.733333 -1002 1130 -0.733333 -1003 1005 0.733333 -1003 1006 0.733333 -1003 1007 0.066667 -1003 1008 -0.866667 -1003 1131 0.466667 -1004 1005 0.600000 -1004 1006 1.000000 -1004 1007 -0.733333 -1004 1008 0.333333 -1004 1132 4.333333 -1005 1013 0.600000 -1006 1014 -0.600000 -1007 1015 1.000000 -1008 1016 -0.600000 -1009 1013 0.600000 -1009 1014 0.333333 -1009 1015 0.733333 -1009 1016 0.066667 -1009 1137 0.733333 -1010 1013 -0.733333 -1010 1014 -1.000000 -1010 1015 0.600000 -1010 1016 -0.600000 -1010 1138 -3.666667 -1011 1013 0.600000 -1011 1014 0.466667 -1011 1015 0.600000 -1011 1016 -0.866667 -1011 1139 -0.466667 -1012 1013 -1.000000 -1012 1014 0.200000 -1012 1015 -0.466667 -1012 1016 0.733333 -1012 1140 0.333333 -1013 1021 -0.866667 -1014 1022 -1.000000 -1015 1023 -0.200000 -1016 1024 0.200000 -1017 1021 0.200000 -1017 1022 0.200000 -1017 1023 -0.466667 -1017 1024 -0.200000 -1017 1145 0.200000 -1018 1021 0.600000 -1018 1022 0.466667 -1018 1023 0.600000 -1018 1024 -1.000000 -1018 1146 -0.466667 -1019 1021 0.600000 -1019 1022 -0.200000 -1019 1023 -1.000000 -1019 1024 1.000000 -1019 1147 -0.333333 -1020 1021 -0.466667 -1020 1022 -0.066667 -1020 1023 -1.000000 -1020 1024 -0.600000 -1020 1148 -0.866667 -1025 1029 -0.733333 -1025 1030 0.333333 -1025 1031 0.466667 -1025 1032 0.600000 -1025 1153 -0.200000 -1026 1029 -0.600000 -1026 1030 -0.600000 -1026 1031 0.866667 -1026 1032 0.333333 -1026 1154 -0.733333 -1027 1029 0.600000 -1027 1030 0.733333 -1027 1031 -0.733333 -1027 1032 0.333333 -1027 1155 -0.600000 -1028 1029 0.600000 -1028 1030 0.733333 -1028 1031 -0.066667 -1028 1032 -0.866667 -1028 1156 0.866667 -1029 1037 1.000000 -1030 1038 0.333333 -1031 1039 1.000000 -1032 1040 -0.733333 -1033 1037 0.066667 -1033 1038 0.866667 -1033 1039 0.200000 -1033 1040 0.466667 -1033 1161 -0.333333 -1034 1037 0.333333 -1034 1038 0.866667 -1034 1039 0.733333 -1034 1040 -0.733333 -1034 1162 -0.333333 -1035 1037 1.000000 -1035 1038 0.066667 -1035 1039 0.733333 -1035 1040 0.333333 -1035 1163 0.466667 -1036 1037 0.200000 -1036 1038 -0.333333 -1036 1039 -0.200000 -1036 1040 0.466667 -1036 1164 0.600000 -1037 1045 0.200000 -1038 1046 -0.466667 -1039 1047 0.066667 -1040 1048 -0.200000 -1041 1045 0.866667 -1041 1046 -0.200000 -1041 1047 0.600000 -1041 1048 0.200000 -1041 1169 1.000000 -1042 1045 1.000000 -1042 1046 0.466667 -1042 1047 0.333333 -1042 1048 -0.066667 -1042 1170 -0.866667 -1043 1045 0.200000 -1043 1046 0.733333 -1043 1047 -0.733333 -1043 1048 -0.466667 -1043 1171 0.866667 -1044 1045 0.600000 -1044 1046 0.733333 -1044 1047 -0.200000 -1044 1048 -0.866667 -1044 1172 0.333333 -1045 1053 0.733333 -1046 1054 0.333333 -1047 1055 0.600000 -1048 1056 -0.200000 -1049 1053 -0.333333 -1049 1054 0.066667 -1049 1055 -0.600000 -1049 1056 0.866667 -1049 1177 1.000000 -1050 1053 0.466667 -1050 1054 -0.733333 -1050 1055 4.333333 -1050 1056 -0.733333 -1050 1178 -0.600000 -1051 1053 1.000000 -1051 1054 0.200000 -1051 1055 0.600000 -1051 1056 0.066667 -1051 1179 1.000000 -1052 1053 -0.200000 -1052 1054 0.600000 -1052 1055 0.466667 -1052 1056 1.000000 -1052 1180 1.000000 -1053 1061 -0.200000 -1054 1062 0.866667 -1055 1063 3.666667 -1056 1064 -0.600000 -1057 1061 0.733333 -1057 1062 0.466667 -1057 1063 -0.333333 -1057 1064 -0.600000 -1057 1185 0.466667 -1058 1061 0.866667 -1058 1062 -0.066667 -1058 1063 -0.333333 -1058 1064 -0.200000 -1058 1186 0.200000 -1059 1061 -0.333333 -1059 1062 -0.866667 -1059 1063 -0.466667 -1059 1064 0.200000 -1059 1187 -1.000000 -1060 1061 -0.466667 -1060 1062 0.066667 -1060 1063 -0.333333 -1060 1064 0.066667 -1060 1188 -1.000000 -1061 1069 -0.066667 -1062 1070 -0.200000 -1063 1071 1.000000 -1064 1072 0.066667 -1065 1069 0.333333 -1065 1070 0.333333 -1065 1071 -0.733333 -1065 1072 -0.733333 -1065 1193 0.733333 -1066 1069 -0.733333 -1066 1070 -0.733333 -1066 1071 0.333333 -1066 1072 -0.466667 -1066 1194 -0.466667 -1067 1069 0.733333 -1067 1070 1.000000 -1067 1071 1.666667 -1067 1072 0.733333 -1067 1195 -0.200000 -1068 1069 -0.466667 -1068 1070 0.466667 -1068 1071 0.200000 -1068 1072 0.466667 -1068 1196 0.600000 -1069 1077 -0.866667 -1070 1078 -0.066667 -1071 1079 -0.200000 -1072 1080 -0.333333 -1073 1077 -4.333333 -1073 1078 3.666667 -1073 1079 2.333333 -1073 1080 0.333333 -1073 1201 -1.000000 -1074 1077 0.600000 -1074 1078 -1.666667 -1074 1079 -0.333333 -1074 1080 -0.066667 -1074 1202 -0.466667 -1075 1077 0.333333 -1075 1078 -1.000000 -1075 1079 -0.866667 -1075 1080 -0.200000 -1075 1203 -0.066667 -1076 1077 0.866667 -1076 1078 -0.600000 -1076 1079 -0.333333 -1076 1080 -1.000000 -1076 1204 0.466667 -1077 1085 -0.333333 -1078 1086 -0.333333 -1079 1087 1.000000 -1080 1088 -0.066667 -1081 1085 0.866667 -1081 1086 -0.733333 -1081 1087 0.866667 -1081 1088 -0.733333 -1081 1209 0.466667 -1082 1085 -0.200000 -1082 1086 -0.733333 -1082 1087 0.200000 -1082 1088 0.866667 -1082 1210 0.333333 -1083 1085 -1.000000 -1083 1086 -0.866667 -1083 1087 -0.466667 -1083 1088 0.600000 -1083 1211 0.733333 -1084 1085 0.200000 -1084 1086 1.000000 -1084 1087 0.733333 -1084 1088 0.333333 -1084 1212 -1.000000 -1085 1093 -0.733333 -1086 1094 -0.866667 -1087 1095 -0.600000 -1088 1096 0.333333 -1089 1093 -0.733333 -1089 1094 -0.600000 -1089 1095 1.000000 -1089 1096 2.333333 -1089 1217 1.000000 -1090 1093 0.200000 -1090 1094 -0.066667 -1090 1095 -0.600000 -1090 1096 -0.600000 -1090 1218 -0.600000 -1091 1093 -0.200000 -1091 1094 0.200000 -1091 1095 0.866667 -1091 1096 0.200000 -1091 1219 1.000000 -1092 1093 0.066667 -1092 1094 0.600000 -1092 1095 1.000000 -1092 1096 -0.066667 -1092 1220 0.466667 -1093 1101 0.733333 -1094 1102 0.733333 -1095 1103 -0.466667 -1096 1104 -4.333333 -1097 1101 -0.466667 -1097 1102 -1.000000 -1097 1103 -1.000000 -1097 1104 0.466667 -1097 1225 0.466667 -1098 1101 0.200000 -1098 1102 2.333333 -1098 1103 3.000000 -1098 1104 0.333333 -1098 1226 4.333333 -1099 1101 0.466667 -1099 1102 0.200000 -1099 1103 -0.333333 -1099 1104 0.066667 -1099 1227 0.466667 -1100 1101 -0.733333 -1100 1102 -0.066667 -1100 1103 -0.333333 -1100 1104 1.000000 -1100 1228 0.466667 -1101 1109 0.333333 -1102 1110 -0.866667 -1103 1111 -0.466667 -1104 1112 2.333333 -1105 1109 1.666667 -1105 1110 0.066667 -1105 1111 1.000000 -1105 1112 0.066667 -1105 1233 0.333333 -1106 1109 0.333333 -1106 1110 0.200000 -1106 1111 3.000000 -1106 1112 1.666667 -1106 1234 -1.666667 -1107 1109 -1.000000 -1107 1110 0.866667 -1107 1111 -0.733333 -1107 1112 0.200000 -1107 1235 0.600000 -1108 1109 -0.333333 -1108 1110 -1.000000 -1108 1111 0.866667 -1108 1112 -1.666667 -1108 1236 -1.000000 -1109 1117 0.200000 -1110 1118 0.600000 -1111 1119 -0.733333 -1112 1120 0.066667 -1113 1117 0.466667 -1113 1118 0.466667 -1113 1119 -0.333333 -1113 1120 0.200000 -1113 1241 -0.200000 -1114 1117 1.000000 -1114 1118 -0.733333 -1114 1119 -0.866667 -1114 1120 -0.866667 -1114 1242 0.866667 -1115 1117 0.200000 -1115 1118 1.000000 -1115 1119 0.733333 -1115 1120 -0.333333 -1115 1243 0.733333 -1116 1117 0.866667 -1116 1118 -0.866667 -1116 1119 1.000000 -1116 1120 -0.066667 -1116 1244 -0.466667 -1117 1125 -1.000000 -1118 1126 0.200000 -1119 1127 0.200000 -1120 1128 0.066667 -1121 1125 0.733333 -1121 1126 -0.200000 -1121 1127 -0.066667 -1121 1128 0.200000 -1121 1249 0.466667 -1122 1125 0.866667 -1122 1126 -0.600000 -1122 1127 1.000000 -1122 1128 0.733333 -1122 1250 -0.866667 -1123 1125 -0.466667 -1123 1126 1.000000 -1123 1127 0.866667 -1123 1128 -0.466667 -1123 1251 0.733333 -1124 1125 0.733333 -1124 1126 0.466667 -1124 1127 0.600000 -1124 1128 0.200000 -1124 1252 0.333333 -1125 1133 -0.333333 -1126 1134 0.333333 -1127 1135 1.000000 -1128 1136 -0.466667 -1129 1133 -0.066667 -1129 1134 0.866667 -1129 1135 0.066667 -1129 1136 0.466667 -1129 1257 -0.733333 -1130 1133 -0.200000 -1130 1134 1.000000 -1130 1135 0.200000 -1130 1136 0.333333 -1130 1258 1.000000 -1131 1133 0.200000 -1131 1134 0.066667 -1131 1135 -0.866667 -1131 1136 -0.733333 -1131 1259 0.733333 -1132 1133 0.600000 -1132 1134 -4.333333 -1132 1135 0.600000 -1132 1136 0.066667 -1132 1260 -4.333333 -1133 1141 -0.733333 -1134 1142 0.600000 -1135 1143 1.000000 -1136 1144 0.333333 -1137 1141 0.200000 -1137 1142 0.600000 -1137 1143 0.600000 -1137 1144 0.200000 -1137 1265 -0.733333 -1138 1141 -0.200000 -1138 1142 -0.866667 -1138 1143 0.466667 -1138 1144 -0.600000 -1138 1266 -0.733333 -1139 1141 0.733333 -1139 1142 1.000000 -1139 1143 1.000000 -1139 1144 -0.733333 -1139 1267 -1.000000 -1140 1141 -1.000000 -1140 1142 -0.200000 -1140 1143 -0.200000 -1140 1144 -0.066667 -1140 1268 -0.333333 -1141 1149 0.866667 -1142 1150 0.866667 -1143 1151 1.000000 -1144 1152 0.866667 -1145 1149 0.733333 -1145 1150 -1.000000 -1145 1151 -0.066667 -1145 1152 -0.600000 -1145 1273 -0.600000 -1146 1149 -0.733333 -1146 1150 -0.466667 -1146 1151 1.000000 -1146 1152 -0.466667 -1146 1274 -0.866667 -1147 1149 1.000000 -1147 1150 -0.200000 -1147 1151 1.000000 -1147 1152 1.000000 -1147 1275 0.333333 -1148 1149 0.200000 -1148 1150 -0.600000 -1148 1151 0.866667 -1148 1152 -0.866667 -1148 1276 0.600000 -1153 1157 0.866667 -1153 1158 0.600000 -1153 1159 0.200000 -1153 1160 0.466667 -1153 1281 -0.333333 -1154 1157 -0.866667 -1154 1158 0.733333 -1154 1159 -2.333333 -1154 1160 1.000000 -1154 1282 2.333333 -1155 1157 1.000000 -1155 1158 -1.000000 -1155 1159 5.000000 -1155 1160 0.333333 -1155 1283 -2.333333 -1156 1157 -0.733333 -1156 1158 0.333333 -1156 1159 0.600000 -1156 1160 -0.200000 -1156 1284 0.600000 -1157 1165 0.333333 -1158 1166 0.466667 -1159 1167 0.866667 -1160 1168 -0.733333 -1161 1165 0.466667 -1161 1166 -0.200000 -1161 1167 0.866667 -1161 1168 1.000000 -1161 1289 -0.600000 -1162 1165 -0.200000 -1162 1166 -1.000000 -1162 1167 -1.000000 -1162 1168 -0.733333 -1162 1290 1.000000 -1163 1165 -0.866667 -1163 1166 -0.200000 -1163 1167 -0.733333 -1163 1168 -0.866667 -1163 1291 5.000000 -1164 1165 0.066667 -1164 1166 0.066667 -1164 1167 -0.733333 -1164 1168 1.000000 -1164 1292 0.200000 -1165 1173 0.333333 -1166 1174 -2.333333 -1167 1175 0.466667 -1168 1176 0.600000 -1169 1173 0.066667 -1169 1174 -0.466667 -1169 1175 0.600000 -1169 1176 5.000000 -1169 1297 -0.866667 -1170 1173 0.600000 -1170 1174 -5.000000 -1170 1175 0.733333 -1170 1176 3.666667 -1170 1298 4.333333 -1171 1173 -1.000000 -1171 1174 0.466667 -1171 1175 1.000000 -1171 1176 -0.200000 -1171 1299 0.866667 -1172 1173 0.066667 -1172 1174 0.333333 -1172 1175 0.333333 -1172 1176 3.000000 -1172 1300 1.000000 -1173 1181 -0.200000 -1174 1182 3.000000 -1175 1183 0.200000 -1176 1184 -4.333333 -1177 1181 0.733333 -1177 1182 -0.200000 -1177 1183 1.000000 -1177 1184 -0.600000 -1177 1305 0.866667 -1178 1181 -0.733333 -1178 1182 0.333333 -1178 1183 0.600000 -1178 1184 -0.333333 -1178 1306 0.733333 -1179 1181 0.066667 -1179 1182 -0.066667 -1179 1183 0.466667 -1179 1184 0.200000 -1179 1307 -0.066667 -1180 1181 0.466667 -1180 1182 -0.600000 -1180 1183 -0.333333 -1180 1184 -0.600000 -1180 1308 -0.200000 -1181 1189 -0.066667 -1182 1190 -0.333333 -1183 1191 0.200000 -1184 1192 1.000000 -1185 1189 0.066667 -1185 1190 0.733333 -1185 1191 -0.333333 -1185 1192 -1.000000 -1185 1313 1.000000 -1186 1189 -0.600000 -1186 1190 -0.200000 -1186 1191 -0.200000 -1186 1192 0.733333 -1186 1314 0.866667 -1187 1189 -1.000000 -1187 1190 0.200000 -1187 1191 0.600000 -1187 1192 0.066667 -1187 1315 1.000000 -1188 1189 -1.000000 -1188 1190 -0.866667 -1188 1191 -0.600000 -1188 1192 -3.000000 -1188 1316 0.866667 -1189 1197 0.600000 -1190 1198 0.200000 -1191 1199 -0.733333 -1192 1200 -0.866667 -1193 1197 -0.466667 -1193 1198 -1.000000 -1193 1199 0.466667 -1193 1200 0.866667 -1193 1321 0.066667 -1194 1197 -1.000000 -1194 1198 0.466667 -1194 1199 0.466667 -1194 1200 -0.466667 -1194 1322 -0.866667 -1195 1197 0.466667 -1195 1198 0.866667 -1195 1199 -0.733333 -1195 1200 -0.866667 -1195 1323 0.333333 -1196 1197 -0.333333 -1196 1198 -0.733333 -1196 1199 -0.333333 -1196 1200 0.066667 -1196 1324 -0.066667 -1197 1205 0.066667 -1198 1206 0.866667 -1199 1207 0.066667 -1200 1208 0.200000 -1201 1205 -2.333333 -1201 1206 -1.000000 -1201 1207 -1.000000 -1201 1208 -0.200000 -1201 1329 -0.733333 -1202 1205 0.066667 -1202 1206 -0.333333 -1202 1207 -0.466667 -1202 1208 -0.733333 -1202 1330 0.600000 -1203 1205 4.333333 -1203 1206 0.200000 -1203 1207 -0.333333 -1203 1208 1.000000 -1203 1331 -0.066667 -1204 1205 1.000000 -1204 1206 -0.333333 -1204 1207 0.066667 -1204 1208 -0.733333 -1204 1332 1.000000 -1205 1213 0.733333 -1206 1214 -1.000000 -1207 1215 -0.200000 -1208 1216 0.333333 -1209 1213 -0.866667 -1209 1214 -1.666667 -1209 1215 -0.600000 -1209 1216 0.333333 -1209 1337 1.666667 -1210 1213 -0.333333 -1210 1214 0.200000 -1210 1215 -0.733333 -1210 1216 0.600000 -1210 1338 -0.066667 -1211 1213 -0.466667 -1211 1214 1.000000 -1211 1215 0.733333 -1211 1216 -0.066667 -1211 1339 -0.866667 -1212 1213 -1.000000 -1212 1214 -2.333333 -1212 1215 0.466667 -1212 1216 0.600000 -1212 1340 0.866667 -1213 1221 1.000000 -1214 1222 -0.333333 -1215 1223 0.600000 -1216 1224 0.466667 -1217 1221 -0.333333 -1217 1222 0.066667 -1217 1223 1.000000 -1217 1224 0.333333 -1217 1345 0.733333 -1218 1221 -1.000000 -1218 1222 0.466667 -1218 1223 0.866667 -1218 1224 0.733333 -1218 1346 0.200000 -1219 1221 -1.000000 -1219 1222 -1.000000 -1219 1223 0.866667 -1219 1224 -1.000000 -1219 1347 0.066667 -1220 1221 -0.066667 -1220 1222 0.066667 -1220 1223 0.466667 -1220 1224 1.000000 -1220 1348 0.466667 -1221 1229 -0.866667 -1222 1230 -1.000000 -1223 1231 0.866667 -1224 1232 0.066667 -1225 1229 -0.733333 -1225 1230 0.200000 -1225 1231 -0.733333 -1225 1232 -0.733333 -1225 1353 -0.600000 -1226 1229 0.466667 -1226 1230 -1.000000 -1226 1231 -0.200000 -1226 1232 -0.600000 -1226 1354 0.200000 -1227 1229 1.000000 -1227 1230 -0.733333 -1227 1231 0.466667 -1227 1232 0.466667 -1227 1355 0.066667 -1228 1229 0.066667 -1228 1230 -0.333333 -1228 1231 1.000000 -1228 1232 0.600000 -1228 1356 -1.000000 -1229 1237 1.000000 -1230 1238 -1.000000 -1231 1239 0.600000 -1232 1240 0.866667 -1233 1237 0.600000 -1233 1238 -0.600000 -1233 1239 -0.333333 -1233 1240 0.466667 -1233 1361 0.466667 -1234 1237 -0.066667 -1234 1238 1.000000 -1234 1239 -0.733333 -1234 1240 -1.000000 -1234 1362 -0.466667 -1235 1237 -0.733333 -1235 1238 -0.466667 -1235 1239 1.000000 -1235 1240 -0.733333 -1235 1363 0.466667 -1236 1237 0.600000 -1236 1238 -0.866667 -1236 1239 -1.000000 -1236 1240 -0.466667 -1236 1364 0.466667 -1237 1245 0.866667 -1238 1246 0.866667 -1239 1247 0.733333 -1240 1248 -1.000000 -1241 1245 0.066667 -1241 1246 0.066667 -1241 1247 0.066667 -1241 1248 0.200000 -1241 1369 -0.866667 -1242 1245 -0.733333 -1242 1246 0.733333 -1242 1247 1.000000 -1242 1248 -1.000000 -1242 1370 0.466667 -1243 1245 0.600000 -1243 1246 0.333333 -1243 1247 0.200000 -1243 1248 -0.466667 -1243 1371 -0.333333 -1244 1245 0.200000 -1244 1246 -0.600000 -1244 1247 1.000000 -1244 1248 0.866667 -1244 1372 0.200000 -1245 1253 -0.200000 -1246 1254 0.066667 -1247 1255 0.866667 -1248 1256 -0.466667 -1249 1253 0.733333 -1249 1254 0.866667 -1249 1255 -1.000000 -1249 1256 0.066667 -1249 1377 0.066667 -1250 1253 1.000000 -1250 1254 -0.600000 -1250 1255 0.466667 -1250 1256 -0.066667 -1250 1378 -1.000000 -1251 1253 -1.000000 -1251 1254 1.000000 -1251 1255 -0.066667 -1251 1256 -0.600000 -1251 1379 -0.333333 -1252 1253 -0.733333 -1252 1254 0.866667 -1252 1255 -1.000000 -1252 1256 0.333333 -1252 1380 -0.333333 -1253 1261 0.866667 -1254 1262 -0.733333 -1255 1263 0.066667 -1256 1264 1.000000 -1257 1261 -0.866667 -1257 1262 0.466667 -1257 1263 -0.333333 -1257 1264 -0.066667 -1257 1385 0.466667 -1258 1261 0.333333 -1258 1262 -4.333333 -1258 1263 -0.333333 -1258 1264 -0.600000 -1258 1386 -0.600000 -1259 1261 0.333333 -1259 1262 -1.000000 -1259 1263 0.333333 -1259 1264 -0.733333 -1259 1387 -0.733333 -1260 1261 0.333333 -1260 1262 -0.466667 -1260 1263 0.600000 -1260 1264 1.000000 -1260 1388 0.066667 -1261 1269 -0.333333 -1262 1270 1.000000 -1263 1271 -0.333333 -1264 1272 -0.200000 -1265 1269 0.066667 -1265 1270 0.866667 -1265 1271 0.200000 -1265 1272 0.333333 -1265 1393 0.200000 -1266 1269 0.733333 -1266 1270 -0.200000 -1266 1271 0.600000 -1266 1272 -0.733333 -1266 1394 -0.466667 -1267 1269 0.733333 -1267 1270 0.866667 -1267 1271 -1.000000 -1267 1272 -0.600000 -1267 1395 1.000000 -1268 1269 -0.866667 -1268 1270 0.466667 -1268 1271 -0.066667 -1268 1272 0.733333 -1268 1396 0.066667 -1269 1277 0.200000 -1270 1278 -0.466667 -1271 1279 -0.333333 -1272 1280 0.333333 -1273 1277 -0.600000 -1273 1278 0.066667 -1273 1279 -0.333333 -1273 1280 -0.600000 -1273 1401 1.000000 -1274 1277 -0.466667 -1274 1278 0.466667 -1274 1279 0.066667 -1274 1280 1.000000 -1274 1402 -0.066667 -1275 1277 -0.733333 -1275 1278 0.600000 -1275 1279 -0.600000 -1275 1280 -0.866667 -1275 1403 0.600000 -1276 1277 -1.000000 -1276 1278 1.000000 -1276 1279 -0.866667 -1276 1280 -0.466667 -1276 1404 0.333333 -1281 1285 1.666667 -1281 1286 -1.666667 -1281 1287 5.000000 -1281 1288 0.866667 -1281 1409 -0.066667 -1282 1285 -0.466667 -1282 1286 -0.333333 -1282 1287 -1.000000 -1282 1288 0.333333 -1282 1410 -0.200000 -1283 1285 0.466667 -1283 1286 -3.666667 -1283 1287 -0.333333 -1283 1288 0.066667 -1283 1411 5.000000 -1284 1285 -0.333333 -1284 1286 -0.066667 -1284 1287 0.600000 -1284 1288 0.333333 -1284 1412 -5.000000 -1285 1293 0.333333 -1286 1294 -5.000000 -1287 1295 -3.666667 -1288 1296 -1.000000 -1289 1293 -0.866667 -1289 1294 0.200000 -1289 1295 4.333333 -1289 1296 0.866667 -1289 1417 2.333333 -1290 1293 -0.333333 -1290 1294 -1.000000 -1290 1295 0.066667 -1290 1296 0.466667 -1290 1418 -0.466667 -1291 1293 -0.333333 -1291 1294 0.733333 -1291 1295 4.333333 -1291 1296 -0.733333 -1291 1419 3.666667 -1292 1293 0.200000 -1292 1294 0.066667 -1292 1295 -1.000000 -1292 1296 -0.200000 -1292 1420 0.200000 -1293 1301 -0.466667 -1294 1302 0.866667 -1295 1303 5.000000 -1296 1304 -0.333333 -1297 1301 0.200000 -1297 1302 1.000000 -1297 1303 3.666667 -1297 1304 0.333333 -1297 1425 1.000000 -1298 1301 -2.333333 -1298 1302 0.200000 -1298 1303 3.000000 -1298 1304 -0.733333 -1298 1426 -0.600000 -1299 1301 -0.866667 -1299 1302 -1.000000 -1299 1303 5.000000 -1299 1304 0.733333 -1299 1427 0.866667 -1300 1301 -0.866667 -1300 1302 1.000000 -1300 1303 0.066667 -1300 1304 -0.333333 -1300 1428 0.600000 -1301 1309 -0.333333 -1302 1310 0.600000 -1303 1311 -0.333333 -1304 1312 4.333333 -1305 1309 0.600000 -1305 1310 -0.733333 -1305 1311 -0.333333 -1305 1312 -0.066667 -1305 1433 -0.333333 -1306 1309 -0.600000 -1306 1310 -0.333333 -1306 1311 0.333333 -1306 1312 -0.333333 -1306 1434 -0.066667 -1307 1309 0.200000 -1307 1310 0.733333 -1307 1311 0.466667 -1307 1312 0.600000 -1307 1435 -0.466667 -1308 1309 -0.600000 -1308 1310 -0.333333 -1308 1311 -0.333333 -1308 1312 0.866667 -1308 1436 -0.866667 -1309 1317 -0.866667 -1310 1318 0.733333 -1311 1319 -0.733333 -1312 1320 0.600000 -1313 1317 0.600000 -1313 1318 0.200000 -1313 1319 -0.466667 -1313 1320 -1.000000 -1313 1441 -0.866667 -1314 1317 -0.066667 -1314 1318 0.600000 -1314 1319 0.733333 -1314 1320 0.600000 -1314 1442 -1.000000 -1315 1317 0.600000 -1315 1318 0.733333 -1315 1319 -1.000000 -1315 1320 1.000000 -1315 1443 0.333333 -1316 1317 -0.333333 -1316 1318 -0.600000 -1316 1319 0.466667 -1316 1320 -0.733333 -1316 1444 -1.000000 -1317 1325 -0.466667 -1318 1326 -0.333333 -1319 1327 -0.333333 -1320 1328 -0.333333 -1321 1325 -0.066667 -1321 1326 -0.600000 -1321 1327 0.200000 -1321 1328 -0.333333 -1321 1449 -0.866667 -1322 1325 -1.000000 -1322 1326 0.333333 -1322 1327 0.466667 -1322 1328 -0.600000 -1322 1450 -1.000000 -1323 1325 0.600000 -1323 1326 0.733333 -1323 1327 -0.466667 -1323 1328 -0.333333 -1323 1451 -1.000000 -1324 1325 0.600000 -1324 1326 1.000000 -1324 1327 0.066667 -1324 1328 -0.333333 -1324 1452 -0.200000 -1325 1333 1.000000 -1326 1334 -0.600000 -1327 1335 0.866667 -1328 1336 0.066667 -1329 1333 0.466667 -1329 1334 3.666667 -1329 1335 -1.000000 -1329 1336 -0.600000 -1329 1457 -1.000000 -1330 1333 -1.000000 -1330 1334 0.066667 -1330 1335 -1.000000 -1330 1336 0.866667 -1330 1458 2.333333 -1331 1333 0.333333 -1331 1334 0.066667 -1331 1335 0.066667 -1331 1336 -0.066667 -1331 1459 0.466667 -1332 1333 0.600000 -1332 1334 -0.733333 -1332 1335 0.733333 -1332 1336 -1.000000 -1332 1460 -0.066667 -1333 1341 -0.333333 -1334 1342 0.733333 -1335 1343 -0.066667 -1336 1344 0.600000 -1337 1341 3.666667 -1337 1342 -0.066667 -1337 1343 1.000000 -1337 1344 0.066667 -1337 1465 0.333333 -1338 1341 5.000000 -1338 1342 -0.200000 -1338 1343 -0.466667 -1338 1344 0.466667 -1338 1466 -0.066667 -1339 1341 0.600000 -1339 1342 -1.000000 -1339 1343 0.333333 -1339 1344 0.866667 -1339 1467 -0.333333 -1340 1341 0.866667 -1340 1342 -0.200000 -1340 1343 0.066667 -1340 1344 -0.066667 -1340 1468 -0.466667 -1341 1349 -1.000000 -1342 1350 -0.466667 -1343 1351 -0.733333 -1344 1352 0.066667 -1345 1349 1.000000 -1345 1350 -0.466667 -1345 1351 -0.866667 -1345 1352 0.600000 -1345 1473 -0.733333 -1346 1349 0.600000 -1346 1350 0.466667 -1346 1351 0.200000 -1346 1352 -0.066667 -1346 1474 -1.000000 -1347 1349 0.733333 -1347 1350 0.200000 -1347 1351 -0.333333 -1347 1352 -0.600000 -1347 1475 -0.466667 -1348 1349 0.066667 -1348 1350 -0.333333 -1348 1351 -0.733333 -1348 1352 -0.600000 -1348 1476 -0.866667 -1349 1357 1.000000 -1350 1358 -0.066667 -1351 1359 0.333333 -1352 1360 -0.866667 -1353 1357 -0.866667 -1353 1358 0.466667 -1353 1359 -0.200000 -1353 1360 -0.333333 -1353 1481 -0.733333 -1354 1357 -0.866667 -1354 1358 -0.466667 -1354 1359 -0.866667 -1354 1360 -0.466667 -1354 1482 -0.066667 -1355 1357 -0.600000 -1355 1358 -0.600000 -1355 1359 1.000000 -1355 1360 -0.866667 -1355 1483 -0.733333 -1356 1357 -0.466667 -1356 1358 -0.733333 -1356 1359 -0.733333 -1356 1360 0.600000 -1356 1484 -0.200000 -1357 1365 0.466667 -1358 1366 -0.733333 -1359 1367 0.866667 -1360 1368 -0.733333 -1361 1365 0.066667 -1361 1366 -0.866667 -1361 1367 -1.666667 -1361 1368 -2.333333 -1361 1489 -1.666667 -1362 1365 0.600000 -1362 1366 -1.666667 -1362 1367 -0.333333 -1362 1368 0.733333 -1362 1490 -0.866667 -1363 1365 -0.200000 -1363 1366 -0.200000 -1363 1367 0.200000 -1363 1368 -0.333333 -1363 1491 0.466667 -1364 1365 -0.866667 -1364 1366 -1.000000 -1364 1367 0.600000 -1364 1368 5.000000 -1364 1492 0.466667 -1365 1373 0.333333 -1366 1374 0.333333 -1367 1375 1.000000 -1368 1376 -2.333333 -1369 1373 -0.733333 -1369 1374 -0.333333 -1369 1375 0.866667 -1369 1376 0.200000 -1369 1497 0.066667 -1370 1373 -1.000000 -1370 1374 -0.333333 -1370 1375 -0.333333 -1370 1376 -0.200000 -1370 1498 -0.866667 -1371 1373 0.733333 -1371 1374 0.200000 -1371 1375 -0.066667 -1371 1376 0.733333 -1371 1499 -0.200000 -1372 1373 0.200000 -1372 1374 -0.066667 -1372 1375 -0.866667 -1372 1376 -0.333333 -1372 1500 0.333333 -1373 1381 -0.200000 -1374 1382 0.866667 -1375 1383 -0.866667 -1376 1384 -1.000000 -1377 1381 -0.466667 -1377 1382 0.466667 -1377 1383 0.200000 -1377 1384 0.066667 -1377 1505 0.200000 -1378 1381 -0.600000 -1378 1382 -0.866667 -1378 1383 -1.000000 -1378 1384 -0.066667 -1378 1506 1.000000 -1379 1381 -1.000000 -1379 1382 -0.066667 -1379 1383 -0.466667 -1379 1384 0.333333 -1379 1507 -0.200000 -1380 1381 -0.866667 -1380 1382 0.600000 -1380 1383 -0.733333 -1380 1384 0.066667 -1380 1508 0.200000 -1381 1389 -0.733333 -1382 1390 0.600000 -1383 1391 0.333333 -1384 1392 0.466667 -1385 1389 0.200000 -1385 1390 0.200000 -1385 1391 0.200000 -1385 1392 -0.733333 -1385 1513 -0.600000 -1386 1389 0.866667 -1386 1390 -0.733333 -1386 1391 0.733333 -1386 1392 -0.333333 -1386 1514 -0.200000 -1387 1389 -0.066667 -1387 1390 -0.333333 -1387 1391 0.866667 -1387 1392 0.466667 -1387 1515 -0.600000 -1388 1389 1.000000 -1388 1390 -0.066667 -1388 1391 0.733333 -1388 1392 0.733333 -1388 1516 -0.066667 -1389 1397 -0.200000 -1390 1398 -0.600000 -1391 1399 -1.666667 -1392 1400 -0.733333 -1393 1397 -0.466667 -1393 1398 0.333333 -1393 1399 0.200000 -1393 1400 0.200000 -1393 1521 -0.066667 -1394 1397 0.066667 -1394 1398 -0.600000 -1394 1399 0.600000 -1394 1400 -0.066667 -1394 1522 0.733333 -1395 1397 0.333333 -1395 1398 0.200000 -1395 1399 0.333333 -1395 1400 -0.200000 -1395 1523 -0.600000 -1396 1397 0.866667 -1396 1398 0.733333 -1396 1399 -0.066667 -1396 1400 0.733333 -1396 1524 -0.200000 -1397 1405 -0.333333 -1398 1406 -0.200000 -1399 1407 0.066667 -1400 1408 0.466667 -1401 1405 0.333333 -1401 1406 -0.066667 -1401 1407 0.733333 -1401 1408 0.866667 -1401 1529 0.200000 -1402 1405 -0.333333 -1402 1406 -1.000000 -1402 1407 0.066667 -1402 1408 0.333333 -1402 1530 -0.733333 -1403 1405 0.200000 -1403 1406 -0.733333 -1403 1407 -0.200000 -1403 1408 0.200000 -1403 1531 -0.200000 -1404 1405 0.066667 -1404 1406 -0.600000 -1404 1407 0.200000 -1404 1408 4.333333 -1404 1532 -0.466667 -1409 1413 -0.333333 -1409 1414 -3.000000 -1409 1415 1.666667 -1409 1416 0.866667 -1409 1537 0.733333 -1410 1413 -1.666667 -1410 1414 5.000000 -1410 1415 -0.200000 -1410 1416 1.000000 -1410 1538 2.333333 -1411 1413 0.866667 -1411 1414 -0.600000 -1411 1415 -1.000000 -1411 1416 5.000000 -1411 1539 -0.066667 -1412 1413 -1.000000 -1412 1414 0.066667 -1412 1415 -1.000000 -1412 1416 -4.333333 -1412 1540 1.000000 -1413 1421 -1.000000 -1414 1422 0.600000 -1415 1423 -5.000000 -1416 1424 3.000000 -1417 1421 -0.333333 -1417 1422 -5.000000 -1417 1423 1.000000 -1417 1424 -0.333333 -1417 1545 0.333333 -1418 1421 0.866667 -1418 1422 -0.866667 -1418 1423 1.000000 -1418 1424 0.066667 -1418 1546 0.466667 -1419 1421 -0.066667 -1419 1422 0.466667 -1419 1423 -3.000000 -1419 1424 0.733333 -1419 1547 0.333333 -1420 1421 3.666667 -1420 1422 0.866667 -1420 1423 -1.000000 -1420 1424 -3.666667 -1420 1548 3.666667 -1421 1429 1.000000 -1422 1430 -0.600000 -1423 1431 0.066667 -1424 1432 5.000000 -1425 1429 0.200000 -1425 1430 0.200000 -1425 1431 -0.200000 -1425 1432 0.600000 -1425 1553 -1.000000 -1426 1429 -1.000000 -1426 1430 0.200000 -1426 1431 -0.200000 -1426 1432 -0.200000 -1426 1554 -0.466667 -1427 1429 -1.000000 -1427 1430 -0.466667 -1427 1431 0.866667 -1427 1432 0.333333 -1427 1555 0.466667 -1428 1429 0.333333 -1428 1430 1.000000 -1428 1431 0.333333 -1428 1432 0.733333 -1428 1556 0.866667 -1429 1437 0.866667 -1430 1438 0.600000 -1431 1439 0.600000 -1432 1440 1.000000 -1433 1437 1.000000 -1433 1438 0.200000 -1433 1439 0.066667 -1433 1440 -0.733333 -1433 1561 0.600000 -1434 1437 0.066667 -1434 1438 -0.600000 -1434 1439 -0.866667 -1434 1440 0.600000 -1434 1562 -1.000000 -1435 1437 0.466667 -1435 1438 -0.200000 -1435 1439 -0.866667 -1435 1440 0.466667 -1435 1563 0.866667 -1436 1437 1.000000 -1436 1438 -0.066667 -1436 1439 0.200000 -1436 1440 -0.066667 -1436 1564 -0.066667 -1437 1445 -0.200000 -1438 1446 -0.466667 -1439 1447 0.866667 -1440 1448 -0.066667 -1441 1445 -0.866667 -1441 1446 -0.200000 -1441 1447 0.200000 -1441 1448 0.866667 -1441 1569 0.866667 -1442 1445 -1.000000 -1442 1446 -0.733333 -1442 1447 0.333333 -1442 1448 -0.733333 -1442 1570 0.333333 -1443 1445 0.466667 -1443 1446 1.000000 -1443 1447 -0.066667 -1443 1448 -0.466667 -1443 1571 -0.333333 -1444 1445 0.600000 -1444 1446 -0.733333 -1444 1447 -0.200000 -1444 1448 0.733333 -1444 1572 0.200000 -1445 1453 -0.866667 -1446 1454 -0.866667 -1447 1455 0.866667 -1448 1456 0.466667 -1449 1453 0.466667 -1449 1454 -0.066667 -1449 1455 0.600000 -1449 1456 0.600000 -1449 1577 0.866667 -1450 1453 0.066667 -1450 1454 -0.200000 -1450 1455 -1.000000 -1450 1456 0.866667 -1450 1578 3.000000 -1451 1453 5.000000 -1451 1454 -0.200000 -1451 1455 0.066667 -1451 1456 0.866667 -1451 1579 -0.200000 -1452 1453 -1.000000 -1452 1454 -0.600000 -1452 1455 -0.200000 -1452 1456 -0.600000 -1452 1580 -0.066667 -1453 1461 1.000000 -1454 1462 -0.733333 -1455 1463 0.600000 -1456 1464 1.000000 -1457 1461 -2.333333 -1457 1462 -0.066667 -1457 1463 -1.000000 -1457 1464 -1.000000 -1457 1585 -0.333333 -1458 1461 1.000000 -1458 1462 0.333333 -1458 1463 -4.333333 -1458 1464 5.000000 -1458 1586 -1.666667 -1459 1461 -0.066667 -1459 1462 -0.333333 -1459 1463 0.333333 -1459 1464 -0.066667 -1459 1587 -0.066667 -1460 1461 4.333333 -1460 1462 0.866667 -1460 1463 0.066667 -1460 1464 -0.200000 -1460 1588 0.466667 -1461 1469 0.600000 -1462 1470 0.600000 -1463 1471 1.666667 -1464 1472 0.866667 -1465 1469 -0.066667 -1465 1470 0.200000 -1465 1471 0.333333 -1465 1472 1.000000 -1465 1593 0.200000 -1466 1469 0.466667 -1466 1470 -0.066667 -1466 1471 -0.866667 -1466 1472 0.600000 -1466 1594 0.066667 -1467 1469 -0.066667 -1467 1470 0.466667 -1467 1471 -1.000000 -1467 1472 -1.000000 -1467 1595 -0.200000 -1468 1469 -0.333333 -1468 1470 -1.000000 -1468 1471 -0.466667 -1468 1472 0.466667 -1468 1596 0.066667 -1469 1477 -0.200000 -1470 1478 0.733333 -1471 1479 -1.000000 -1472 1480 -0.600000 -1473 1477 -1.000000 -1473 1478 -2.333333 -1473 1479 3.666667 -1473 1480 -0.866667 -1473 1601 -0.466667 -1474 1477 0.866667 -1474 1478 -0.600000 -1474 1479 0.866667 -1474 1480 0.066667 -1474 1602 -1.000000 -1475 1477 0.733333 -1475 1478 -0.600000 -1475 1479 -3.000000 -1475 1480 0.466667 -1475 1603 -0.733333 -1476 1477 1.000000 -1476 1478 1.000000 -1476 1479 0.733333 -1476 1480 0.600000 -1476 1604 1.000000 -1477 1485 1.000000 -1478 1486 0.866667 -1479 1487 -0.733333 -1480 1488 -0.866667 -1481 1485 0.866667 -1481 1486 0.733333 -1481 1487 -1.000000 -1481 1488 0.733333 -1481 1609 -0.866667 -1482 1485 0.733333 -1482 1486 -0.733333 -1482 1487 0.733333 -1482 1488 1.000000 -1482 1610 -1.000000 -1483 1485 0.733333 -1483 1486 0.466667 -1483 1487 -0.600000 -1483 1488 -0.200000 -1483 1611 0.733333 -1484 1485 0.066667 -1484 1486 -0.333333 -1484 1487 -0.733333 -1484 1488 -0.066667 -1484 1612 0.066667 -1485 1493 0.200000 -1486 1494 0.733333 -1487 1495 0.466667 -1488 1496 -3.000000 -1489 1493 0.866667 -1489 1494 -0.600000 -1489 1495 -0.866667 -1489 1496 2.333333 -1489 1617 -0.333333 -1490 1493 0.733333 -1490 1494 -0.466667 -1490 1495 0.200000 -1490 1496 -0.200000 -1490 1618 0.333333 -1491 1493 -0.066667 -1491 1494 -0.733333 -1491 1495 -1.000000 -1491 1496 0.733333 -1491 1619 -0.066667 -1492 1493 -0.733333 -1492 1494 -0.733333 -1492 1495 -0.200000 -1492 1496 -0.333333 -1492 1620 -0.066667 -1493 1501 0.866667 -1494 1502 0.200000 -1495 1503 0.066667 -1496 1504 -0.733333 -1497 1501 -0.333333 -1497 1502 -1.000000 -1497 1503 -0.866667 -1497 1504 -0.200000 -1497 1625 -0.866667 -1498 1501 -0.200000 -1498 1502 1.000000 -1498 1503 0.066667 -1498 1504 -0.200000 -1498 1626 0.600000 -1499 1501 -0.466667 -1499 1502 -0.200000 -1499 1503 0.866667 -1499 1504 0.466667 -1499 1627 -0.333333 -1500 1501 -0.333333 -1500 1502 0.866667 -1500 1503 0.466667 -1500 1504 -0.466667 -1500 1628 -0.200000 -1501 1509 -0.466667 -1502 1510 -0.066667 -1503 1511 -0.066667 -1504 1512 0.466667 -1505 1509 0.866667 -1505 1510 1.000000 -1505 1511 -1.000000 -1505 1512 -0.333333 -1505 1633 -0.866667 -1506 1509 0.200000 -1506 1510 -0.733333 -1506 1511 0.066667 -1506 1512 0.466667 -1506 1634 1.000000 -1507 1509 0.733333 -1507 1510 0.733333 -1507 1511 -0.333333 -1507 1512 0.466667 -1507 1635 -0.066667 -1508 1509 -0.866667 -1508 1510 0.066667 -1508 1511 0.466667 -1508 1512 0.466667 -1508 1636 0.066667 -1509 1517 -0.066667 -1510 1518 -0.200000 -1511 1519 -0.733333 -1512 1520 0.466667 -1513 1517 -0.466667 -1513 1518 0.066667 -1513 1519 -0.733333 -1513 1520 -0.600000 -1513 1641 -0.733333 -1514 1517 -0.333333 -1514 1518 0.600000 -1514 1519 0.866667 -1514 1520 -0.200000 -1514 1642 0.866667 -1515 1517 1.000000 -1515 1518 -0.200000 -1515 1519 -0.466667 -1515 1520 -0.733333 -1515 1643 0.733333 -1516 1517 -0.866667 -1516 1518 -0.200000 -1516 1519 0.466667 -1516 1520 -0.733333 -1516 1644 -0.333333 -1517 1525 0.333333 -1518 1526 -0.866667 -1519 1527 0.733333 -1520 1528 -0.466667 -1521 1525 -0.733333 -1521 1526 0.600000 -1521 1527 0.333333 -1521 1528 0.200000 -1521 1649 1.000000 -1522 1525 -0.866667 -1522 1526 -0.866667 -1522 1527 0.466667 -1522 1528 0.200000 -1522 1650 0.866667 -1523 1525 -0.466667 -1523 1526 0.866667 -1523 1527 -0.733333 -1523 1528 0.200000 -1523 1651 -1.000000 -1524 1525 1.000000 -1524 1526 -1.000000 -1524 1527 -1.000000 -1524 1528 0.733333 -1524 1652 -1.000000 -1525 1533 -0.600000 -1526 1534 0.466667 -1527 1535 -0.466667 -1528 1536 -0.466667 -1529 1533 0.066667 -1529 1534 -0.466667 -1529 1535 0.600000 -1529 1536 -0.066667 -1529 1657 -0.733333 -1530 1533 -0.066667 -1530 1534 -0.066667 -1530 1535 -0.200000 -1530 1536 -0.733333 -1530 1658 0.866667 -1531 1533 -0.333333 -1531 1534 -0.066667 -1531 1535 0.866667 -1531 1536 -0.066667 -1531 1659 0.333333 -1532 1533 0.333333 -1532 1534 1.000000 -1532 1535 -0.600000 -1532 1536 0.333333 -1532 1660 0.200000 -1537 1541 0.733333 -1537 1542 0.333333 -1537 1543 -1.000000 -1537 1544 -5.000000 -1537 1665 -0.600000 -1538 1541 3.000000 -1538 1542 -0.466667 -1538 1543 0.466667 -1538 1544 -0.733333 -1538 1666 -0.333333 -1539 1541 0.066667 -1539 1542 -2.333333 -1539 1543 -0.466667 -1539 1544 -1.666667 -1539 1667 -0.466667 -1540 1541 0.600000 -1540 1542 -0.866667 -1540 1543 0.466667 -1540 1544 -1.000000 -1540 1668 0.066667 -1541 1549 0.466667 -1542 1550 -0.600000 -1543 1551 -0.866667 -1544 1552 -0.333333 -1545 1549 -0.866667 -1545 1550 -0.333333 -1545 1551 0.466667 -1545 1552 -0.866667 -1545 1673 -1.000000 -1546 1549 0.866667 -1546 1550 -0.600000 -1546 1551 0.200000 -1546 1552 0.333333 -1546 1674 -0.066667 -1547 1549 0.333333 -1547 1550 -0.733333 -1547 1551 0.200000 -1547 1552 -0.200000 -1547 1675 -0.333333 -1548 1549 0.466667 -1548 1550 -0.333333 -1548 1551 0.466667 -1548 1552 -5.000000 -1548 1676 -4.333333 -1549 1557 -1.000000 -1550 1558 0.600000 -1551 1559 0.600000 -1552 1560 0.600000 -1553 1557 0.333333 -1553 1558 0.066667 -1553 1559 -0.866667 -1553 1560 -0.200000 -1553 1681 0.733333 -1554 1557 0.066667 -1554 1558 -0.600000 -1554 1559 1.000000 -1554 1560 -0.200000 -1554 1682 0.600000 -1555 1557 -0.600000 -1555 1558 0.066667 -1555 1559 0.466667 -1555 1560 1.000000 -1555 1683 0.200000 -1556 1557 0.333333 -1556 1558 -0.066667 -1556 1559 -1.000000 -1556 1560 0.733333 -1556 1684 1.000000 -1557 1565 -0.600000 -1558 1566 0.333333 -1559 1567 1.000000 -1560 1568 -0.066667 -1561 1565 0.600000 -1561 1566 0.466667 -1561 1567 0.333333 -1561 1568 -0.200000 -1561 1689 0.733333 -1562 1565 0.200000 -1562 1566 -0.333333 -1562 1567 -0.333333 -1562 1568 -0.600000 -1562 1690 -0.866667 -1563 1565 -0.333333 -1563 1566 -0.466667 -1563 1567 -0.600000 -1563 1568 -0.733333 -1563 1691 3.666667 -1564 1565 -0.333333 -1564 1566 -0.333333 -1564 1567 0.866667 -1564 1568 0.866667 -1564 1692 -0.866667 -1565 1573 -0.333333 -1566 1574 -0.466667 -1567 1575 -0.466667 -1568 1576 -0.466667 -1569 1573 -0.866667 -1569 1574 0.066667 -1569 1575 -0.466667 -1569 1576 5.000000 -1569 1697 -1.000000 -1570 1573 -1.000000 -1570 1574 0.066667 -1570 1575 -0.333333 -1570 1576 -0.333333 -1570 1698 -3.000000 -1571 1573 0.333333 -1571 1574 1.666667 -1571 1575 2.333333 -1571 1576 0.600000 -1571 1699 3.666667 -1572 1573 -0.600000 -1572 1574 0.200000 -1572 1575 0.200000 -1572 1576 -1.000000 -1572 1700 5.000000 -1573 1581 -0.866667 -1574 1582 -1.000000 -1575 1583 -0.200000 -1576 1584 0.200000 -1577 1581 0.466667 -1577 1582 0.733333 -1577 1583 0.466667 -1577 1584 1.666667 -1577 1705 -0.333333 -1578 1581 1.000000 -1578 1582 -0.066667 -1578 1583 0.333333 -1578 1584 0.733333 -1578 1706 -1.666667 -1579 1581 0.333333 -1579 1582 0.200000 -1579 1583 -0.200000 -1579 1584 -0.600000 -1579 1707 -0.466667 -1580 1581 3.000000 -1580 1582 -1.000000 -1580 1583 0.600000 -1580 1584 -5.000000 -1580 1708 -0.333333 -1581 1589 1.000000 -1582 1590 -0.466667 -1583 1591 -0.600000 -1584 1592 0.866667 -1585 1589 -3.000000 -1585 1590 0.733333 -1585 1591 -0.600000 -1585 1592 -0.733333 -1585 1713 -1.666667 -1586 1589 0.466667 -1586 1590 -5.000000 -1586 1591 0.866667 -1586 1592 -0.066667 -1586 1714 5.000000 -1587 1589 0.733333 -1587 1590 -2.333333 -1587 1591 1.000000 -1587 1592 0.466667 -1587 1715 -5.000000 -1588 1589 -0.866667 -1588 1590 -0.466667 -1588 1591 0.600000 -1588 1592 0.200000 -1588 1716 -5.000000 -1589 1597 0.733333 -1590 1598 -0.066667 -1591 1599 0.466667 -1592 1600 -1.000000 -1593 1597 0.200000 -1593 1598 0.600000 -1593 1599 0.466667 -1593 1600 0.066667 -1593 1721 -0.333333 -1594 1597 0.866667 -1594 1598 -0.600000 -1594 1599 0.466667 -1594 1600 0.600000 -1594 1722 0.600000 -1595 1597 -0.866667 -1595 1598 -0.066667 -1595 1599 1.000000 -1595 1600 -0.333333 -1595 1723 0.200000 -1596 1597 -0.600000 -1596 1598 -0.333333 -1596 1599 -0.866667 -1596 1600 -0.600000 -1596 1724 0.866667 -1597 1605 1.000000 -1598 1606 0.333333 -1599 1607 0.866667 -1600 1608 -0.333333 -1601 1605 0.466667 -1601 1606 0.733333 -1601 1607 -0.466667 -1601 1608 1.000000 -1601 1729 -0.333333 -1602 1605 -0.733333 -1602 1606 0.466667 -1602 1607 0.866667 -1602 1608 -0.200000 -1602 1730 -0.466667 -1603 1605 -0.466667 -1603 1606 0.200000 -1603 1607 -0.066667 -1603 1608 -0.600000 -1603 1731 0.333333 -1604 1605 0.066667 -1604 1606 1.000000 -1604 1607 0.333333 -1604 1608 0.466667 -1604 1732 0.066667 -1605 1613 0.200000 -1606 1614 -0.866667 -1607 1615 -0.333333 -1608 1616 0.466667 -1609 1613 -1.000000 -1609 1614 0.600000 -1609 1615 0.466667 -1609 1616 -0.066667 -1609 1737 0.200000 -1610 1613 -0.200000 -1610 1614 1.000000 -1610 1615 0.733333 -1610 1616 0.066667 -1610 1738 1.000000 -1611 1613 0.066667 -1611 1614 -0.733333 -1611 1615 -0.600000 -1611 1616 1.000000 -1611 1739 -0.733333 -1612 1613 0.600000 -1612 1614 -0.066667 -1612 1615 0.066667 -1612 1616 -0.866667 -1612 1740 0.600000 -1613 1621 0.466667 -1614 1622 -0.333333 -1615 1623 0.733333 -1616 1624 0.333333 -1617 1621 -0.600000 -1617 1622 -1.000000 -1617 1623 0.333333 -1617 1624 0.200000 -1617 1745 -0.466667 -1618 1621 0.866667 -1618 1622 0.333333 -1618 1623 0.733333 -1618 1624 -1.000000 -1618 1746 -0.600000 -1619 1621 0.333333 -1619 1622 -1.000000 -1619 1623 -0.066667 -1619 1624 -0.466667 -1619 1747 -0.733333 -1620 1621 -1.000000 -1620 1622 0.333333 -1620 1623 -0.600000 -1620 1624 0.866667 -1620 1748 -0.333333 -1621 1629 0.600000 -1622 1630 0.466667 -1623 1631 -0.333333 -1624 1632 0.600000 -1625 1629 0.066667 -1625 1630 -1.000000 -1625 1631 0.333333 -1625 1632 0.200000 -1625 1753 -0.733333 -1626 1629 0.866667 -1626 1630 -0.466667 -1626 1631 -0.733333 -1626 1632 -0.733333 -1626 1754 -0.066667 -1627 1629 0.866667 -1627 1630 0.466667 -1627 1631 -0.066667 -1627 1632 0.066667 -1627 1755 -0.466667 -1628 1629 -0.066667 -1628 1630 -0.066667 -1628 1631 0.866667 -1628 1632 -0.600000 -1628 1756 0.466667 -1629 1637 0.733333 -1630 1638 -0.466667 -1631 1639 -0.066667 -1632 1640 0.333333 -1633 1637 0.600000 -1633 1638 0.466667 -1633 1639 -0.333333 -1633 1640 0.200000 -1633 1761 -0.733333 -1634 1637 -0.200000 -1634 1638 -0.200000 -1634 1639 1.000000 -1634 1640 0.066667 -1634 1762 -0.333333 -1635 1637 -1.000000 -1635 1638 0.333333 -1635 1639 -0.466667 -1635 1640 -0.733333 -1635 1763 -1.000000 -1636 1637 -0.866667 -1636 1638 0.600000 -1636 1639 0.600000 -1636 1640 -0.866667 -1636 1764 -0.733333 -1637 1645 0.333333 -1638 1646 0.066667 -1639 1647 0.866667 -1640 1648 -0.866667 -1641 1645 -1.000000 -1641 1646 0.333333 -1641 1647 1.000000 -1641 1648 0.733333 -1641 1769 -0.066667 -1642 1645 -0.466667 -1642 1646 -0.600000 -1642 1647 -0.733333 -1642 1648 -0.333333 -1642 1770 -1.000000 -1643 1645 -0.333333 -1643 1646 0.333333 -1643 1647 -0.733333 -1643 1648 0.200000 -1643 1771 0.066667 -1644 1645 -0.333333 -1644 1646 -0.066667 -1644 1647 -0.333333 -1644 1648 0.466667 -1644 1772 -0.066667 -1645 1653 0.333333 -1646 1654 -0.600000 -1647 1655 0.866667 -1648 1656 -0.866667 -1649 1653 -1.000000 -1649 1654 -1.000000 -1649 1655 -0.866667 -1649 1656 -1.000000 -1649 1777 0.066667 -1650 1653 -0.600000 -1650 1654 0.200000 -1650 1655 -0.333333 -1650 1656 0.466667 -1650 1778 0.200000 -1651 1653 -0.733333 -1651 1654 -0.200000 -1651 1655 0.733333 -1651 1656 -0.600000 -1651 1779 0.600000 -1652 1653 -0.600000 -1652 1654 -0.466667 -1652 1655 0.200000 -1652 1656 -0.066667 -1652 1780 -0.200000 -1653 1661 0.333333 -1654 1662 0.466667 -1655 1663 0.600000 -1656 1664 -0.600000 -1657 1661 -0.466667 -1657 1662 0.200000 -1657 1663 0.600000 -1657 1664 0.333333 -1657 1785 0.200000 -1658 1661 -0.866667 -1658 1662 0.600000 -1658 1663 -1.000000 -1658 1664 -1.000000 -1658 1786 -0.466667 -1659 1661 -0.066667 -1659 1662 0.466667 -1659 1663 -0.066667 -1659 1664 -1.000000 -1659 1787 -0.600000 -1660 1661 0.733333 -1660 1662 -1.000000 -1660 1663 -0.200000 -1660 1664 0.600000 -1660 1788 0.733333 -1665 1669 0.733333 -1665 1670 -0.333333 -1665 1671 -1.000000 -1665 1672 1.000000 -1665 1793 -0.333333 -1666 1669 0.066667 -1666 1670 0.466667 -1666 1671 -0.200000 -1666 1672 -3.666667 -1666 1794 -0.866667 -1667 1669 -0.466667 -1667 1670 -0.733333 -1667 1671 -0.466667 -1667 1672 0.733333 -1667 1795 0.733333 -1668 1669 0.466667 -1668 1670 0.466667 -1668 1671 0.466667 -1668 1672 -0.733333 -1668 1796 -0.200000 -1669 1677 -0.066667 -1670 1678 0.066667 -1671 1679 0.333333 -1672 1680 0.066667 -1673 1677 0.600000 -1673 1678 -0.866667 -1673 1679 0.600000 -1673 1680 0.066667 -1673 1801 0.600000 -1674 1677 0.333333 -1674 1678 0.466667 -1674 1679 0.200000 -1674 1680 0.733333 -1674 1802 0.866667 -1675 1677 0.066667 -1675 1678 0.333333 -1675 1679 -0.733333 -1675 1680 0.333333 -1675 1803 -0.066667 -1676 1677 0.866667 -1676 1678 0.600000 -1676 1679 -0.733333 -1676 1680 0.600000 -1676 1804 -0.200000 -1677 1685 -0.733333 -1678 1686 -0.733333 -1679 1687 -0.333333 -1680 1688 0.600000 -1681 1685 -0.466667 -1681 1686 -1.000000 -1681 1687 0.066667 -1681 1688 -1.000000 -1681 1809 0.333333 -1682 1685 0.066667 -1682 1686 -0.466667 -1682 1687 0.466667 -1682 1688 0.200000 -1682 1810 0.733333 -1683 1685 0.466667 -1683 1686 0.733333 -1683 1687 -0.466667 -1683 1688 -0.066667 -1683 1811 1.000000 -1684 1685 -5.000000 -1684 1686 0.066667 -1684 1687 0.066667 -1684 1688 -5.000000 -1684 1812 -0.333333 -1685 1693 0.200000 -1686 1694 -0.866667 -1687 1695 1.000000 -1688 1696 3.666667 -1689 1693 3.000000 -1689 1694 -1.000000 -1689 1695 -0.200000 -1689 1696 -1.000000 -1689 1817 0.866667 -1690 1693 -0.866667 -1690 1694 -0.733333 -1690 1695 -0.333333 -1690 1696 -2.333333 -1690 1818 1.000000 -1691 1693 -1.666667 -1691 1694 0.333333 -1691 1695 0.066667 -1691 1696 -3.666667 -1691 1819 -0.733333 -1692 1693 0.733333 -1692 1694 -0.600000 -1692 1695 0.733333 -1692 1696 -0.600000 -1692 1820 0.466667 -1693 1701 -0.600000 -1694 1702 -0.200000 -1695 1703 -0.066667 -1696 1704 1.666667 -1697 1701 1.666667 -1697 1702 -0.066667 -1697 1703 -0.466667 -1697 1704 4.333333 -1697 1825 0.600000 -1698 1701 3.000000 -1698 1702 4.333333 -1698 1703 -0.466667 -1698 1704 0.600000 -1698 1826 0.466667 -1699 1701 -1.666667 -1699 1702 0.600000 -1699 1703 2.333333 -1699 1704 3.000000 -1699 1827 0.333333 -1700 1701 -0.866667 -1700 1702 -5.000000 -1700 1703 0.600000 -1700 1704 0.600000 -1700 1828 0.200000 -1701 1709 2.333333 -1702 1710 -0.066667 -1703 1711 2.333333 -1704 1712 0.466667 -1705 1709 0.333333 -1705 1710 -0.600000 -1705 1711 5.000000 -1705 1712 0.333333 -1705 1833 -0.600000 -1706 1709 0.733333 -1706 1710 -1.666667 -1706 1711 1.000000 -1706 1712 3.000000 -1706 1834 0.600000 -1707 1709 3.000000 -1707 1710 -0.200000 -1707 1711 -0.733333 -1707 1712 0.066667 -1707 1835 0.200000 -1708 1709 1.000000 -1708 1710 -2.333333 -1708 1711 0.200000 -1708 1712 0.333333 -1708 1836 1.666667 -1709 1717 -1.000000 -1710 1718 -1.000000 -1711 1719 1.666667 -1712 1720 3.000000 -1713 1717 4.333333 -1713 1718 -0.066667 -1713 1719 -2.333333 -1713 1720 -1.666667 -1713 1841 1.666667 -1714 1717 0.066667 -1714 1718 -0.066667 -1714 1719 0.600000 -1714 1720 0.200000 -1714 1842 0.733333 -1715 1717 -0.866667 -1715 1718 -0.466667 -1715 1719 -0.733333 -1715 1720 0.600000 -1715 1843 -0.466667 -1716 1717 1.000000 -1716 1718 -0.333333 -1716 1719 -3.666667 -1716 1720 2.333333 -1716 1844 0.733333 -1717 1725 -5.000000 -1718 1726 -0.466667 -1719 1727 0.333333 -1720 1728 -0.066667 -1721 1725 -0.466667 -1721 1726 0.466667 -1721 1727 -0.200000 -1721 1728 1.000000 -1721 1849 -0.066667 -1722 1725 -0.600000 -1722 1726 0.733333 -1722 1727 3.666667 -1722 1728 0.733333 -1722 1850 0.466667 -1723 1725 0.200000 -1723 1726 -0.866667 -1723 1727 0.600000 -1723 1728 -0.200000 -1723 1851 -0.466667 -1724 1725 0.333333 -1724 1726 0.600000 -1724 1727 -0.600000 -1724 1728 -0.200000 -1724 1852 -0.066667 -1725 1733 0.866667 -1726 1734 -0.466667 -1727 1735 0.333333 -1728 1736 -0.866667 -1729 1733 -4.333333 -1729 1734 0.600000 -1729 1735 -1.666667 -1729 1736 0.466667 -1729 1857 -0.200000 -1730 1733 -1.666667 -1730 1734 3.000000 -1730 1735 0.866667 -1730 1736 0.733333 -1730 1858 0.866667 -1731 1733 1.000000 -1731 1734 0.866667 -1731 1735 -0.066667 -1731 1736 -1.000000 -1731 1859 3.000000 -1732 1733 -4.333333 -1732 1734 5.000000 -1732 1735 0.200000 -1732 1736 0.600000 -1732 1860 0.866667 -1733 1741 0.466667 -1734 1742 -0.066667 -1735 1743 -0.466667 -1736 1744 0.066667 -1737 1741 -0.600000 -1737 1742 0.066667 -1737 1743 0.600000 -1737 1744 1.000000 -1737 1865 -0.200000 -1738 1741 1.000000 -1738 1742 0.733333 -1738 1743 0.066667 -1738 1744 0.600000 -1738 1866 -0.066667 -1739 1741 0.600000 -1739 1742 -0.866667 -1739 1743 -1.000000 -1739 1744 0.066667 -1739 1867 0.866667 -1740 1741 0.200000 -1740 1742 -0.733333 -1740 1743 -0.466667 -1740 1744 0.866667 -1740 1868 0.333333 -1741 1749 -0.200000 -1742 1750 -0.600000 -1743 1751 0.066667 -1744 1752 0.866667 -1745 1749 0.200000 -1745 1750 -0.066667 -1745 1751 -0.200000 -1745 1752 -0.733333 -1745 1873 0.333333 -1746 1749 0.066667 -1746 1750 0.466667 -1746 1751 0.333333 -1746 1752 -0.200000 -1746 1874 0.600000 -1747 1749 0.200000 -1747 1750 -1.000000 -1747 1751 0.333333 -1747 1752 0.200000 -1747 1875 -0.600000 -1748 1749 -0.200000 -1748 1750 -0.466667 -1748 1751 -0.200000 -1748 1752 -0.866667 -1748 1876 -0.733333 -1749 1757 0.733333 -1750 1758 0.200000 -1751 1759 -0.333333 -1752 1760 -0.466667 -1753 1757 -0.866667 -1753 1758 1.000000 -1753 1759 0.466667 -1753 1760 0.866667 -1753 1881 -0.333333 -1754 1757 1.000000 -1754 1758 0.066667 -1754 1759 -0.600000 -1754 1760 -0.866667 -1754 1882 -0.600000 -1755 1757 0.733333 -1755 1758 0.200000 -1755 1759 -0.466667 -1755 1760 0.466667 -1755 1883 -0.600000 -1756 1757 1.000000 -1756 1758 -0.733333 -1756 1759 -1.000000 -1756 1760 -1.000000 -1756 1884 0.200000 -1757 1765 0.466667 -1758 1766 -0.733333 -1759 1767 1.000000 -1760 1768 -0.600000 -1761 1765 1.000000 -1761 1766 -0.333333 -1761 1767 0.866667 -1761 1768 -0.466667 -1761 1889 0.466667 -1762 1765 -0.200000 -1762 1766 0.333333 -1762 1767 -0.333333 -1762 1768 -0.200000 -1762 1890 1.000000 -1763 1765 1.000000 -1763 1766 3.666667 -1763 1767 -0.466667 -1763 1768 0.600000 -1763 1891 1.000000 -1764 1765 -1.000000 -1764 1766 0.200000 -1764 1767 -0.733333 -1764 1768 -1.000000 -1764 1892 1.000000 -1765 1773 0.866667 -1766 1774 -0.200000 -1767 1775 -0.600000 -1768 1776 -0.333333 -1769 1773 0.066667 -1769 1774 0.866667 -1769 1775 0.600000 -1769 1776 -0.866667 -1769 1897 0.600000 -1770 1773 1.000000 -1770 1774 -1.000000 -1770 1775 1.000000 -1770 1776 0.333333 -1770 1898 0.066667 -1771 1773 0.466667 -1771 1774 0.466667 -1771 1775 -0.200000 -1771 1776 0.600000 -1771 1899 -0.333333 -1772 1773 0.466667 -1772 1774 -0.200000 -1772 1775 1.000000 -1772 1776 0.066667 -1772 1900 1.000000 -1773 1781 0.600000 -1774 1782 0.200000 -1775 1783 0.466667 -1776 1784 0.200000 -1777 1781 -0.600000 -1777 1782 0.066667 -1777 1783 -0.066667 -1777 1784 0.066667 -1777 1905 0.866667 -1778 1781 0.066667 -1778 1782 0.733333 -1778 1783 0.733333 -1778 1784 0.600000 -1778 1906 -0.733333 -1779 1781 -0.866667 -1779 1782 0.600000 -1779 1783 1.000000 -1779 1784 0.200000 -1779 1907 -0.466667 -1780 1781 0.466667 -1780 1782 0.866667 -1780 1783 0.600000 -1780 1784 1.000000 -1780 1908 0.466667 -1781 1789 -0.466667 -1782 1790 0.333333 -1783 1791 -0.733333 -1784 1792 -1.000000 -1785 1789 -0.866667 -1785 1790 -0.600000 -1785 1791 -0.333333 -1785 1792 -0.066667 -1785 1913 0.066667 -1786 1789 0.066667 -1786 1790 -0.600000 -1786 1791 0.333333 -1786 1792 0.066667 -1786 1914 -0.866667 -1787 1789 -0.066667 -1787 1790 0.333333 -1787 1791 -0.866667 -1787 1792 1.000000 -1787 1915 1.000000 -1788 1789 -0.600000 -1788 1790 -0.600000 -1788 1791 -0.600000 -1788 1792 0.600000 -1788 1916 -0.200000 -1793 1797 -0.200000 -1793 1798 -0.466667 -1793 1799 -0.333333 -1793 1800 0.200000 -1793 1921 1.000000 -1794 1797 1.000000 -1794 1798 0.600000 -1794 1799 0.866667 -1794 1800 1.000000 -1794 1922 0.866667 -1795 1797 0.600000 -1795 1798 0.866667 -1795 1799 0.066667 -1795 1800 -0.866667 -1795 1923 0.200000 -1796 1797 -0.733333 -1796 1798 0.866667 -1796 1799 0.866667 -1796 1800 -0.866667 -1796 1924 -0.066667 -1797 1805 1.000000 -1798 1806 -0.600000 -1799 1807 -0.200000 -1800 1808 -0.333333 -1801 1805 0.600000 -1801 1806 -0.733333 -1801 1807 0.466667 -1801 1808 0.066667 -1801 1929 -0.866667 -1802 1805 0.200000 -1802 1806 0.733333 -1802 1807 0.600000 -1802 1808 -0.333333 -1802 1930 0.066667 -1803 1805 0.333333 -1803 1806 -0.600000 -1803 1807 0.733333 -1803 1808 -0.333333 -1803 1931 0.066667 -1804 1805 -0.866667 -1804 1806 0.333333 -1804 1807 0.733333 -1804 1808 0.333333 -1804 1932 -0.733333 -1805 1813 -0.200000 -1806 1814 0.200000 -1807 1815 -0.600000 -1808 1816 -0.733333 -1809 1813 -0.866667 -1809 1814 1.000000 -1809 1815 -0.733333 -1809 1816 0.866667 -1809 1937 -0.600000 -1810 1813 0.733333 -1810 1814 -0.600000 -1810 1815 -0.066667 -1810 1816 0.466667 -1810 1938 0.333333 -1811 1813 -0.733333 -1811 1814 0.866667 -1811 1815 -0.466667 -1811 1816 0.733333 -1811 1939 -0.600000 -1812 1813 0.066667 -1812 1814 -0.600000 -1812 1815 0.600000 -1812 1816 -0.733333 -1812 1940 -0.200000 -1813 1821 -0.866667 -1814 1822 1.000000 -1815 1823 -0.066667 -1816 1824 0.866667 -1817 1821 0.200000 -1817 1822 0.866667 -1817 1823 -0.200000 -1817 1824 0.333333 -1817 1945 4.333333 -1818 1821 -0.866667 -1818 1822 -3.000000 -1818 1823 3.000000 -1818 1824 0.200000 -1818 1946 -0.066667 -1819 1821 -0.600000 -1819 1822 -1.000000 -1819 1823 -3.666667 -1819 1824 -2.333333 -1819 1947 -0.733333 -1820 1821 -0.200000 -1820 1822 0.066667 -1820 1823 1.000000 -1820 1824 -0.200000 -1820 1948 -4.333333 -1821 1829 -0.866667 -1822 1830 3.666667 -1823 1831 1.000000 -1824 1832 3.666667 -1825 1829 -5.000000 -1825 1830 -0.866667 -1825 1831 0.866667 -1825 1832 0.866667 -1825 1953 -0.866667 -1826 1829 3.666667 -1826 1830 0.466667 -1826 1831 1.666667 -1826 1832 2.333333 -1826 1954 -3.000000 -1827 1829 5.000000 -1827 1830 -1.666667 -1827 1831 0.200000 -1827 1832 2.333333 -1827 1955 -0.733333 -1828 1829 -1.666667 -1828 1830 0.466667 -1828 1831 0.200000 -1828 1832 0.733333 -1828 1956 0.200000 -1829 1837 4.333333 -1830 1838 -0.066667 -1831 1839 3.000000 -1832 1840 0.866667 -1833 1837 0.466667 -1833 1838 -0.466667 -1833 1839 4.333333 -1833 1840 1.000000 -1833 1961 1.000000 -1834 1837 -0.066667 -1834 1838 0.200000 -1834 1839 0.200000 -1834 1840 0.733333 -1834 1962 1.000000 -1835 1837 5.000000 -1835 1838 -0.733333 -1835 1839 -0.866667 -1835 1840 0.200000 -1835 1963 1.000000 -1836 1837 0.333333 -1836 1838 0.066667 -1836 1839 -5.000000 -1836 1840 -0.733333 -1836 1964 0.200000 -1837 1845 -0.200000 -1838 1846 0.466667 -1839 1847 0.200000 -1840 1848 -0.066667 -1841 1845 -0.066667 -1841 1846 -5.000000 -1841 1847 -4.333333 -1841 1848 0.333333 -1841 1969 -0.466667 -1842 1845 -0.866667 -1842 1846 -0.466667 -1842 1847 0.066667 -1842 1848 -0.333333 -1842 1970 -1.000000 -1843 1845 -0.066667 -1843 1846 0.600000 -1843 1847 -0.866667 -1843 1848 0.466667 -1843 1971 0.866667 -1844 1845 -0.866667 -1844 1846 -0.200000 -1844 1847 0.066667 -1844 1848 0.600000 -1844 1972 -0.333333 -1845 1853 -0.733333 -1846 1854 3.000000 -1847 1855 0.466667 -1848 1856 0.200000 -1849 1853 -0.600000 -1849 1854 0.733333 -1849 1855 -0.866667 -1849 1856 -0.333333 -1849 1977 -0.200000 -1850 1853 1.000000 -1850 1854 -0.466667 -1850 1855 -0.866667 -1850 1856 -0.066667 -1850 1978 -0.866667 -1851 1853 -0.466667 -1851 1854 0.066667 -1851 1855 -0.200000 -1851 1856 -0.333333 -1851 1979 -0.600000 -1852 1853 -0.866667 -1852 1854 -0.466667 -1852 1855 -0.333333 -1852 1856 -1.000000 -1852 1980 0.866667 -1853 1861 0.600000 -1854 1862 0.333333 -1855 1863 -0.066667 -1856 1864 -0.333333 -1857 1861 -1.000000 -1857 1862 0.333333 -1857 1863 -0.200000 -1857 1864 -0.733333 -1857 1985 -0.333333 -1858 1861 1.666667 -1858 1862 -4.333333 -1858 1863 -4.333333 -1858 1864 -1.000000 -1858 1986 -1.000000 -1859 1861 -0.066667 -1859 1862 -5.000000 -1859 1863 1.000000 -1859 1864 0.600000 -1859 1987 1.000000 -1860 1861 -0.066667 -1860 1862 0.866667 -1860 1863 -0.466667 -1860 1864 4.333333 -1860 1988 -0.333333 -1861 1869 0.466667 -1862 1870 0.333333 -1863 1871 0.733333 -1864 1872 -0.200000 -1865 1869 0.733333 -1865 1870 -4.333333 -1865 1871 -0.866667 -1865 1872 0.200000 -1865 1993 0.733333 -1866 1869 -0.733333 -1866 1870 -3.666667 -1866 1871 0.600000 -1866 1872 -1.000000 -1866 1994 -0.466667 -1867 1869 0.733333 -1867 1870 -0.600000 -1867 1871 -1.000000 -1867 1872 -1.000000 -1867 1995 -1.666667 -1868 1869 -0.733333 -1868 1870 -1.000000 -1868 1871 -1.000000 -1868 1872 -0.733333 -1868 1996 1.000000 -1869 1877 0.733333 -1870 1878 2.333333 -1871 1879 0.733333 -1872 1880 0.333333 -1873 1877 0.866667 -1873 1878 0.733333 -1873 1879 -2.333333 -1873 1880 -0.733333 -1873 2001 0.333333 -1874 1877 -0.466667 -1874 1878 0.466667 -1874 1879 -0.066667 -1874 1880 0.600000 -1874 2002 -0.600000 -1875 1877 0.333333 -1875 1878 0.466667 -1875 1879 1.000000 -1875 1880 -0.866667 -1875 2003 -0.333333 -1876 1877 -0.466667 -1876 1878 0.600000 -1876 1879 0.600000 -1876 1880 0.600000 -1876 2004 -0.733333 -1877 1885 0.200000 -1878 1886 0.600000 -1879 1887 -0.200000 -1880 1888 0.866667 -1881 1885 0.200000 -1881 1886 -1.000000 -1881 1887 0.200000 -1881 1888 -0.866667 -1881 2009 -0.066667 -1882 1885 0.333333 -1882 1886 0.333333 -1882 1887 0.333333 -1882 1888 -0.466667 -1882 2010 -0.600000 -1883 1885 -0.866667 -1883 1886 -1.000000 -1883 1887 0.600000 -1883 1888 -0.466667 -1883 2011 1.666667 -1884 1885 0.333333 -1884 1886 0.200000 -1884 1887 0.466667 -1884 1888 0.866667 -1884 2012 0.200000 -1885 1893 -0.466667 -1886 1894 -0.333333 -1887 1895 -0.866667 -1888 1896 0.466667 -1889 1893 -0.333333 -1889 1894 -0.866667 -1889 1895 -1.000000 -1889 1896 -0.733333 -1889 2017 0.866667 -1890 1893 0.200000 -1890 1894 -0.466667 -1890 1895 0.333333 -1890 1896 0.200000 -1890 2018 -0.600000 -1891 1893 -0.466667 -1891 1894 -0.066667 -1891 1895 0.466667 -1891 1896 -0.466667 -1891 2019 -0.733333 -1892 1893 0.066667 -1892 1894 -0.466667 -1892 1895 -0.733333 -1892 1896 -1.000000 -1892 2020 -0.600000 -1893 1901 0.200000 -1894 1902 0.466667 -1895 1903 -0.066667 -1896 1904 0.866667 -1897 1901 -0.866667 -1897 1902 -0.600000 -1897 1903 0.600000 -1897 1904 -1.000000 -1897 2025 0.600000 -1898 1901 -1.000000 -1898 1902 -0.466667 -1898 1903 0.866667 -1898 1904 0.333333 -1898 2026 -0.600000 -1899 1901 0.333333 -1899 1902 -0.466667 -1899 1903 0.200000 -1899 1904 0.066667 -1899 2027 1.000000 -1900 1901 0.200000 -1900 1902 -0.333333 -1900 1903 -0.733333 -1900 1904 -0.333333 -1900 2028 -0.066667 -1901 1909 -0.466667 -1902 1910 -0.866667 -1903 1911 -0.733333 -1904 1912 -0.866667 -1905 1909 1.000000 -1905 1910 1.000000 -1905 1911 0.466667 -1905 1912 0.466667 -1905 2033 -0.866667 -1906 1909 -0.733333 -1906 1910 0.466667 -1906 1911 -0.733333 -1906 1912 -0.866667 -1906 2034 0.333333 -1907 1909 0.600000 -1907 1910 -0.200000 -1907 1911 -0.066667 -1907 1912 -0.466667 -1907 2035 -0.200000 -1908 1909 -0.466667 -1908 1910 0.600000 -1908 1911 0.733333 -1908 1912 -0.466667 -1908 2036 -0.466667 -1909 1917 -0.600000 -1910 1918 0.866667 -1911 1919 -0.466667 -1912 1920 0.600000 -1913 1917 -0.600000 -1913 1918 -0.600000 -1913 1919 -0.066667 -1913 1920 0.866667 -1913 2041 1.000000 -1914 1917 -0.733333 -1914 1918 -1.000000 -1914 1919 -0.866667 -1914 1920 0.866667 -1914 2042 1.000000 -1915 1917 0.333333 -1915 1918 -1.000000 -1915 1919 0.733333 -1915 1920 -0.600000 -1915 2043 0.333333 -1916 1917 -0.466667 -1916 1918 0.600000 -1916 1919 0.466667 -1916 1920 -0.200000 -1916 2044 -0.333333 -1921 1925 -0.866667 -1921 1926 0.200000 -1921 1927 0.066667 -1921 1928 -0.066667 -1922 1925 -0.733333 -1922 1926 1.000000 -1922 1927 0.600000 -1922 1928 0.600000 -1923 1925 -0.733333 -1923 1926 0.333333 -1923 1927 -0.600000 -1923 1928 0.333333 -1924 1925 -0.600000 -1924 1926 0.733333 -1924 1927 0.066667 -1924 1928 -0.466667 -1925 1933 1.000000 -1926 1934 0.733333 -1927 1935 0.466667 -1928 1936 -0.866667 -1929 1933 0.866667 -1929 1934 -0.333333 -1929 1935 -0.200000 -1929 1936 -0.066667 -1930 1933 -0.600000 -1930 1934 0.733333 -1930 1935 0.066667 -1930 1936 -0.333333 -1931 1933 0.066667 -1931 1934 -0.866667 -1931 1935 -0.333333 -1931 1936 -0.866667 -1932 1933 -0.866667 -1932 1934 0.600000 -1932 1935 -0.333333 -1932 1936 0.733333 -1933 1941 -0.066667 -1934 1942 -0.466667 -1935 1943 -0.200000 -1936 1944 0.600000 -1937 1941 -0.200000 -1937 1942 0.066667 -1937 1943 -0.333333 -1937 1944 -0.466667 -1938 1941 -0.733333 -1938 1942 -0.200000 -1938 1943 0.200000 -1938 1944 0.866667 -1939 1941 0.600000 -1939 1942 -0.600000 -1939 1943 1.000000 -1939 1944 -0.866667 -1940 1941 0.733333 -1940 1942 -0.733333 -1940 1943 0.200000 -1940 1944 0.600000 -1941 1949 -0.200000 -1942 1950 0.600000 -1943 1951 0.733333 -1944 1952 -0.200000 -1945 1949 0.200000 -1945 1950 0.200000 -1945 1951 0.733333 -1945 1952 0.866667 -1946 1949 0.866667 -1946 1950 0.333333 -1946 1951 1.000000 -1946 1952 0.733333 -1947 1949 1.000000 -1947 1950 0.733333 -1947 1951 -1.000000 -1947 1952 -0.600000 -1948 1949 0.066667 -1948 1950 0.733333 -1948 1951 -0.200000 -1948 1952 0.866667 -1949 1957 -1.000000 -1950 1958 0.466667 -1951 1959 0.733333 -1952 1960 0.600000 -1953 1957 -1.000000 -1953 1958 0.600000 -1953 1959 -0.066667 -1953 1960 0.466667 -1954 1957 0.733333 -1954 1958 0.733333 -1954 1959 -0.066667 -1954 1960 -0.866667 -1955 1957 1.000000 -1955 1958 -0.333333 -1955 1959 0.600000 -1955 1960 -1.000000 -1956 1957 0.466667 -1956 1958 -0.733333 -1956 1959 0.600000 -1956 1960 0.600000 -1957 1965 -0.333333 -1958 1966 -5.000000 -1959 1967 -0.866667 -1960 1968 -0.866667 -1961 1965 -0.200000 -1961 1966 -0.600000 -1961 1967 -0.333333 -1961 1968 0.066667 -1962 1965 -0.866667 -1962 1966 0.333333 -1962 1967 0.333333 -1962 1968 3.000000 -1963 1965 -3.666667 -1963 1966 3.666667 -1963 1967 -2.333333 -1963 1968 -0.866667 -1964 1965 -0.600000 -1964 1966 -0.600000 -1964 1967 -0.066667 -1964 1968 0.333333 -1965 1973 0.733333 -1966 1974 0.866667 -1967 1975 0.733333 -1968 1976 -0.733333 -1969 1973 -0.200000 -1969 1974 0.333333 -1969 1975 -0.066667 -1969 1976 -0.333333 -1970 1973 -0.200000 -1970 1974 -0.466667 -1970 1975 1.000000 -1970 1976 0.466667 -1971 1973 -0.466667 -1971 1974 -0.600000 -1971 1975 0.733333 -1971 1976 0.466667 -1972 1973 1.000000 -1972 1974 -0.866667 -1972 1975 -0.333333 -1972 1976 0.733333 -1973 1981 3.000000 -1974 1982 -1.000000 -1975 1983 -0.600000 -1976 1984 0.466667 -1977 1981 -0.066667 -1977 1982 -0.600000 -1977 1983 0.733333 -1977 1984 -3.666667 -1978 1981 -0.733333 -1978 1982 0.866667 -1978 1983 -0.200000 -1978 1984 0.600000 -1979 1981 0.200000 -1979 1982 0.466667 -1979 1983 -0.466667 -1979 1984 -0.333333 -1980 1981 0.333333 -1980 1982 0.466667 -1980 1983 -0.733333 -1980 1984 -0.333333 -1981 1989 2.333333 -1982 1990 -0.866667 -1983 1991 0.466667 -1984 1992 0.066667 -1985 1989 -0.333333 -1985 1990 -1.000000 -1985 1991 -4.333333 -1985 1992 -0.333333 -1986 1989 -0.333333 -1986 1990 -0.200000 -1986 1991 -0.600000 -1986 1992 -2.333333 -1987 1989 0.866667 -1987 1990 0.600000 -1987 1991 -0.866667 -1987 1992 0.333333 -1988 1989 0.066667 -1988 1990 -2.333333 -1988 1991 0.066667 -1988 1992 2.333333 -1989 1997 1.000000 -1990 1998 1.000000 -1991 1999 2.333333 -1992 2000 0.200000 -1993 1997 -0.600000 -1993 1998 -0.200000 -1993 1999 -4.333333 -1993 2000 0.866667 -1994 1997 3.000000 -1994 1998 -0.733333 -1994 1999 0.200000 -1994 2000 -0.333333 -1995 1997 0.866667 -1995 1998 0.733333 -1995 1999 -0.200000 -1995 2000 -0.066667 -1996 1997 -4.333333 -1996 1998 0.466667 -1996 1999 -0.333333 -1996 2000 1.000000 -1997 2005 3.666667 -1998 2006 2.333333 -1999 2007 0.466667 -2000 2008 -0.466667 -2001 2005 3.000000 -2001 2006 -3.666667 -2001 2007 -0.200000 -2001 2008 0.066667 -2002 2005 -3.666667 -2002 2006 -0.733333 -2002 2007 0.600000 -2002 2008 -0.200000 -2003 2005 1.000000 -2003 2006 -1.000000 -2003 2007 1.000000 -2003 2008 -2.333333 -2004 2005 -1.666667 -2004 2006 -1.666667 -2004 2007 -1.000000 -2004 2008 -5.000000 -2005 2013 1.000000 -2006 2014 -0.733333 -2007 2015 -0.333333 -2008 2016 3.000000 -2009 2013 -0.466667 -2009 2014 -0.733333 -2009 2015 0.733333 -2009 2016 -2.333333 -2010 2013 -0.333333 -2010 2014 0.600000 -2010 2015 -0.466667 -2010 2016 1.000000 -2011 2013 0.600000 -2011 2014 1.000000 -2011 2015 0.866667 -2011 2016 -0.333333 -2012 2013 -0.333333 -2012 2014 0.733333 -2012 2015 -1.000000 -2012 2016 0.466667 -2013 2021 -0.466667 -2014 2022 0.466667 -2015 2023 -0.733333 -2016 2024 -1.666667 -2017 2021 0.466667 -2017 2022 -0.466667 -2017 2023 0.733333 -2017 2024 1.666667 -2018 2021 0.466667 -2018 2022 0.466667 -2018 2023 1.000000 -2018 2024 0.600000 -2019 2021 -0.733333 -2019 2022 -0.200000 -2019 2023 0.333333 -2019 2024 1.000000 -2020 2021 -0.200000 -2020 2022 -0.866667 -2020 2023 4.333333 -2020 2024 0.333333 -2021 2029 0.333333 -2022 2030 0.200000 -2023 2031 0.866667 -2024 2032 0.600000 -2025 2029 -0.200000 -2025 2030 -0.333333 -2025 2031 0.200000 -2025 2032 -0.466667 -2026 2029 0.600000 -2026 2030 1.000000 -2026 2031 0.600000 -2026 2032 -0.733333 -2027 2029 -1.000000 -2027 2030 -0.733333 -2027 2031 -0.066667 -2027 2032 0.600000 -2028 2029 -0.733333 -2028 2030 -0.733333 -2028 2031 0.200000 -2028 2032 0.466667 -2029 2037 -0.600000 -2030 2038 -0.466667 -2031 2039 1.000000 -2032 2040 -0.866667 -2033 2037 -0.066667 -2033 2038 0.066667 -2033 2039 -0.466667 -2033 2040 -0.333333 -2034 2037 0.333333 -2034 2038 0.733333 -2034 2039 -1.000000 -2034 2040 0.733333 -2035 2037 -0.200000 -2035 2038 0.466667 -2035 2039 1.000000 -2035 2040 -0.466667 -2036 2037 0.200000 -2036 2038 -0.866667 -2036 2039 1.000000 -2036 2040 -0.733333 -2037 2045 0.866667 -2038 2046 -0.466667 -2039 2047 5.000000 -2040 2048 0.866667 -2041 2045 0.066667 -2041 2046 0.866667 -2041 2047 1.000000 -2041 2048 -3.666667 -2042 2045 -0.733333 -2042 2046 -0.466667 -2042 2047 0.333333 -2042 2048 0.600000 -2043 2045 -0.733333 -2043 2046 -0.466667 -2043 2047 1.000000 -2043 2048 -1.000000 -2044 2045 -0.066667 -2044 2046 0.333333 -2044 2047 -0.866667 -2044 2048 -3.666667 \ No newline at end of file diff --git a/test/chimera_droplets/2048power/groundstates_TN.txt b/test/chimera_droplets/2048power/groundstates_TN.txt deleted file mode 100644 index 7ea30fd8..00000000 --- a/test/chimera_droplets/2048power/groundstates_TN.txt +++ /dev/null @@ -1 +0,0 @@ -001.txt : -3336.773333 0 1 1 0 1 0 0 1 0 0 1 1 1 0 1 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 0 1 0 1 1 0 1 0 0 1 1 1 1 0 0 0 0 1 0 0 1 0 1 1 0 1 1 0 1 1 1 0 1 0 0 1 1 0 1 0 1 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 0 1 1 1 0 1 0 1 0 1 1 0 0 0 0 0 1 0 1 0 1 1 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0 0 1 1 1 0 0 1 0 0 1 1 0 1 1 0 0 0 1 0 1 1 1 1 0 0 1 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 0 0 1 0 0 1 1 0 0 0 1 0 1 0 0 1 0 1 0 1 0 1 1 0 1 1 0 0 1 1 1 0 0 1 1 1 1 1 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 1 1 0 1 1 1 1 0 0 1 0 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 0 0 0 0 0 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 1 0 1 1 0 1 1 1 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 1 0 0 1 1 1 0 1 1 1 1 1 1 1 1 0 0 0 0 0 1 0 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 1 1 0 1 1 0 0 1 0 0 1 1 1 1 0 1 0 1 1 0 1 1 1 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 1 1 1 1 0 1 1 1 0 0 0 1 1 0 0 1 0 0 0 1 0 0 1 1 1 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 0 1 1 0 0 1 0 1 0 0 0 1 1 1 1 1 1 0 1 1 0 0 1 0 1 1 0 0 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 1 0 1 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 0 1 1 1 0 0 0 1 0 1 0 0 1 1 1 0 1 0 1 1 0 1 1 1 1 1 0 1 0 1 0 0 1 1 0 0 0 0 1 1 0 1 1 0 0 0 1 1 1 0 0 1 1 0 0 1 1 1 1 0 1 0 1 0 1 0 1 1 0 0 0 1 1 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 1 0 1 1 0 0 1 0 1 0 1 1 1 1 0 0 0 1 1 1 1 0 0 1 1 0 0 0 1 0 1 0 0 1 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 0 1 0 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 0 0 0 1 1 0 0 1 1 0 1 0 1 1 0 1 0 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 1 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 1 0 1 1 0 0 1 1 1 0 1 0 1 0 0 0 0 1 1 0 1 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 1 0 0 1 0 1 1 1 1 1 0 0 0 1 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 1 1 0 0 1 1 1 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 0 0 0 1 0 0 0 0 0 1 1 1 0 1 0 1 0 1 1 1 0 0 0 1 0 0 1 1 1 1 0 0 0 1 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 0 1 1 1 1 0 1 1 0 1 0 0 1 0 1 0 1 1 1 1 1 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 0 1 1 1 1 1 1 0 1 0 1 0 0 0 0 1 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 1 1 1 0 1 0 0 1 0 0 1 0 1 1 1 0 1 1 0 1 0 0 1 1 0 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 0 0 1 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 1 1 1 0 0 1 0 1 0 0 0 0 0 1 0 1 1 1 0 0 1 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 0 0 0 0 1 1 0 1 1 0 1 0 0 0 0 0 0 0 1 1 0 1 0 1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 0 1 0 0 0 1 0 1 1 0 1 1 1 0 1 0 1 1 1 0 0 0 0 0 0 1 1 1 0 1 1 0 1 1 1 0 0 1 0 0 1 1 0 1 1 1 1 0 0 1 1 0 1 0 1 0 1 1 0 1 1 1 0 1 0 1 1 0 0 0 1 1 0 0 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 0 0 1 1 0 0 0 0 1 1 1 0 1 0 1 1 1 0 0 1 1 0 1 1 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 1 1 0 1 0 0 0 0 1 0 0 0 0 1 1 1 0 1 0 1 1 0 1 1 0 0 1 0 1 1 0 1 0 1 0 0 1 0 0 0 0 1 1 0 0 0 1 1 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 0 0 0 0 0 0 0 1 0 1 1 1 1 0 0 1 0 0 1 1 0 0 1 1 0 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0 0 0 1 1 0 1 0 1 1 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 1 1 1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 0 0 0 1 0 0 0 1 1 1 1 0 1 0 0 1 0 1 0 0 1 0 0 1 0 1 1 0 1 1 0 1 0 0 1 1 1 0 1 1 1 0 1 1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 1 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 0 1 0 1 0 1 0 1 1 0 1 0 0 0 1 1 0 1 1 0 0 1 0 0 0 1 0 1 1 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 1 1 0 0 1 1 1 0 0 0 0 1 0 0 0 1 0 1 0 0 1 1 1 0 0 0 1 1 0 1 0 1 0 0 1 1 1 1 1 0 0 0 1 0 0 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 1 1 0 0 1 0 1 1 0 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 0 1 1 0 1 1 1 0 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 1 0 1 1 0 1 1 1 0 0 1 0 0 1 0 0 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0 0 1 1 1 0 1 1 1 1 0 0 1 1 0 0 0 0 1 0 1 1 1 1 1 0 0 1 diff --git a/test/chimera_droplets/512power/001.txt b/test/chimera_droplets/512power/001.txt deleted file mode 100755 index 0554a3d1..00000000 --- a/test/chimera_droplets/512power/001.txt +++ /dev/null @@ -1,1985 +0,0 @@ -# -1 1 0.146667 -2 2 0.093333 -3 3 0.200000 -4 4 0.120000 -5 5 0.066667 -6 6 0.200000 -7 7 0.093333 -8 8 -0.200000 -9 9 -0.173333 -10 10 0.200000 -11 11 -0.093333 -12 12 -0.200000 -13 13 0.066667 -14 14 0.120000 -15 15 0.120000 -16 16 0.146667 -17 17 -0.146667 -18 18 0.013333 -19 19 0.066667 -20 20 0.040000 -21 21 0.120000 -22 22 -0.146667 -23 23 0.120000 -24 24 -0.146667 -25 25 0.093333 -26 26 -0.013333 -27 27 0.146667 -28 28 0.146667 -29 29 0.146667 -30 30 -0.093333 -31 31 0.013333 -32 32 0.013333 -33 33 -0.146667 -34 34 -0.040000 -35 35 -0.066667 -36 36 -0.173333 -37 37 -0.040000 -38 38 -0.013333 -39 39 -0.093333 -40 40 0.146667 -41 41 -0.173333 -42 42 -0.093333 -43 43 0.120000 -44 44 -0.013333 -45 45 0.173333 -46 46 0.200000 -47 47 -0.093333 -48 48 0.173333 -49 49 -0.040000 -50 50 -0.093333 -51 51 0.093333 -52 52 -0.146667 -53 53 -0.093333 -54 54 -0.066667 -55 55 -0.066667 -56 56 0.066667 -57 57 -0.093333 -58 58 -0.173333 -59 59 0.173333 -60 60 -0.066667 -61 61 0.173333 -62 62 -0.173333 -63 63 0.013333 -64 64 0.040000 -65 65 0.146667 -66 66 -0.120000 -67 67 0.173333 -68 68 -0.146667 -69 69 -0.120000 -70 70 -0.066667 -71 71 -0.066667 -72 72 0.200000 -73 73 0.146667 -74 74 0.200000 -75 75 0.040000 -76 76 0.173333 -77 77 0.066667 -78 78 0.173333 -79 79 0.066667 -80 80 -0.146667 -81 81 -0.013333 -82 82 0.120000 -83 83 -0.146667 -84 84 0.040000 -85 85 0.093333 -86 86 0.146667 -87 87 0.200000 -88 88 0.093333 -89 89 -0.200000 -90 90 -0.120000 -91 91 0.173333 -92 92 -0.120000 -93 93 -0.120000 -94 94 -0.093333 -95 95 -0.146667 -96 96 0.093333 -97 97 0.040000 -98 98 -0.200000 -99 99 -0.040000 -100 100 0.173333 -101 101 0.066667 -102 102 0.013333 -103 103 -0.120000 -104 104 -0.146667 -105 105 0.066667 -106 106 -0.173333 -107 107 0.093333 -108 108 -0.173333 -109 109 0.173333 -110 110 0.120000 -111 111 0.040000 -112 112 0.200000 -113 113 0.066667 -114 114 -0.040000 -115 115 -0.200000 -116 116 0.013333 -117 117 0.120000 -118 118 -0.093333 -119 119 -0.173333 -120 120 0.040000 -121 121 -0.013333 -122 122 0.173333 -123 123 -0.093333 -124 124 0.093333 -125 125 0.120000 -126 126 0.200000 -127 127 0.173333 -128 128 0.093333 -129 129 -0.040000 -130 130 -0.146667 -131 131 -0.146667 -132 132 -0.120000 -133 133 0.013333 -134 134 0.146667 -135 135 0.013333 -136 136 0.146667 -137 137 -0.066667 -138 138 0.120000 -139 139 0.066667 -140 140 -0.040000 -141 141 -0.040000 -142 142 -0.013333 -143 143 0.093333 -144 144 -0.040000 -145 145 -0.013333 -146 146 0.013333 -147 147 -0.173333 -148 148 0.173333 -149 149 -0.066667 -150 150 -0.066667 -151 151 0.146667 -152 152 -0.066667 -153 153 0.146667 -154 154 -0.093333 -155 155 0.120000 -156 156 -0.173333 -157 157 -0.200000 -158 158 -0.173333 -159 159 0.013333 -160 160 -0.173333 -161 161 -0.146667 -162 162 0.066667 -163 163 -0.066667 -164 164 -0.040000 -165 165 -0.013333 -166 166 0.146667 -167 167 0.146667 -168 168 0.040000 -169 169 0.200000 -170 170 0.093333 -171 171 -0.066667 -172 172 0.146667 -173 173 0.120000 -174 174 0.066667 -175 175 0.066667 -176 176 -0.093333 -177 177 -0.013333 -178 178 0.013333 -179 179 -0.040000 -180 180 -0.013333 -181 181 -0.013333 -182 182 -0.120000 -183 183 0.200000 -184 184 0.066667 -185 185 -0.173333 -186 186 0.200000 -187 187 -0.093333 -188 188 0.093333 -189 189 -0.040000 -190 190 -0.120000 -191 191 0.093333 -192 192 -0.093333 -193 193 0.013333 -194 194 0.013333 -195 195 0.066667 -196 196 -0.173333 -197 197 -0.093333 -198 198 -0.200000 -199 199 -0.040000 -200 200 0.146667 -201 201 0.173333 -202 202 0.066667 -203 203 -0.066667 -204 204 -0.093333 -205 205 -0.146667 -206 206 -0.093333 -207 207 0.066667 -208 208 -0.013333 -209 209 -0.120000 -210 210 -0.066667 -211 211 -0.013333 -212 212 -0.040000 -213 213 -0.093333 -214 214 0.146667 -215 215 -0.066667 -216 216 0.173333 -217 217 -0.173333 -218 218 0.146667 -219 219 -0.013333 -220 220 0.173333 -221 221 0.120000 -222 222 0.066667 -223 223 -0.200000 -224 224 0.013333 -225 225 -0.066667 -226 226 0.066667 -227 227 -0.146667 -228 228 0.040000 -229 229 -0.200000 -230 230 -0.013333 -231 231 0.200000 -232 232 0.120000 -233 233 0.173333 -234 234 -0.200000 -235 235 0.093333 -236 236 -0.120000 -237 237 0.093333 -238 238 0.200000 -239 239 0.146667 -240 240 -0.200000 -241 241 -0.040000 -242 242 -0.173333 -243 243 0.200000 -244 244 0.013333 -245 245 -0.200000 -246 246 0.013333 -247 247 -0.146667 -248 248 0.040000 -249 249 -0.200000 -250 250 0.146667 -251 251 0.146667 -252 252 0.200000 -253 253 0.093333 -254 254 -0.013333 -255 255 0.120000 -256 256 0.146667 -257 257 0.040000 -258 258 0.173333 -259 259 -0.146667 -260 260 -0.040000 -261 261 0.146667 -262 262 0.146667 -263 263 -0.200000 -264 264 -0.120000 -265 265 0.066667 -266 266 -0.040000 -267 267 -0.066667 -268 268 0.200000 -269 269 0.173333 -270 270 0.066667 -271 271 -0.013333 -272 272 -0.173333 -273 273 0.173333 -274 274 -0.120000 -275 275 0.146667 -276 276 -0.066667 -277 277 0.173333 -278 278 -0.200000 -279 279 0.200000 -280 280 -0.146667 -281 281 -0.013333 -282 282 0.013333 -283 283 0.173333 -284 284 0.200000 -285 285 0.120000 -286 286 -0.066667 -287 287 -0.120000 -288 288 0.120000 -289 289 0.013333 -290 290 0.040000 -291 291 0.146667 -292 292 0.066667 -293 293 -0.200000 -294 294 -0.173333 -295 295 -0.093333 -296 296 0.173333 -297 297 0.120000 -298 298 -0.173333 -299 299 -0.173333 -300 300 -0.146667 -301 301 0.173333 -302 302 0.173333 -303 303 -0.066667 -304 304 0.066667 -305 305 -0.013333 -306 306 0.013333 -307 307 0.066667 -308 308 -0.173333 -309 309 -0.040000 -310 310 0.146667 -311 311 0.146667 -312 312 -0.120000 -313 313 -0.066667 -314 314 -0.120000 -315 315 -0.066667 -316 316 0.200000 -317 317 0.040000 -318 318 0.040000 -319 319 -0.146667 -320 320 -0.013333 -321 321 -0.093333 -322 322 -0.120000 -323 323 0.120000 -324 324 0.120000 -325 325 0.146667 -326 326 0.093333 -327 327 -0.093333 -328 328 0.146667 -329 329 0.066667 -330 330 -0.013333 -331 331 0.013333 -332 332 0.146667 -333 333 -0.066667 -334 334 -0.146667 -335 335 0.200000 -336 336 -0.040000 -337 337 -0.120000 -338 338 -0.093333 -339 339 -0.066667 -340 340 0.200000 -341 341 0.146667 -342 342 -0.093333 -343 343 -0.066667 -344 344 -0.200000 -345 345 0.200000 -346 346 -0.093333 -347 347 -0.093333 -348 348 0.146667 -349 349 -0.200000 -350 350 -0.013333 -351 351 -0.066667 -352 352 0.200000 -353 353 -0.120000 -354 354 -0.120000 -355 355 0.173333 -356 356 -0.120000 -357 357 0.013333 -358 358 0.200000 -359 359 0.146667 -360 360 -0.120000 -361 361 -0.173333 -362 362 -0.013333 -363 363 0.093333 -364 364 0.013333 -365 365 0.093333 -366 366 0.040000 -367 367 0.146667 -368 368 -0.200000 -369 369 0.093333 -370 370 0.093333 -371 371 -0.066667 -372 372 0.120000 -373 373 0.093333 -374 374 -0.066667 -375 375 -0.146667 -376 376 0.066667 -377 377 0.066667 -378 378 0.146667 -379 379 -0.093333 -380 380 -0.173333 -381 381 -0.173333 -382 382 -0.173333 -383 383 0.066667 -384 384 -0.040000 -385 385 -0.066667 -386 386 0.173333 -387 387 -0.200000 -388 388 -0.066667 -389 389 0.120000 -390 390 -0.146667 -391 391 0.120000 -392 392 -0.013333 -393 393 -0.066667 -394 394 -0.146667 -395 395 0.066667 -396 396 0.093333 -397 397 0.146667 -398 398 0.146667 -399 399 0.200000 -400 400 -0.120000 -401 401 -0.120000 -402 402 0.146667 -403 403 -0.013333 -404 404 -0.200000 -405 405 0.066667 -406 406 0.200000 -407 407 0.173333 -408 408 -0.013333 -409 409 -0.013333 -410 410 0.066667 -411 411 -0.173333 -412 412 0.146667 -413 413 0.120000 -414 414 -0.093333 -415 415 0.200000 -416 416 0.146667 -417 417 0.093333 -418 418 0.040000 -419 419 0.066667 -420 420 -0.120000 -421 421 -0.093333 -422 422 -0.120000 -423 423 -0.120000 -424 424 -0.173333 -425 425 -0.146667 -426 426 0.066667 -427 427 0.173333 -428 428 -0.146667 -429 429 0.040000 -430 430 0.120000 -431 431 0.013333 -432 432 -0.173333 -433 433 0.120000 -434 434 -0.093333 -435 435 0.040000 -436 436 0.093333 -437 437 -0.066667 -438 438 -0.066667 -439 439 0.093333 -440 440 0.066667 -441 441 -0.066667 -442 442 0.040000 -443 443 0.093333 -444 444 0.040000 -445 445 -0.013333 -446 446 0.200000 -447 447 -0.013333 -448 448 0.013333 -449 449 0.120000 -450 450 0.120000 -451 451 0.200000 -452 452 0.200000 -453 453 -0.173333 -454 454 -0.040000 -455 455 -0.200000 -456 456 0.093333 -457 457 0.200000 -458 458 0.066667 -459 459 0.200000 -460 460 -0.093333 -461 461 -0.040000 -462 462 -0.013333 -463 463 0.120000 -464 464 0.013333 -465 465 -0.120000 -466 466 0.120000 -467 467 -0.120000 -468 468 0.173333 -469 469 0.173333 -470 470 0.173333 -471 471 -0.200000 -472 472 0.200000 -473 473 0.146667 -474 474 -0.040000 -475 475 -0.093333 -476 476 -0.093333 -477 477 -0.146667 -478 478 0.173333 -479 479 0.066667 -480 480 -0.200000 -481 481 -0.120000 -482 482 0.173333 -483 483 0.013333 -484 484 -0.146667 -485 485 0.146667 -486 486 -0.200000 -487 487 0.200000 -488 488 -0.146667 -489 489 -0.120000 -490 490 0.093333 -491 491 0.093333 -492 492 -0.040000 -493 493 0.173333 -494 494 0.093333 -495 495 0.120000 -496 496 -0.146667 -497 497 -0.040000 -498 498 -0.173333 -499 499 0.093333 -500 500 0.013333 -501 501 0.200000 -502 502 0.120000 -503 503 0.093333 -504 504 0.013333 -505 505 -0.066667 -506 506 -0.040000 -507 507 0.146667 -508 508 0.013333 -509 509 0.173333 -510 510 -0.173333 -511 511 -0.200000 -512 512 0.200000 -1 5 -0.866667 -1 6 0.200000 -1 7 -0.733333 -1 8 0.333333 -1 65 -0.333333 -2 5 -0.733333 -2 6 0.066667 -2 7 -0.200000 -2 8 0.333333 -2 66 -0.866667 -3 5 -0.866667 -3 6 0.066667 -3 7 -0.866667 -3 8 -0.733333 -3 67 0.866667 -4 5 -0.333333 -4 6 0.333333 -4 7 -0.466667 -4 8 0.866667 -4 68 -0.200000 -5 13 -1.000000 -6 14 -0.600000 -7 15 -0.200000 -8 16 0.333333 -9 13 -0.333333 -9 14 -1.000000 -9 15 -0.600000 -9 16 0.466667 -9 73 0.066667 -10 13 -0.733333 -10 14 0.200000 -10 15 0.066667 -10 16 -0.866667 -10 74 -0.066667 -11 13 -1.000000 -11 14 0.733333 -11 15 0.333333 -11 16 0.866667 -11 75 -0.600000 -12 13 1.000000 -12 14 0.066667 -12 15 -0.066667 -12 16 -0.200000 -12 76 0.066667 -13 21 0.600000 -14 22 -0.600000 -15 23 0.733333 -16 24 -0.866667 -17 21 -4.333333 -17 22 0.600000 -17 23 0.733333 -17 24 -0.333333 -17 81 0.333333 -18 21 -1.000000 -18 22 -0.066667 -18 23 -1.000000 -18 24 -0.866667 -18 82 1.000000 -19 21 1.000000 -19 22 -0.066667 -19 23 0.866667 -19 24 0.333333 -19 83 -0.066667 -20 21 0.466667 -20 22 0.333333 -20 23 0.466667 -20 24 -0.866667 -20 84 0.733333 -21 29 0.200000 -22 30 -0.600000 -23 31 -1.000000 -24 32 0.600000 -25 29 0.466667 -25 30 1.000000 -25 31 -1.666667 -25 32 1.666667 -25 89 -0.333333 -26 29 -0.333333 -26 30 0.066667 -26 31 -0.733333 -26 32 0.200000 -26 90 -0.333333 -27 29 0.733333 -27 30 -0.600000 -27 31 0.866667 -27 32 0.866667 -27 91 0.200000 -28 29 1.000000 -28 30 0.200000 -28 31 0.066667 -28 32 -0.866667 -28 92 -0.066667 -29 37 -0.866667 -30 38 0.466667 -31 39 -0.466667 -32 40 0.733333 -33 37 0.200000 -33 38 0.333333 -33 39 -0.200000 -33 40 5.000000 -33 97 -0.600000 -34 37 -0.600000 -34 38 1.000000 -34 39 0.466667 -34 40 0.866667 -34 98 0.333333 -35 37 0.200000 -35 38 1.000000 -35 39 -3.000000 -35 40 -0.466667 -35 99 1.000000 -36 37 -0.333333 -36 38 -1.000000 -36 39 -1.000000 -36 40 -0.066667 -36 100 0.466667 -37 45 1.000000 -38 46 0.333333 -39 47 -0.066667 -40 48 3.666667 -41 45 -0.733333 -41 46 0.600000 -41 47 -0.466667 -41 48 -0.733333 -41 105 0.066667 -42 45 2.333333 -42 46 -0.866667 -42 47 5.000000 -42 48 -0.333333 -42 106 -0.600000 -43 45 0.200000 -43 46 -1.000000 -43 47 -0.733333 -43 48 -1.000000 -43 107 -0.466667 -44 45 0.600000 -44 46 1.000000 -44 47 -0.466667 -44 48 -5.000000 -44 108 0.333333 -45 53 -1.000000 -46 54 -1.000000 -47 55 -0.733333 -48 56 0.200000 -49 53 0.066667 -49 54 0.733333 -49 55 -0.600000 -49 56 -0.333333 -49 113 -0.600000 -50 53 -0.466667 -50 54 -0.733333 -50 55 0.466667 -50 56 0.600000 -50 114 0.466667 -51 53 -0.066667 -51 54 -5.000000 -51 55 1.666667 -51 56 0.333333 -51 115 0.466667 -52 53 1.000000 -52 54 5.000000 -52 55 0.333333 -52 56 -0.600000 -52 116 0.333333 -53 61 0.733333 -54 62 -3.666667 -55 63 0.466667 -56 64 -0.866667 -57 61 0.066667 -57 62 0.866667 -57 63 -0.600000 -57 64 0.466667 -57 121 -0.600000 -58 61 -0.733333 -58 62 0.466667 -58 63 -0.866667 -58 64 1.000000 -58 122 -1.000000 -59 61 -0.333333 -59 62 0.333333 -59 63 0.600000 -59 64 -0.733333 -59 123 -0.333333 -60 61 0.466667 -60 62 -0.866667 -60 63 0.733333 -60 64 -0.733333 -60 124 0.066667 -65 69 0.600000 -65 70 -0.733333 -65 71 -0.066667 -65 72 0.866667 -65 129 0.466667 -66 69 -0.600000 -66 70 1.000000 -66 71 -0.466667 -66 72 -0.200000 -66 130 -0.733333 -67 69 -0.466667 -67 70 -0.466667 -67 71 0.466667 -67 72 0.866667 -67 131 -0.733333 -68 69 0.866667 -68 70 0.866667 -68 71 -0.066667 -68 72 0.333333 -68 132 -0.733333 -69 77 1.000000 -70 78 0.200000 -71 79 0.866667 -72 80 0.866667 -73 77 -0.733333 -73 78 0.333333 -73 79 0.333333 -73 80 -0.466667 -73 137 -0.466667 -74 77 -0.200000 -74 78 0.866667 -74 79 0.866667 -74 80 0.200000 -74 138 0.333333 -75 77 1.000000 -75 78 -0.200000 -75 79 -0.466667 -75 80 0.866667 -75 139 0.733333 -76 77 0.733333 -76 78 -0.466667 -76 79 0.600000 -76 80 1.000000 -76 140 0.733333 -77 85 0.600000 -78 86 0.466667 -79 87 1.000000 -80 88 1.000000 -81 85 -1.000000 -81 86 0.066667 -81 87 -0.333333 -81 88 2.333333 -81 145 0.466667 -82 85 0.066667 -82 86 -0.066667 -82 87 -0.866667 -82 88 0.200000 -82 146 0.733333 -83 85 0.466667 -83 86 0.200000 -83 87 0.200000 -83 88 3.000000 -83 147 0.066667 -84 85 0.333333 -84 86 -0.866667 -84 87 0.333333 -84 88 -0.066667 -84 148 -0.600000 -85 93 0.733333 -86 94 -0.466667 -87 95 0.600000 -88 96 -0.066667 -89 93 -0.600000 -89 94 0.200000 -89 95 -0.333333 -89 96 -1.000000 -89 153 -0.200000 -90 93 -0.066667 -90 94 1.000000 -90 95 0.066667 -90 96 0.466667 -90 154 -0.600000 -91 93 -0.466667 -91 94 0.600000 -91 95 -0.600000 -91 96 -0.600000 -91 155 -0.333333 -92 93 0.333333 -92 94 -0.333333 -92 95 -0.866667 -92 96 -0.200000 -92 156 0.333333 -93 101 0.866667 -94 102 0.333333 -95 103 -0.733333 -96 104 -0.600000 -97 101 0.333333 -97 102 -0.466667 -97 103 0.733333 -97 104 -0.333333 -97 161 -0.333333 -98 101 -0.600000 -98 102 -0.733333 -98 103 0.466667 -98 104 -0.333333 -98 162 -0.466667 -99 101 0.466667 -99 102 -0.200000 -99 103 -0.866667 -99 104 2.333333 -99 163 4.333333 -100 101 0.200000 -100 102 -0.866667 -100 103 0.600000 -100 104 0.733333 -100 164 -1.000000 -101 109 0.466667 -102 110 -0.333333 -103 111 -1.000000 -104 112 -0.600000 -105 109 -0.066667 -105 110 0.866667 -105 111 -0.733333 -105 112 -0.200000 -105 169 -0.066667 -106 109 -0.733333 -106 110 0.733333 -106 111 0.333333 -106 112 1.000000 -106 170 1.666667 -107 109 -0.200000 -107 110 0.600000 -107 111 0.066667 -107 112 0.200000 -107 171 -0.333333 -108 109 -0.333333 -108 110 0.200000 -108 111 -3.000000 -108 112 -0.466667 -108 172 0.466667 -109 117 0.600000 -110 118 -0.200000 -111 119 -0.600000 -112 120 0.866667 -113 117 1.000000 -113 118 0.733333 -113 119 -0.333333 -113 120 0.600000 -113 177 3.000000 -114 117 -0.866667 -114 118 -1.000000 -114 119 0.066667 -114 120 0.066667 -114 178 1.000000 -115 117 -0.733333 -115 118 -0.600000 -115 119 0.333333 -115 120 -0.333333 -115 179 -0.200000 -116 117 0.600000 -116 118 0.066667 -116 119 -0.866667 -116 120 0.866667 -116 180 0.066667 -117 125 0.866667 -118 126 -0.733333 -119 127 0.333333 -120 128 0.200000 -121 125 -0.333333 -121 126 -0.333333 -121 127 0.333333 -121 128 1.000000 -121 185 -0.066667 -122 125 -0.600000 -122 126 -0.866667 -122 127 -0.200000 -122 128 0.200000 -122 186 -0.200000 -123 125 0.200000 -123 126 2.333333 -123 127 -0.333333 -123 128 0.200000 -123 187 -0.866667 -124 125 0.733333 -124 126 -0.866667 -124 127 0.200000 -124 128 -0.866667 -124 188 -0.333333 -129 133 0.333333 -129 134 0.466667 -129 135 -0.733333 -129 136 0.600000 -129 193 0.866667 -130 133 -0.466667 -130 134 0.333333 -130 135 0.200000 -130 136 -0.866667 -130 194 0.466667 -131 133 0.066667 -131 134 -0.066667 -131 135 0.466667 -131 136 1.000000 -131 195 0.466667 -132 133 0.200000 -132 134 1.000000 -132 135 0.200000 -132 136 -0.600000 -132 196 1.000000 -133 141 -1.000000 -134 142 -0.066667 -135 143 0.333333 -136 144 0.466667 -137 141 0.200000 -137 142 -0.066667 -137 143 0.733333 -137 144 -0.733333 -137 201 -0.733333 -138 141 0.600000 -138 142 0.066667 -138 143 0.466667 -138 144 -0.600000 -138 202 0.733333 -139 141 -0.733333 -139 142 1.000000 -139 143 0.333333 -139 144 1.000000 -139 203 0.466667 -140 141 -0.200000 -140 142 0.466667 -140 143 0.066667 -140 144 0.866667 -140 204 -0.866667 -141 149 0.066667 -142 150 0.600000 -143 151 0.466667 -144 152 -0.066667 -145 149 5.000000 -145 150 -0.333333 -145 151 5.000000 -145 152 5.000000 -145 209 -1.000000 -146 149 -0.866667 -146 150 0.466667 -146 151 0.600000 -146 152 0.600000 -146 210 -0.066667 -147 149 -0.200000 -147 150 -0.466667 -147 151 0.466667 -147 152 0.733333 -147 211 -0.733333 -148 149 -0.733333 -148 150 1.000000 -148 151 0.333333 -148 152 -0.866667 -148 212 -0.466667 -149 157 0.066667 -150 158 -0.066667 -151 159 1.000000 -152 160 -2.333333 -153 157 -0.066667 -153 158 -0.466667 -153 159 -0.600000 -153 160 -0.200000 -153 217 0.600000 -154 157 -0.733333 -154 158 -0.600000 -154 159 0.600000 -154 160 1.000000 -154 218 0.733333 -155 157 0.600000 -155 158 -0.333333 -155 159 -0.066667 -155 160 3.000000 -155 219 -0.600000 -156 157 -0.733333 -156 158 0.333333 -156 159 -0.333333 -156 160 -2.333333 -156 220 -0.866667 -157 165 0.333333 -158 166 0.066667 -159 167 0.866667 -160 168 1.666667 -161 165 0.733333 -161 166 -0.733333 -161 167 -0.866667 -161 168 4.333333 -161 225 -0.600000 -162 165 -0.600000 -162 166 0.333333 -162 167 -1.000000 -162 168 0.466667 -162 226 1.000000 -163 165 2.333333 -163 166 0.466667 -163 167 3.000000 -163 168 2.333333 -163 227 -5.000000 -164 165 1.000000 -164 166 -0.333333 -164 167 1.000000 -164 168 -0.733333 -164 228 -1.000000 -165 173 0.333333 -166 174 0.066667 -167 175 0.066667 -168 176 2.333333 -169 173 -0.200000 -169 174 0.066667 -169 175 0.466667 -169 176 4.333333 -169 233 -0.466667 -170 173 -3.000000 -170 174 0.066667 -170 175 0.066667 -170 176 3.666667 -170 234 -0.333333 -171 173 0.600000 -171 174 0.866667 -171 175 0.733333 -171 176 1.000000 -171 235 0.200000 -172 173 0.066667 -172 174 0.466667 -172 175 -0.200000 -172 176 -0.066667 -172 236 -0.200000 -173 181 0.466667 -174 182 0.200000 -175 183 0.333333 -176 184 0.066667 -177 181 -0.333333 -177 182 0.066667 -177 183 0.600000 -177 184 1.000000 -177 241 -0.466667 -178 181 0.466667 -178 182 0.866667 -178 183 0.866667 -178 184 -1.000000 -178 242 -0.866667 -179 181 0.066667 -179 182 0.066667 -179 183 0.333333 -179 184 0.733333 -179 243 1.000000 -180 181 0.066667 -180 182 -0.066667 -180 183 -1.000000 -180 184 0.866667 -180 244 -0.733333 -181 189 0.733333 -182 190 -1.000000 -183 191 -0.333333 -184 192 -0.466667 -185 189 1.000000 -185 190 -0.333333 -185 191 -0.466667 -185 192 -0.733333 -185 249 -0.600000 -186 189 0.733333 -186 190 -0.066667 -186 191 0.866667 -186 192 -0.600000 -186 250 -1.000000 -187 189 0.866667 -187 190 0.466667 -187 191 0.066667 -187 192 -0.600000 -187 251 -0.200000 -188 189 0.200000 -188 190 -0.200000 -188 191 0.200000 -188 192 0.866667 -188 252 0.200000 -193 197 3.000000 -193 198 -0.466667 -193 199 1.666667 -193 200 -1.000000 -193 257 -3.666667 -194 197 -0.466667 -194 198 0.866667 -194 199 -1.000000 -194 200 0.466667 -194 258 0.466667 -195 197 0.733333 -195 198 -0.866667 -195 199 3.000000 -195 200 -4.333333 -195 259 -0.466667 -196 197 0.066667 -196 198 -0.333333 -196 199 -0.066667 -196 200 -0.600000 -196 260 -0.333333 -197 205 0.466667 -198 206 0.066667 -199 207 -1.000000 -200 208 -0.466667 -201 205 -0.466667 -201 206 0.066667 -201 207 0.066667 -201 208 3.666667 -201 265 -0.866667 -202 205 0.600000 -202 206 0.733333 -202 207 0.600000 -202 208 0.333333 -202 266 -0.866667 -203 205 -0.733333 -203 206 -0.733333 -203 207 0.466667 -203 208 0.333333 -203 267 0.333333 -204 205 -0.066667 -204 206 -1.000000 -204 207 0.333333 -204 208 -0.466667 -204 268 0.466667 -205 213 1.000000 -206 214 -0.333333 -207 215 -0.333333 -208 216 -0.333333 -209 213 0.066667 -209 214 0.466667 -209 215 -0.866667 -209 216 -0.200000 -209 273 -0.466667 -210 213 1.000000 -210 214 -4.333333 -210 215 -0.866667 -210 216 5.000000 -210 274 0.600000 -211 213 -0.600000 -211 214 -0.466667 -211 215 -0.866667 -211 216 0.466667 -211 275 0.066667 -212 213 -0.733333 -212 214 -0.866667 -212 215 -0.866667 -212 216 0.600000 -212 276 0.066667 -213 221 0.333333 -214 222 3.666667 -215 223 0.733333 -216 224 -0.333333 -217 221 -0.066667 -217 222 -0.466667 -217 223 -0.333333 -217 224 -0.066667 -217 281 -0.866667 -218 221 -0.066667 -218 222 -0.733333 -218 223 -0.866667 -218 224 0.733333 -218 282 0.866667 -219 221 2.333333 -219 222 -0.200000 -219 223 0.733333 -219 224 1.000000 -219 283 1.000000 -220 221 -0.200000 -220 222 0.466667 -220 223 -0.866667 -220 224 -0.866667 -220 284 0.600000 -221 229 0.333333 -222 230 -0.066667 -223 231 0.600000 -224 232 -4.333333 -225 229 0.466667 -225 230 0.333333 -225 231 0.200000 -225 232 1.000000 -225 289 2.333333 -226 229 -1.000000 -226 230 0.066667 -226 231 0.600000 -226 232 -0.466667 -226 290 0.866667 -227 229 1.000000 -227 230 -4.333333 -227 231 0.600000 -227 232 -0.333333 -227 291 -1.000000 -228 229 -1.000000 -228 230 0.066667 -228 231 0.866667 -228 232 0.733333 -228 292 1.000000 -229 237 0.733333 -230 238 -1.000000 -231 239 -0.866667 -232 240 -3.000000 -233 237 -0.600000 -233 238 -0.466667 -233 239 -0.733333 -233 240 0.600000 -233 297 0.066667 -234 237 -0.466667 -234 238 -0.466667 -234 239 -0.333333 -234 240 -0.333333 -234 298 -0.333333 -235 237 1.000000 -235 238 -0.733333 -235 239 -1.000000 -235 240 -0.200000 -235 299 -0.733333 -236 237 1.000000 -236 238 0.200000 -236 239 -0.733333 -236 240 0.866667 -236 300 -0.866667 -237 245 -0.066667 -238 246 -0.200000 -239 247 0.066667 -240 248 -0.466667 -241 245 -0.600000 -241 246 0.466667 -241 247 -1.000000 -241 248 -0.066667 -241 305 -0.066667 -242 245 1.000000 -242 246 0.200000 -242 247 -0.200000 -242 248 -0.733333 -242 306 -0.600000 -243 245 -0.733333 -243 246 0.866667 -243 247 0.733333 -243 248 -0.466667 -243 307 0.200000 -244 245 1.000000 -244 246 0.866667 -244 247 -0.200000 -244 248 -0.200000 -244 308 0.200000 -245 253 -0.066667 -246 254 1.000000 -247 255 -0.733333 -248 256 -0.733333 -249 253 0.333333 -249 254 -0.733333 -249 255 0.466667 -249 256 -0.866667 -249 313 -0.733333 -250 253 0.200000 -250 254 -0.466667 -250 255 -0.200000 -250 256 -0.200000 -250 314 -0.600000 -251 253 -0.866667 -251 254 1.000000 -251 255 0.200000 -251 256 -0.333333 -251 315 0.733333 -252 253 0.066667 -252 254 0.066667 -252 255 -0.066667 -252 256 0.866667 -252 316 -0.466667 -257 261 3.666667 -257 262 0.600000 -257 263 2.333333 -257 264 -1.666667 -257 321 0.866667 -258 261 0.200000 -258 262 -0.200000 -258 263 -0.600000 -258 264 0.466667 -258 322 -0.600000 -259 261 -0.733333 -259 262 0.600000 -259 263 -0.866667 -259 264 -0.600000 -259 323 0.466667 -260 261 -1.000000 -260 262 5.000000 -260 263 0.600000 -260 264 0.866667 -260 324 0.866667 -261 269 0.466667 -262 270 -5.000000 -263 271 0.200000 -264 272 0.733333 -265 269 0.466667 -265 270 0.200000 -265 271 -0.200000 -265 272 0.333333 -265 329 0.466667 -266 269 0.333333 -266 270 -5.000000 -266 271 -1.000000 -266 272 -0.600000 -266 330 -0.200000 -267 269 0.200000 -267 270 -1.000000 -267 271 -0.866667 -267 272 -0.600000 -267 331 -0.600000 -268 269 0.333333 -268 270 -2.333333 -268 271 -0.866667 -268 272 0.066667 -268 332 0.200000 -269 277 0.200000 -270 278 -0.200000 -271 279 0.333333 -272 280 0.200000 -273 277 -1.000000 -273 278 0.466667 -273 279 -0.733333 -273 280 0.600000 -273 337 0.600000 -274 277 -0.200000 -274 278 0.600000 -274 279 0.866667 -274 280 0.333333 -274 338 0.333333 -275 277 -0.066667 -275 278 0.733333 -275 279 1.666667 -275 280 -0.466667 -275 339 -0.733333 -276 277 -0.333333 -276 278 0.866667 -276 279 -1.000000 -276 280 1.000000 -276 340 1.000000 -277 285 -0.333333 -278 286 -0.733333 -279 287 -0.333333 -280 288 -0.066667 -281 285 0.733333 -281 286 0.200000 -281 287 -0.600000 -281 288 -0.466667 -281 345 1.000000 -282 285 -0.866667 -282 286 0.333333 -282 287 0.200000 -282 288 0.600000 -282 346 0.200000 -283 285 0.866667 -283 286 -0.600000 -283 287 -1.666667 -283 288 0.466667 -283 347 -0.466667 -284 285 -0.066667 -284 286 1.000000 -284 287 0.733333 -284 288 1.000000 -284 348 -0.200000 -285 293 0.066667 -286 294 -0.866667 -287 295 0.733333 -288 296 0.333333 -289 293 1.000000 -289 294 0.466667 -289 295 -0.200000 -289 296 0.733333 -289 353 0.866667 -290 293 -1.000000 -290 294 -1.000000 -290 295 -0.600000 -290 296 0.333333 -290 354 -0.466667 -291 293 -2.333333 -291 294 0.600000 -291 295 -0.733333 -291 296 0.466667 -291 355 -3.666667 -292 293 -0.600000 -292 294 -0.600000 -292 295 0.600000 -292 296 -0.466667 -292 356 -0.200000 -293 301 -0.733333 -294 302 -0.466667 -295 303 -1.000000 -296 304 1.000000 -297 301 -1.000000 -297 302 0.600000 -297 303 0.466667 -297 304 -0.333333 -297 361 -0.200000 -298 301 0.066667 -298 302 0.200000 -298 303 0.600000 -298 304 -0.200000 -298 362 0.066667 -299 301 -0.866667 -299 302 -0.066667 -299 303 -1.000000 -299 304 -0.866667 -299 363 0.600000 -300 301 -0.866667 -300 302 0.200000 -300 303 0.466667 -300 304 0.466667 -300 364 0.733333 -301 309 -0.066667 -302 310 0.733333 -303 311 -0.733333 -304 312 -1.000000 -305 309 -1.000000 -305 310 -0.066667 -305 311 0.066667 -305 312 0.733333 -305 369 0.200000 -306 309 -1.000000 -306 310 -0.733333 -306 311 -1.000000 -306 312 0.066667 -306 370 -0.600000 -307 309 -0.733333 -307 310 -0.733333 -307 311 -0.333333 -307 312 -0.733333 -307 371 -0.733333 -308 309 0.333333 -308 310 -0.866667 -308 311 -1.000000 -308 312 -0.333333 -308 372 -3.000000 -309 317 -1.000000 -310 318 -0.066667 -311 319 -0.733333 -312 320 -0.333333 -313 317 -1.000000 -313 318 -0.600000 -313 319 -1.000000 -313 320 0.333333 -313 377 -0.733333 -314 317 3.000000 -314 318 0.333333 -314 319 -0.733333 -314 320 0.733333 -314 378 -0.466667 -315 317 -0.333333 -315 318 -0.466667 -315 319 0.733333 -315 320 0.866667 -315 379 -3.666667 -316 317 0.466667 -316 318 1.666667 -316 319 1.000000 -316 320 -1.666667 -316 380 -0.866667 -321 325 0.733333 -321 326 -0.466667 -321 327 -0.066667 -321 328 -0.866667 -321 385 0.600000 -322 325 0.333333 -322 326 -0.066667 -322 327 0.200000 -322 328 0.333333 -322 386 -0.466667 -323 325 0.866667 -323 326 -0.333333 -323 327 0.600000 -323 328 -2.333333 -323 387 -0.466667 -324 325 0.866667 -324 326 0.333333 -324 327 -0.600000 -324 328 0.200000 -324 388 -0.200000 -325 333 0.600000 -326 334 -0.200000 -327 335 -0.466667 -328 336 -1.000000 -329 333 0.866667 -329 334 0.333333 -329 335 0.600000 -329 336 0.333333 -329 393 0.333333 -330 333 0.066667 -330 334 -0.333333 -330 335 0.200000 -330 336 -0.466667 -330 394 -0.466667 -331 333 1.000000 -331 334 0.066667 -331 335 0.333333 -331 336 -0.066667 -331 395 -0.600000 -332 333 -0.333333 -332 334 0.600000 -332 335 -0.733333 -332 336 -0.600000 -332 396 -0.466667 -333 341 -0.866667 -334 342 0.733333 -335 343 0.066667 -336 344 0.333333 -337 341 -1.000000 -337 342 -0.333333 -337 343 -0.066667 -337 344 -0.333333 -337 401 0.333333 -338 341 -1.000000 -338 342 0.600000 -338 343 -0.866667 -338 344 0.200000 -338 402 -0.600000 -339 341 0.066667 -339 342 -1.000000 -339 343 -0.466667 -339 344 0.600000 -339 403 -0.466667 -340 341 0.866667 -340 342 -0.866667 -340 343 0.600000 -340 344 0.866667 -340 404 0.066667 -341 349 1.000000 -342 350 0.866667 -343 351 -0.200000 -344 352 0.733333 -345 349 0.066667 -345 350 -0.866667 -345 351 0.866667 -345 352 -0.333333 -345 409 -0.733333 -346 349 -0.600000 -346 350 0.466667 -346 351 0.066667 -346 352 1.000000 -346 410 -0.600000 -347 349 -0.333333 -347 350 -1.000000 -347 351 -0.600000 -347 352 -5.000000 -347 411 1.000000 -348 349 0.866667 -348 350 0.600000 -348 351 -0.466667 -348 352 0.466667 -348 412 0.600000 -349 357 1.000000 -350 358 -0.333333 -351 359 0.333333 -352 360 0.066667 -353 357 0.600000 -353 358 4.333333 -353 359 0.333333 -353 360 -0.866667 -353 417 0.466667 -354 357 0.333333 -354 358 0.200000 -354 359 0.866667 -354 360 -0.866667 -354 418 -0.200000 -355 357 -0.200000 -355 358 -0.866667 -355 359 0.333333 -355 360 0.066667 -355 419 5.000000 -356 357 1.000000 -356 358 -0.066667 -356 359 0.333333 -356 360 -0.866667 -356 420 -0.333333 -357 365 0.866667 -358 366 -0.200000 -359 367 -0.333333 -360 368 0.866667 -361 365 -0.600000 -361 366 -0.466667 -361 367 -3.666667 -361 368 -0.600000 -361 425 0.600000 -362 365 0.200000 -362 366 -0.733333 -362 367 -0.466667 -362 368 1.000000 -362 426 -0.866667 -363 365 -0.866667 -363 366 0.866667 -363 367 -0.600000 -363 368 -0.866667 -363 427 2.333333 -364 365 -0.200000 -364 366 0.066667 -364 367 -0.866667 -364 368 0.600000 -364 428 -1.000000 -365 373 0.466667 -366 374 -0.733333 -367 375 0.466667 -368 376 -3.666667 -369 373 -0.733333 -369 374 0.066667 -369 375 0.066667 -369 376 -0.600000 -369 433 1.666667 -370 373 0.733333 -370 374 -0.466667 -370 375 0.466667 -370 376 -0.066667 -370 434 0.466667 -371 373 -0.066667 -371 374 0.733333 -371 375 -0.200000 -371 376 0.333333 -371 435 1.000000 -372 373 -0.600000 -372 374 0.733333 -372 375 0.866667 -372 376 0.733333 -372 436 -0.333333 -373 381 0.200000 -374 382 -0.733333 -375 383 0.600000 -376 384 0.333333 -377 381 -0.333333 -377 382 -0.200000 -377 383 -0.066667 -377 384 0.733333 -377 441 -0.066667 -378 381 0.066667 -378 382 0.333333 -378 383 0.733333 -378 384 0.733333 -378 442 0.466667 -379 381 -0.200000 -379 382 -0.600000 -379 383 0.066667 -379 384 -0.066667 -379 443 0.333333 -380 381 -0.333333 -380 382 -0.200000 -380 383 0.333333 -380 384 0.200000 -380 444 0.333333 -385 389 0.733333 -385 390 0.866667 -385 391 0.600000 -385 392 -0.066667 -385 449 0.333333 -386 389 -3.000000 -386 390 0.333333 -386 391 -0.333333 -386 392 0.866667 -386 450 0.866667 -387 389 0.733333 -387 390 -0.600000 -387 391 0.466667 -387 392 0.066667 -387 451 0.466667 -388 389 -1.000000 -388 390 -4.333333 -388 391 -0.066667 -388 392 1.666667 -388 452 4.333333 -389 397 -0.600000 -390 398 -0.466667 -391 399 -1.000000 -392 400 5.000000 -393 397 3.666667 -393 398 -0.066667 -393 399 -0.466667 -393 400 -0.066667 -393 457 -0.466667 -394 397 -0.733333 -394 398 -0.333333 -394 399 -0.466667 -394 400 -0.600000 -394 458 -0.066667 -395 397 -0.733333 -395 398 0.866667 -395 399 0.733333 -395 400 -0.200000 -395 459 -0.600000 -396 397 -2.333333 -396 398 -0.333333 -396 399 -1.000000 -396 400 1.666667 -396 460 0.066667 -397 405 2.333333 -398 406 0.200000 -399 407 0.466667 -400 408 -1.000000 -401 405 -1.666667 -401 406 -0.466667 -401 407 -1.666667 -401 408 -0.733333 -401 465 -0.600000 -402 405 -3.666667 -402 406 5.000000 -402 407 -0.200000 -402 408 -1.000000 -402 466 0.200000 -403 405 0.733333 -403 406 -0.466667 -403 407 3.666667 -403 408 0.333333 -403 467 -0.733333 -404 405 -0.066667 -404 406 0.066667 -404 407 3.000000 -404 408 0.600000 -404 468 -0.866667 -405 413 0.466667 -406 414 0.600000 -407 415 0.600000 -408 416 0.466667 -409 413 0.733333 -409 414 -0.333333 -409 415 -0.733333 -409 416 0.333333 -409 473 -0.466667 -410 413 0.200000 -410 414 -0.200000 -410 415 0.466667 -410 416 0.200000 -410 474 0.200000 -411 413 1.000000 -411 414 0.200000 -411 415 -0.333333 -411 416 -0.866667 -411 475 0.866667 -412 413 -0.200000 -412 414 3.000000 -412 415 -0.333333 -412 416 -1.000000 -412 476 0.200000 -413 421 0.466667 -414 422 -1.000000 -415 423 1.000000 -416 424 -0.333333 -417 421 -0.600000 -417 422 0.066667 -417 423 -0.733333 -417 424 0.066667 -417 481 3.666667 -418 421 -0.200000 -418 422 -0.333333 -418 423 0.200000 -418 424 -0.866667 -418 482 0.066667 -419 421 0.466667 -419 422 -1.000000 -419 423 -0.866667 -419 424 -1.000000 -419 483 -0.600000 -420 421 -0.733333 -420 422 -0.733333 -420 423 0.333333 -420 424 0.200000 -420 484 1.000000 -421 429 0.066667 -422 430 0.733333 -423 431 -4.333333 -424 432 -0.200000 -425 429 0.466667 -425 430 -0.600000 -425 431 -0.333333 -425 432 -0.066667 -425 489 -4.333333 -426 429 -0.333333 -426 430 0.733333 -426 431 0.333333 -426 432 -0.333333 -426 490 -0.066667 -427 429 0.466667 -427 430 0.733333 -427 431 3.666667 -427 432 -0.866667 -427 491 -0.333333 -428 429 0.600000 -428 430 -0.600000 -428 431 -0.066667 -428 432 -1.000000 -428 492 -0.866667 -429 437 0.066667 -430 438 -0.200000 -431 439 0.200000 -432 440 0.333333 -433 437 -0.333333 -433 438 -0.600000 -433 439 0.600000 -433 440 -1.000000 -433 497 2.333333 -434 437 -0.333333 -434 438 0.866667 -434 439 0.866667 -434 440 5.000000 -434 498 0.333333 -435 437 -0.466667 -435 438 0.466667 -435 439 -0.600000 -435 440 -0.466667 -435 499 -0.200000 -436 437 0.866667 -436 438 -1.000000 -436 439 5.000000 -436 440 0.733333 -436 500 1.666667 -437 445 0.866667 -438 446 1.000000 -439 447 0.733333 -440 448 3.666667 -441 445 -0.466667 -441 446 -0.333333 -441 447 -0.600000 -441 448 -0.733333 -441 505 0.733333 -442 445 0.866667 -442 446 0.200000 -442 447 -0.066667 -442 448 -0.200000 -442 506 -0.733333 -443 445 4.333333 -443 446 0.200000 -443 447 -1.000000 -443 448 4.333333 -443 507 0.333333 -444 445 -0.733333 -444 446 1.000000 -444 447 0.866667 -444 448 0.200000 -444 508 0.066667 -449 453 0.866667 -449 454 -2.333333 -449 455 0.866667 -449 456 0.333333 -450 453 0.333333 -450 454 -0.066667 -450 455 1.000000 -450 456 -0.333333 -451 453 0.066667 -451 454 0.600000 -451 455 0.600000 -451 456 0.066667 -452 453 -1.000000 -452 454 0.866667 -452 455 0.733333 -452 456 0.066667 -453 461 -0.333333 -454 462 -1.000000 -455 463 -0.866667 -456 464 2.333333 -457 461 -1.000000 -457 462 0.866667 -457 463 -0.066667 -457 464 -1.000000 -458 461 0.733333 -458 462 0.466667 -458 463 -0.600000 -458 464 -0.866667 -459 461 0.066667 -459 462 1.000000 -459 463 0.066667 -459 464 0.066667 -460 461 -0.333333 -460 462 -0.600000 -460 463 0.466667 -460 464 -0.200000 -461 469 0.333333 -462 470 1.000000 -463 471 -0.333333 -464 472 0.200000 -465 469 3.666667 -465 470 4.333333 -465 471 1.000000 -465 472 5.000000 -466 469 3.666667 -466 470 -0.333333 -466 471 0.333333 -466 472 0.600000 -467 469 5.000000 -467 470 0.333333 -467 471 0.866667 -467 472 -1.666667 -468 469 0.466667 -468 470 0.333333 -468 471 -5.000000 -468 472 -0.866667 -469 477 0.200000 -470 478 -0.866667 -471 479 0.466667 -472 480 0.333333 -473 477 -0.200000 -473 478 -0.733333 -473 479 0.200000 -473 480 0.466667 -474 477 0.866667 -474 478 0.600000 -474 479 -0.333333 -474 480 -0.066667 -475 477 0.866667 -475 478 0.733333 -475 479 -0.600000 -475 480 -0.333333 -476 477 0.466667 -476 478 -0.733333 -476 479 -0.066667 -476 480 -0.066667 -477 485 0.200000 -478 486 -1.000000 -479 487 0.733333 -480 488 0.466667 -481 485 -0.066667 -481 486 -3.666667 -481 487 0.733333 -481 488 -0.333333 -482 485 -0.866667 -482 486 -0.733333 -482 487 5.000000 -482 488 0.466667 -483 485 -0.733333 -483 486 -0.200000 -483 487 -0.333333 -483 488 -4.333333 -484 485 0.733333 -484 486 -0.466667 -484 487 0.066667 -484 488 -0.200000 -485 493 -0.733333 -486 494 3.666667 -487 495 3.666667 -488 496 0.866667 -489 493 -3.666667 -489 494 0.466667 -489 495 0.333333 -489 496 -0.866667 -490 493 -0.733333 -490 494 -3.666667 -490 495 0.333333 -490 496 3.000000 -491 493 0.600000 -491 494 0.066667 -491 495 0.733333 -491 496 -0.466667 -492 493 -0.733333 -492 494 -0.333333 -492 495 5.000000 -492 496 0.200000 -493 501 -0.333333 -494 502 0.466667 -495 503 -0.333333 -496 504 0.333333 -497 501 -0.200000 -497 502 -1.000000 -497 503 0.466667 -497 504 -0.600000 -498 501 0.200000 -498 502 0.333333 -498 503 -1.000000 -498 504 -4.333333 -499 501 -0.733333 -499 502 -1.000000 -499 503 0.866667 -499 504 0.200000 -500 501 0.733333 -500 502 0.733333 -500 503 1.000000 -500 504 1.000000 -501 509 0.333333 -502 510 0.066667 -503 511 0.066667 -504 512 -0.333333 -505 509 -0.066667 -505 510 -0.200000 -505 511 -0.066667 -505 512 0.600000 -506 509 -0.333333 -506 510 0.866667 -506 511 0.333333 -506 512 0.333333 -507 509 -0.333333 -507 510 0.600000 -507 511 -0.866667 -507 512 1.000000 -508 509 0.333333 -508 510 0.066667 -508 511 0.200000 -508 512 -0.066667 \ No newline at end of file diff --git a/test/chimera_droplets/512power/groundstates_TN.txt b/test/chimera_droplets/512power/groundstates_TN.txt deleted file mode 100644 index 04a70c87..00000000 --- a/test/chimera_droplets/512power/groundstates_TN.txt +++ /dev/null @@ -1 +0,0 @@ -001.txt : -846.960000 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 1 1 0 0 1 0 1 1 1 1 0 0 1 0 1 0 0 0 1 1 1 1 1 1 0 1 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 0 1 1 0 1 0 1 0 0 1 0 1 1 0 1 0 0 1 1 0 1 1 0 0 0 0 1 0 1 0 1 1 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 1 1 0 1 1 1 0 0 1 0 0 1 0 1 0 1 0 1 0 0 0 1 0 1 0 0 1 1 0 1 1 0 0 0 1 0 1 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 1 0 0 1 0 0 1 1 1 1 0 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 1 0 0 0 1 1 1 0 0 0 1 0 1 0 1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 1 0 0 1 1 1 0 0 0 1 0 1 0 1 0 1 0 0 0 1 0 0 1 1 0 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 0 1 0 1 0 1 0 0 1 1 0 1 1 1 0 0 1 0 1 1 0 1 0 1 0 0 1 0 1 1 0 1 0 0 0 1 1 0 1 1 1 0 1 1 0 1 0 0 0 1 0 1 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 0 1 1 0 0 0 1 1 1 1 1 0 0 1 0 1 1 0 1 0 0 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 0 1 0 1 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 0 0 1 1 0 1 0 0 1 1 1 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 1 1 0 0 1 0 1 0 1 1 1 1 0 1 1 1 0 0 0 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 From 4704aaf446f338e10a0b5b475773e061963a3594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Ja=C5=82owiecki?= Date: Thu, 18 Feb 2021 23:56:17 +0100 Subject: [PATCH 109/110] Remove show, display and println from tests and benchmarks --- benchmarks/indexing_example_short.jl | 14 +------- test/compressions.jl | 12 ------- test/cuda/compressions.jl | 50 +++++++++++----------------- test/ising.jl | 13 -------- 4 files changed, 20 insertions(+), 69 deletions(-) diff --git a/benchmarks/indexing_example_short.jl b/benchmarks/indexing_example_short.jl index 42a0ea71..b22c64af 100644 --- a/benchmarks/indexing_example_short.jl +++ b/benchmarks/indexing_example_short.jl @@ -23,19 +23,7 @@ function make_particular_tensors(D) A1ex, A2ex, C end -function show_dificult_example(C, fg) - - println("states of T1 ", get_prop(fg, 1, :spectrum).states) - println("x") - println("states of T2 ", get_prop(fg, 2, :spectrum).states) - println("D2, tensor with beta = 1") - display(C) - println() - - println("D2, tensor with beta = $β") - display(C.^β) - println() -end + @testset "Test if the solution of the tensor agreeds with the BF" begin diff --git a/test/compressions.jl b/test/compressions.jl index d2795575..4595981f 100644 --- a/test/compressions.jl +++ b/test/compressions.jl @@ -15,14 +15,12 @@ T = Float64 @testset "Canonisation (left)" begin canonise!(ψ, :left) - show(ψ) @test is_left_normalized(ψ) @test dot(ψ, ψ) ≈ 1 end @testset "Canonisation (right)" begin canonise!(ϕ, :right) - show(ϕ) @test is_right_normalized(ϕ) @test dot(ϕ, ϕ) ≈ 1 end @@ -33,19 +31,16 @@ end @testset "Canonisation (both)" begin canonise!(χ) - show(χ) @test dot(χ, χ) ≈ 1 end @testset "Truncation (SVD, right)" begin truncate!(ψ, :right, Dcut) - show(ψ) @test dot(ψ, ψ) ≈ 1 end @testset "Truncation (SVD, left)" begin truncate!(ψ, :left, Dcut) - show(ψ) @test dot(ψ, ψ) ≈ 1 end @@ -74,19 +69,12 @@ end Ψ = compress(Φ, Dcut, tol, max_sweeps) - show(Ψ) @test dot(Ψ, Ψ) ≈ 1 - println("(Ψ, Ψ) = ", dot(Ψ, Ψ)) - println("(Φ, Φ) = ", dot(Φ, Φ)) - overlap = dot(Ψ, Φ) dist1 = 2 - 2 * abs(overlap) dist2 = norm(Ψ)^2 + norm(Φ)^2 - 2 * abs(overlap) @test abs(dist1 - dist2) < 1e-14 - - println("(Φ, Ψ) = ", overlap) - println("dist(Φ, Ψ)^2 = ", dist2) end end diff --git a/test/cuda/compressions.jl b/test/cuda/compressions.jl index 0813606a..662d3f2c 100644 --- a/test/cuda/compressions.jl +++ b/test/cuda/compressions.jl @@ -14,9 +14,8 @@ T = Float32 Φ = CUDA.randn(CuMPS{T}, sites, D, d) @testset "Canonisation (left)" begin - canonise!(ψ, :left) - show(ψ) - + canonise!(ψ, :left) + is_left_normalized = true for i ∈ 1:length(ψ) A = ψ[i] @@ -24,15 +23,14 @@ T = Float32 @cutensor Id[x, y] := conj(A[α, σ, x]) * A[α, σ, y] order = (α, σ) is_left_normalized *= norm(Id - cu(I(DD))) < 1e-5 - end + end - @test is_left_normalized - @test dot(ψ, ψ) ≈ 1 + @test is_left_normalized + @test dot(ψ, ψ) ≈ 1 end @testset "Canonisation (right)" begin - canonise!(ϕ, :right) - show(ϕ) + canonise!(ϕ, :right) is_right_normalized = true for i ∈ 1:length(ϕ) @@ -41,10 +39,10 @@ end @cutensor Id[x, y] := B[x, σ, α] * conj(B[y, σ, α]) order = (α, σ) is_right_normalized *= norm(Id - cu(I(DD))) < 1e-5 - end + end - @test is_right_normalized - @test dot(ϕ, ϕ) ≈ 1 + @test is_right_normalized + @test dot(ϕ, ϕ) ≈ 1 end @testset "Cauchy-Schwarz inequality (after truncation)" begin @@ -52,21 +50,18 @@ end end @testset "Canonisation (both)" begin - canonise!(χ) - show(χ) - @test dot(χ, χ) ≈ 1 + canonise!(χ) + @test dot(χ, χ) ≈ 1 end @testset "Truncation (SVD, right)" begin - truncate!(ψ, :right, Dcut) - show(ψ) - @test dot(ψ, ψ) ≈ 1 + truncate!(ψ, :right, Dcut) + @test dot(ψ, ψ) ≈ 1 end @testset "Truncation (SVD, left)" begin - truncate!(ψ, :left, Dcut) - show(ψ) - @test dot(ψ, ψ) ≈ 1 + truncate!(ψ, :left, Dcut) + @test dot(ψ, ψ) ≈ 1 end @testset "Variational compression" begin @@ -75,24 +70,17 @@ end max_sweeps = 5 canonise!(Φ, :right) - @test dot(Φ, Φ) ≈ 1 + @test dot(Φ, Φ) ≈ 1 - Ψ = compress(Φ, Dcut, tol, max_sweeps) + Ψ = compress(Φ, Dcut, tol, max_sweeps) - show(Ψ) - @test dot(Ψ, Ψ) ≈ 1 - - println("(Ψ, Ψ) = ", dot(Ψ, Ψ)) - println("(Φ, Φ) = ", dot(Φ, Φ)) + @test dot(Ψ, Ψ) ≈ 1 overlap = dot(Ψ, Φ) dist1 = 2 - 2 * real(overlap) dist2 = norm(Ψ)^2 + norm(Φ)^2 - 2 * real(overlap) @test abs(dist1 - dist2) < 1e-5 - - println("(Φ, Ψ) = ", overlap) - println("dist(Φ, Ψ)^2 = ", dist2) end -end \ No newline at end of file +end diff --git a/test/ising.jl b/test/ising.jl index 48940e5f..ed69e93e 100644 --- a/test/ising.jl +++ b/test/ising.jl @@ -189,13 +189,6 @@ end E = get_prop(ig, :energy) - println(ig) - println("energy: $E") - - for spin ∈ vertices(ig) - println("neighbors of spin $spin are: ", neighbors(ig, spin) ) - end - @test nv(ig) == N for i ∈ 1:N @@ -203,8 +196,6 @@ end end A = adjacency_matrix(ig) - display(Matrix{Int}(A)) - println(" ") B = zeros(Int, N, N) for i ∈ 1:N @@ -224,10 +215,6 @@ end sp = brute_force(ig, num_states=k) s = 5 - display(sp.states[1:s]) - println(" ") - display(sp.energies[1:s]) - println(" ") @test sp.energies ≈ energy.(sp.states, Ref(ig)) From c2c6de7d20829e4fc270dd551ba30f64ea5129b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Ja=C5=82owiecki?= Date: Thu, 18 Feb 2021 23:56:38 +0100 Subject: [PATCH 110/110] Restore list of test files --- test/runtests.jl | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index c4f340f1..91aea888 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -30,22 +30,16 @@ end include("test_helpers.jl") push!(my_tests, -"MPS_search.jl", -#= "base.jl", "utils.jl", "contractions.jl", "compressions.jl", "identities.jl", "ising.jl", - "indexing.jl", - "searchMPS.jl", "MPS_search.jl", "factor.jl", "PEPS.jl", "contract.jl", - "indexing.jl", - =# ) for my_test in my_tests