Skip to content

Commit

Permalink
Renaming for descriptiveness (#29)
Browse files Browse the repository at this point in the history
* add example for the paper

* rename params in MpsParameters

* rm MPSAnnealing, ctr.beta is now a scalar instead of a vector

* clean up

* clean up

* clean up

* kwargs in SingleLayerDroplets

* clean up

* rename

* new branch from paper

* change version

* bump version

---------

Co-authored-by: Bartek <[email protected]>
Co-authored-by: Łukasz Pawela <[email protected]>
  • Loading branch information
3 people authored Sep 3, 2024
1 parent 390c53d commit 129dc19
Show file tree
Hide file tree
Showing 43 changed files with 320 additions and 481 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SpinGlassEngine"
uuid = "0563570f-ea1b-4080-8a64-041ac6565a4e"
authors = ["Anna Maria Dziubyna <[email protected]>", "Tomasz Śmierzchalski <[email protected]>", "Bartłomiej Gardas <[email protected]>", "Konrad Jałowiecki <[email protected]>", "Łukasz Pawela <[email protected]>", "Marek M. Rams <[email protected]>"]
version = "1.3.0"
version = "1.4.0"

[deps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Expand Down
5 changes: 0 additions & 5 deletions docs/src/params.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ SearchParameters
In the boundary MPS-MPO approach we apply Matrix Product Operator (MPO) to appropriate sites of Matrix Product State (MPS). In this context, the absorption of a MPO into a MPS leads to an exponential growth of the bond dimension. Hence, a truncation scheme is necessary to mitigate this issue and to keep the bond dimension in a reasonable size.
Our package offers users the flexibility to choose between three distinct methods for optimizing the boundary MPS used in contracting the tensor network:
* `Zipper`
* `MPSAnnealing`
* `SVDTruncate`.
`Zipper` method combines randomized truncated Singular Value Decomposition (SVD) and a variational scheme.
```@raw html
Expand All @@ -25,10 +24,6 @@ With the `SVDTruncate` method, the Matrix Product State (MPS) is systematically
```@raw html
<img src="../images/svd_truncate.png" width="50%" class="center"/>
```
On the other hand, the `MPSAnnealing` method tailors the construction of MPS based on variational compression.
```@raw html
<img src="../images/annealing.png" width="50%" class="center"/>
```

# Sparsity
Our software package acknowledges the importance of two fundamental methodologies in tensor processing
Expand Down
9 changes: 4 additions & 5 deletions examples/pegasus.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@ function bench(instance::String, β::Real, bond_dim::Integer, num_states::Intege

dE = 3.0
δp = exp(-β * dE)
all_betas =/ 8, β / 4, β / 2, β]

potts_h = potts_hamiltonian(
ising_graph(instance),
spectrum = my_brute_force,
cluster_assignment_rule = pegasus_lattice((m, n, t)),
)

params = MpsParameters{Float64}(; bd = bond_dim, ϵ = 1E-8, sw = 4, ts = 1E-16)
search_params = SearchParameters(; max_states = num_states, cut_off_prob = δp)
params = MpsParameters{Float64}(; bond_dim = bond_dim, var_tol = 1E-8, num_sweeps = 4, tol_SVD = 1E-16)
search_params = SearchParameters(; max_states = num_states, cutoff_prob = δp)
Strategy = Zipper
Sparsity = Sparse
Layout = GaugesEnergy
Expand All @@ -36,8 +35,8 @@ function bench(instance::String, β::Real, bond_dim::Integer, num_states::Intege
ctr = MpsContractor{Strategy,Gauge,Float64}(
net,
params;
βs = all_betas,
graduate_truncation = :graduate_truncate,
beta = β,
graduate_truncation = true,
onGPU = onGPU,
)

Expand Down
3 changes: 1 addition & 2 deletions examples/truncation_BP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Dcut = 8
tolV = 1E-16
tolS = 1E-16
max_sweeps = 0
indβ = 1
ITERS_SVD = 2
ITERS_VAR = 1
DTEMP_MULT = 2
Expand All @@ -43,7 +42,7 @@ params =
MpsParameters(Dcut, tolV, max_sweeps, tolS, ITERS_SVD, ITERS_VAR, DTEMP_MULT, METHOD)
search_params = SearchParameters(MAX_STATES, δp)

Strategy = Zipper # MPSAnnealing SVDTruncate
Strategy = Zipper # SVDTruncate
Layout = GaugesEnergy
Gauge = NoUpdate
cl_states = [2^10]
Expand Down
Loading

2 comments on commit 129dc19

@lpawela
Copy link
Member

@lpawela lpawela commented on 129dc19 Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/114433

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.4.0 -m "<description of version>" 129dc19489e8a2fcdef456851edacb2efcae6a81
git push origin v1.4.0

Please sign in to comment.