Skip to content

Commit

Permalink
small bug fix with gpu and typos (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsmierz authored Jan 13, 2025
1 parent 669dde8 commit 7bef603
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[deps]
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
SpinGlassPEPS = "2c514f87-1261-494e-8566-326879aaf4fe"
4 changes: 3 additions & 1 deletion examples/inpaining.jl → examples/inpainting.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using SpinGlassPEPS
using CUDA
using Pkg
using Logging

Expand All @@ -17,6 +18,7 @@ end
disable_logging(LogLevel(1))

instance = "$(@__DIR__)/instances/triplepoint4-plain-ring.h5"
onGPU = CUDA.has_cuda_gpu()

GEOMETRY = SquareSingleNode
LAYOUT = GaugesEnergy
Expand All @@ -30,7 +32,7 @@ function bench_inpaining(::Type{T}, β::Real, max_states::Integer, bond_dim::Int
params = MpsParameters{T}(; bond_dim = bond_dim, method = :svd)
search_params = SearchParameters(; max_states = max_states)
net = PEPSNetwork{GEOMETRY{LAYOUT}, SPARSITY, T}(120, 120, potts_h, rotation(0))
ctr = MpsContractor{STRATEGY, GAUGE, T}(net, params; onGPU = true, beta = convert(Float64, β), graduate_truncation = true)
ctr = MpsContractor{STRATEGY, GAUGE, T}(net, params; onGPU = onGPU, beta = convert(Float64, β), graduate_truncation = true)
droplets = SingleLayerDroplets(; max_energy = 100, min_size = 100 , metric = :hamming, mode=:RMF)
merge_strategy = merge_branches(ctr; merge_prob = :none, droplets_encoding = droplets)

Expand Down

0 comments on commit 7bef603

Please sign in to comment.