Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master to be -> master #13

Merged
merged 233 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
233 commits
Select commit Hold shift + click to select a range
23692e5
projectors in factor graph are 1-dimensional
annamariadziubyna Sep 8, 2021
551e0d1
clean up
annamariadziubyna Sep 9, 2021
772595f
new way of loading J and states
annamariadziubyna Oct 18, 2021
85ddacc
clean up
annamariadziubyna Oct 18, 2021
3529b97
add ! in decode_projector
annamariadziubyna Oct 20, 2021
87c574f
clean up
annamariadziubyna Oct 20, 2021
788e996
forma and clean up code
bartekGardas Nov 19, 2021
4c518db
clean up more
bartekGardas Nov 19, 2021
89885c1
formate code
bartekGardas Nov 19, 2021
46c8e30
clean up
bartekGardas Dec 2, 2021
26e1865
add test full_pegasus
annamariadziubyna Dec 3, 2021
fed72d3
brodcast all_states
bartekGardas Dec 3, 2021
e48c3e6
Merge branch 'projectors' of github.com:euro-hpc-pl/SpinGlassNetworks…
bartekGardas Dec 3, 2021
e52b042
add instances and example for Lukasz
bartekGardas Dec 3, 2021
5f2841e
add benchmarks
bartekGardas Dec 3, 2021
1a608b8
correct a type
bartekGardas Dec 3, 2021
d915c2c
clean up
bartekGardas Dec 3, 2021
4a8d876
correct typo
bartekGardas Dec 3, 2021
80ac202
simplify spectrum.jl
bartekGardas Dec 3, 2021
1355ae3
remove decode_projector
annamariadziubyna Dec 3, 2021
18e017f
threaded spectrum works
bartekGardas Dec 4, 2021
ab2c9db
clean up
bartekGardas Dec 4, 2021
8168283
Merge branch 'projectors' of github.com:euro-hpc-pl/SpinGlassNetworks…
bartekGardas Dec 4, 2021
fc028fe
clean up
bartekGardas Dec 4, 2021
838fef5
add rudementary gpu brute force
lpawela Dec 4, 2021
d4f3bc0
clen up
bartekGardas Dec 4, 2021
8979588
Merge branch 'projectors' of github.com:euro-hpc-pl/SpinGlassNetworks…
bartekGardas Dec 4, 2021
30ab077
rm commented functions
bartekGardas Dec 4, 2021
73d38e9
fix binary conversion
lpawela Dec 4, 2021
cdf96b7
Merge branch 'projectors' of github.com:iitis/SpinGlassNetworks.jl in…
lpawela Dec 4, 2021
2b94987
add sortperm (requires cuda from master)
lpawela Dec 4, 2021
370f370
compare energies
bartekGardas Dec 4, 2021
833f3de
Merge branch 'projectors' of github.com:euro-hpc-pl/SpinGlassNetworks…
bartekGardas Dec 4, 2021
fc8a82a
add my_digits
bartekGardas Dec 5, 2021
9d6e9d2
add new kernel (still does not work, but close)
bartekGardas Dec 5, 2021
9291cc3
something works
bartekGardas Dec 5, 2021
fc8eb28
fix bits
bartekGardas Dec 5, 2021
510840e
should work but it does not
bartekGardas Dec 5, 2021
c6c5c47
gnoj
bartekGardas Dec 5, 2021
9e4c86b
fix indexing
bartekGardas Dec 5, 2021
7b06365
improve stuff a bit but still :(
bartekGardas Dec 5, 2021
041ef76
almost there
bartekGardas Dec 5, 2021
405af9e
fix issues with Spectrum
bartekGardas Dec 5, 2021
df6c0d4
works
bartekGardas Dec 5, 2021
c842f28
check all states
bartekGardas Dec 5, 2021
47787d0
all work
bartekGardas Dec 5, 2021
0d7b5c1
clean up
bartekGardas Dec 5, 2021
0d64212
add more control over CUDA lauch
bartekGardas Dec 5, 2021
5ebfd6a
all tests pass
bartekGardas Dec 5, 2021
0836080
add specializiation for brute_force devices
lpawela Dec 6, 2021
47e9c22
clean up
bartekGardas Dec 6, 2021
cd3fab9
clean up
bartekGardas Dec 7, 2021
e8b12a2
clean up energy mess
bartekGardas Dec 7, 2021
b176c42
clean up tests
bartekGardas Dec 7, 2021
fe15645
clean up 2
bartekGardas Dec 7, 2021
668b4c9
clean up benchmarks
bartekGardas Dec 7, 2021
b4ab708
clean factor.jl
bartekGardas Dec 7, 2021
73cfe5c
introducing Pegasus geometry
marekrams Dec 9, 2021
7a5f65a
clean up pegasus_lattice
bartekGardas Dec 9, 2021
2622b89
towards new pegasus geometry
marekrams Dec 10, 2021
b3ecd0b
new indexing of pegasus lattice
marekrams Dec 21, 2021
2efd070
clean up
bartekGardas Dec 21, 2021
e8a86e0
add energy
bartekGardas Dec 23, 2021
d540ece
fix up
bartekGardas Dec 23, 2021
b12f361
energy in factor
marekrams Dec 23, 2021
2587379
fix energy
bartekGardas Dec 23, 2021
889e9f2
clean up
bartekGardas Dec 23, 2021
b17b9f7
clean up
bartekGardas Dec 23, 2021
7ff9d00
add comment
bartekGardas Dec 23, 2021
abe2c36
fix
bartekGardas Dec 23, 2021
72b54df
ecv
bartekGardas Dec 23, 2021
3ad8684
energy fg to fix
marekrams Dec 23, 2021
068000e
Merge branch 'projectors' of github.com:euro-hpc-pl/SpinGlassNetworks…
bartekGardas Dec 23, 2021
dcff7ca
add energy for factor graph
bartekGardas Dec 23, 2021
526edad
add energy
bartekGardas Dec 23, 2021
bdb082c
add energy
bartekGardas Dec 23, 2021
64552e1
Merge branch 'projectors' of github.com:euro-hpc-pl/SpinGlassNetworks…
bartekGardas Dec 23, 2021
6bbdba5
fix energy
bartekGardas Dec 23, 2021
787fe3c
add changes for 1.7
bartekGardas Jan 11, 2022
48126ac
add energy from factor graph
annamariadziubyna Jan 19, 2022
d8b3083
clean up energy
bartekGardas Jan 19, 2022
c322836
energy works
annamariadziubyna Jan 19, 2022
2723413
cleam up
bartekGardas Jan 19, 2022
71f0da5
Merge branch 'projectors' of github.com:euro-hpc-pl/SpinGlassNetworks…
bartekGardas Jan 19, 2022
b35a373
clean up
bartekGardas Jan 19, 2022
b72d748
simplify energy for fg
bartekGardas Jan 19, 2022
d416026
clean up energy
bartekGardas Jan 19, 2022
074f45a
energy
annamariadziubyna Jan 20, 2022
83f47f9
fix energy for fg
bartekGardas Jan 20, 2022
4d1c2b4
Merge branch 'projectors' of github.com:euro-hpc-pl/SpinGlassNetworks…
bartekGardas Jan 20, 2022
bf443cd
clear types and add cluster_size for fg
bartekGardas Jan 25, 2022
47dd623
test
bartekGardas Jan 27, 2022
1105220
start documenting code
annamariadziubyna Feb 10, 2022
7bcb4eb
start commenting code
bartekGardas Feb 10, 2022
d7a06a7
fixing pegasus conventions
marekrams Jun 9, 2022
525d242
begin writing tests for numbering functions
tomsmierz Jun 14, 2022
a23bc62
Merge branch 'proj' of https://github.com/euro-hpc-pl/SpinGlassNetwor…
tomsmierz Jun 14, 2022
99e1d6a
begun rewriting code wrom python
tomsmierz Jun 14, 2022
d2d0810
tests for written functions
tomsmierz Jun 14, 2022
dd8c976
all main functions for numerate
tomsmierz Jun 15, 2022
4229e88
add ref
bartekGardas Jun 15, 2022
993cca8
clean up
bartekGardas Jun 15, 2022
ee62686
clean up
bartekGardas Jun 21, 2022
1e93bdc
add pegasus_lattice_masoud
annamariadziubyna Jun 29, 2022
2c3d626
add pegasus_lattice_tomek
annamariadziubyna Jun 30, 2022
4d70c3e
early work on zephyr lattice
tomsmierz Jul 1, 2022
5be4fcf
zephyr lattice (Z1)
tomsmierz Jul 5, 2022
34b75a0
started work on zephyr lattice boundary
tomsmierz Jul 7, 2022
ecc343b
clean up Z1
annamariadziubyna Jul 7, 2022
3683651
horizontal spins in zephyr
tomsmierz Jul 11, 2022
4eda736
zephyr_to_linear, linear_to_zephy
tomsmierz Jul 12, 2022
0a21d70
started work on lattice_5_tuple
tomsmierz Jul 12, 2022
fac1077
zephyr lattice Z2 square
annamariadziubyna Jul 14, 2022
4a98da6
fix bug
annamariadziubyna Jul 14, 2022
ee3e168
zephyr lattice rotated works for z1 and z2
annamariadziubyna Jul 14, 2022
3711b81
clean up
annamariadziubyna Jul 14, 2022
96fecc5
add empty clusters in zephyr
annamariadziubyna Oct 11, 2022
ea5a683
add zephyr lattice
annamariadziubyna Jan 12, 2023
421620e
idea projectors
marekrams Jan 25, 2023
df61bac
aa
marekrams Jan 25, 2023
6446f51
correct syntax
bartekGardas Jan 25, 2023
2893fa4
add comments
bartekGardas Jan 25, 2023
cb25079
add periodic lattice (PBCs)
annamariadziubyna Feb 2, 2023
768fbc8
pool of projectors
marekrams Feb 3, 2023
aad83de
fg
marekrams Feb 3, 2023
624aa01
energy
marekrams Feb 3, 2023
25c580f
decode states in sampling
annamariadziubyna Feb 3, 2023
1fd6d7c
lp size
marekrams Feb 4, 2023
0bbbf19
remove PoolOfProjectors
marekrams Feb 8, 2023
041435c
no CUDA
marekrams Feb 8, 2023
d871d72
removed unnecessary functions
tomsmierz Feb 13, 2023
7d43d64
start working on a proper types propagation
bartekGardas Feb 25, 2023
1c016c8
clean up tests
bartekGardas Feb 25, 2023
0a0b3aa
restor tests
bartekGardas Feb 25, 2023
c602bed
fix a bug
bartekGardas Feb 25, 2023
d7fd942
clean up - all test pass
bartekGardas Feb 25, 2023
807a6f2
add more tests
bartekGardas Feb 25, 2023
b860068
rearange code a bit
bartekGardas Feb 25, 2023
1adc7a2
final clean up
bartekGardas Feb 25, 2023
e8f5882
add truncated factor graph
annamariadziubyna May 12, 2023
8c120d3
truncate factor graph another method
annamariadziubyna May 17, 2023
e785fcc
fix bug in truncate_factor_graph
marekrams May 19, 2023
75c6475
fix export truncate_factor_graph
marekrams May 19, 2023
b8c0c03
truncate_factor_graph partialsortperm
marekrams May 19, 2023
05945cf
precise truncate
marekrams Jun 2, 2023
dadd178
fix truncate factor
marekrams Jun 2, 2023
e1d14b1
repaired test of renumerations
tomsmierz Jun 16, 2023
89fc0c3
Truncate factor graph based on belief propagation
annamariadziubyna Jul 3, 2023
eaa7b88
Merge branch 'proj' of https://github.com/euro-hpc-pl/SpinGlassNetwor…
annamariadziubyna Jul 3, 2023
5b87520
iterations as a parameter in BP
annamariadziubyna Jul 3, 2023
0862725
remove println
annamariadziubyna Jul 3, 2023
fba84ad
clean belief propagation
annamariadziubyna Jul 7, 2023
9da752d
clean up BP
annamariadziubyna Jul 7, 2023
ffcb14c
belief propagation
annamariadziubyna Jul 7, 2023
58d02fb
remove println
annamariadziubyna Jul 7, 2023
7a0d5d3
BP tests
annamariadziubyna Jul 7, 2023
6093ff7
truncate_factor_graph_2site_BP
annamariadziubyna Jul 7, 2023
bc31b21
fix the bug in BP
annamariadziubyna Jul 17, 2023
2a66ff7
new BP
annamariadziubyna Jul 18, 2023
c1585d3
BP 2-site
annamariadziubyna Jul 20, 2023
b4ce768
rewrite update message, add tests
annamariadziubyna Jul 20, 2023
592037d
bp (pathological not working)
marekrams Jul 21, 2023
cb8b39e
bp example
annamariadziubyna Jul 21, 2023
af7de38
Merge branch 'proj' of https://github.com/euro-hpc-pl/SpinGlassNetwor…
annamariadziubyna Jul 21, 2023
93c8d6d
cleaning
marekrams Jul 21, 2023
de5fa92
clean bp
marekrams Jul 21, 2023
ed152c8
updatemessage
marekrams Jul 21, 2023
8aca68e
sparse
marekrams Jul 21, 2023
e5bbe62
bp
marekrams Jul 24, 2023
3652a90
separate truncation and BP
annamariadziubyna Aug 9, 2023
e9b2a8f
rm tol
annamariadziubyna Aug 9, 2023
e67c164
truncate fg for zephyr
annamariadziubyna Aug 16, 2023
42fe630
comment projectors
marekrams Aug 18, 2023
1982ba1
states_int in Spectrum
annamariadziubyna Aug 23, 2023
66bbc54
fix the bug in Spectrum, all tests pass
annamariadziubyna Aug 25, 2023
f3725a4
change types in matrix_to_integers
annamariadziubyna Aug 25, 2023
a2de583
rename factor_graph to clustered_hamiltonian
annamariadziubyna Sep 16, 2023
8ec1276
add bond energy
annamariadziubyna Sep 19, 2023
1bd2552
try to move PoolOfProjectors
annamariadziubyna Sep 19, 2023
a3d865b
add CUDA
annamariadziubyna Sep 20, 2023
5ace384
try to remove :pl, :pr
annamariadziubyna Sep 20, 2023
39a095f
PoolOfProjectors in clustered_hamiltonian
annamariadziubyna Sep 20, 2023
ea1e1d6
add tests on projectors
annamariadziubyna Sep 20, 2023
19b1545
final cleaning projectors
annamariadziubyna Sep 20, 2023
ceff03a
Merge remote-tracking branch 'origin/types' into master_types
annamariadziubyna Sep 21, 2023
d225be4
add types
annamariadziubyna Sep 22, 2023
12877c3
splitting overly long lines
annamariadziubyna Sep 23, 2023
e46d1bc
exception in states_int
annamariadziubyna Sep 25, 2023
1446790
add docs
annamariadziubyna Sep 27, 2023
69fedcf
docs
annamariadziubyna Sep 28, 2023
1614f46
add docstrings
annamariadziubyna Oct 2, 2023
425a4be
add $(TYPEDSIGNATURES)
annamariadziubyna Oct 3, 2023
6e69a70
split the lines
annamariadziubyna Oct 5, 2023
b984522
corrected the function names
tomsmierz Oct 13, 2023
0e420f4
clean up toml
bartekGardas Oct 27, 2023
9a0577a
added function for loading openGM images
tomsmierz Nov 15, 2023
c6030cd
WIP rmf
tomsmierz Nov 16, 2023
4008b7b
add the docs
annamariadziubyna Nov 17, 2023
caded78
rmf clustered hamiltonian v1.0
tomsmierz Nov 17, 2023
2c37b7b
add the docs
annamariadziubyna Nov 19, 2023
7290d96
bugfix
tomsmierz Nov 21, 2023
f54b926
fix the bug in RMF clustered hamiltonian
annamariadziubyna Nov 21, 2023
653ccd9
clean up cluster hamiltonian for RMF
annamariadziubyna Nov 21, 2023
5987b75
change cl_h spectrum
annamariadziubyna Nov 22, 2023
2ab5ce1
added sizes for benchmark instances and
tomsmierz Nov 22, 2023
a1aaf23
fix the bug in reading h5 instances
annamariadziubyna Nov 22, 2023
0eb5aac
add docs
annamariadziubyna Nov 23, 2023
d7311b4
add the docs
annamariadziubyna Nov 27, 2023
dc80211
add png images
annamariadziubyna Dec 19, 2023
003035c
moved projectors.jl to SpinGlassTensors
tomsmierz Dec 20, 2023
12b8213
moved tests
tomsmierz Dec 20, 2023
6204281
git push
lpawela Dec 20, 2023
1c4e41d
added SpinGlassTensors to dependencies
tomsmierz Dec 20, 2023
d0860f2
removed projectors.jl
tomsmierz Dec 20, 2023
11fdaab
Merge branch 'master_to_be' of https://github.com/euro-hpc-pl/SpinGla…
tomsmierz Dec 20, 2023
90b2b4c
changed version to 1.0
tomsmierz Dec 20, 2023
077dc0b
moved rank_reveal to SpinGlassTensors
tomsmierz Dec 21, 2023
e3d7148
save BP results to file
annamariadziubyna Jan 19, 2024
6b38307
rewrite truncate_hamiltonian_2site_BP
annamariadziubyna Jan 23, 2024
cfff407
clean up
annamariadziubyna Jan 25, 2024
9f3df85
correct test
annamariadziubyna Feb 4, 2024
11e45d4
fix versions, switch to Graphs from LightGraphs
lpawela Mar 6, 2024
3de25f7
reformat
lpawela Mar 6, 2024
c02c759
fix ci, make
lpawela Mar 29, 2024
664a1bb
update CI workflow
lpawela Apr 9, 2024
f8470a6
remove tensor cast
lpawela Apr 9, 2024
21086ff
add push run
lpawela Apr 9, 2024
516dabb
fix test
lpawela Apr 9, 2024
6a1e54c
update readme
lpawela Apr 9, 2024
330ebbd
move benchmarks to other repo
lpawela Apr 9, 2024
b7220f0
Merge branch 'master' into master_to_be
lpawela Apr 9, 2024
fd4b6b5
fix test
lpawela Apr 9, 2024
f1d2dff
update compat
lpawela Apr 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 13 additions & 20 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,41 @@
name: CI
on:
- push
- pull_request
pull_request:
branches:
- master
push:
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
name: Julia ${{ matrix.version }}
runs-on: [self-hosted,titan,gpu]
strategy:
fail-fast: false
matrix:
version:
- '1.9'
- '1.10'
os:
- ubuntu-latest
- macOS-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
env:
JULIA_NUM_THREADS: 4
- uses: julia-actions/julia-processcoverage@v1
# - uses: codecov/codecov-action@v1
# with:
# file: lcov.info
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: lcov.info
flag-name: job-${{ matrix.version }}-${{ matrix.os }}-${{ matrix.arch }}
parallel: true

flag-name: run-${{ matrix.version }}
finish:
needs: test
runs-on: ubuntu-latest
runs-on: [self-hosted,titan]
steps:
- uses: coverallsapp/github-action@master
- name: Close parallel build
uses: coverallsapp/github-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
carryforward: "run-1.9,run-1.10"
26 changes: 19 additions & 7 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
name = "SpinGlassNetworks"
uuid = "b7f6bd3e-55dc-4da6-96a9-ef9dbec6ac19"
authors = ["Krzysztof Domino <[email protected]>", "Anna Maria Dziubyna <annamariadziubyna@gmail.com>", "Bartłomiej Gardas <[email protected]>", "Konrad Jałowiecki <[email protected]>", "Łukasz Pawela <[email protected]>", "Marek M. Rams <[email protected]>"]
version = "0.3.2"
authors = ["Anna Maria Dziubyna <[email protected]>", "Tomasz Śmierzchalski <smierzchalski.tomek@gmail.com>", "Bartłomiej Gardas <[email protected]>", "Konrad Jałowiecki <[email protected]>", "Łukasz Pawela <[email protected]>", "Marek M. Rams <[email protected]>"]
version = "1.0.0"

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
LabelledGraphs = "605abd48-4d17-4660-b914-d4df33194460"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MKL = "33e6dc65-8f57-5167-99aa-e5a354878fb2"
MetaGraphs = "626554b9-1ddb-594c-aa3c-2596fe9399a5"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SpinGlassTensors = "7584fc6a-5a23-4eeb-8277-827aab0146ea"

[compat]
CSV = "0.8 - 0.10"
DocStringExtensions = "0.8"
Graphs = "1.9"
LabelledGraphs = "^0.4.4"
MetaGraphs = "0.7.2"
CSV = "0.8"
CUDA = "4.4"
DocStringExtensions = "0.9"
Graphs = "1.9.0"
HDF5 = "0.17"
JLD2 = "0.4"
LabelledGraphs = "0.4.4"
MKL = "0.4.2"
MetaGraphs = "0.7"
SparseArrays = "1.9"
SpinGlassTensors = "1"
julia = "1.9, 1.10"

[extras]
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[![Coverage Status](https://coveralls.io/repos/github/iitis/SpinGlassNetworks.jl/badge.svg?branch=master)](https://coveralls.io/github/iitis/SpinGlassNetworks.jl?branch=master)
# SpinGlassNetworks.jl
Part of SpinGlassPEPS package. It constitutes the basis for the preparation of tensors and operations on them.

We don't expect the user to interact with this package, as it is more of a "back-end" type. Nevertheless, we provide API references should the need arise.
18 changes: 10 additions & 8 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
using Documenter, SpinGlassNetworks

_pages = [
"Introduction" => "index.md",
"User guide" => "userguide.md",
"API Reference" => "api.md"
"Ising graph" => "ising.md",
"Lattice geometries" => "lattice.md",
"Clustered hamiltonian" => "clh.md",
"Local dimensional reduction" => "bp.md",
"API Reference for auxiliary functions" => "api.md",
]

# ============================
format = Documenter.HTML(edit_link = "master",
prettyurls = get(ENV, "CI", nothing) == "true",
)
format =
Documenter.HTML(edit_link = "master", prettyurls = get(ENV, "CI", nothing) == "true")

# format = Documenter.LaTeX(platform="none")

makedocs(
sitename="SpinGlassNetworks.jl",
sitename = "SpinGlassNetworks.jl",
modules = [SpinGlassNetworks],
pages = _pages,
format = format
)
format = format,
)
64 changes: 47 additions & 17 deletions docs/src/api.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,66 @@
# Library

---

```@meta
CurrentModule = SpinGlassNetworks
```

## Ising Graphs

```@docs
ising_graph
biases
couplings
cluster
inter_cluster_edges
prune
rank_vec
couplings
```

## Factor Graphs
## Clustered Hamiltonian
```@docs
split_into_clusters
decode_clustered_hamiltonian_state
rank_reveal
energy
energy_2site
cluster_size
bond_energy
exact_cond_prob
truncate_clustered_hamiltonian
```

## Belief propagation
```@docs
factor_graph
decode_factor_graph_state
local_energy
interaction_energy
get_neighbors
MergedEnergy
update_message
merge_vertices_cl_h
projector
SparseCSC
```

## Auxiliary Functions
## Projectors
```@docs
PoolOfProjectors
get_projector!
add_projector!
empty!
```

## Spectrum
```@docs
brute_force
energy
full_spectrum
Spectrum
matrix_to_integers
gibbs_tensor
rank_reveal
super_square_lattice
brute_force
```

## Truncate
```@docs
truncate_clustered_hamiltonian_1site_BP
truncate_clustered_hamiltonian_2site_energy
select_numstate_best
```

## Auxiliary Functions
```@docs
zephyr_to_linear
load_openGM
```
9 changes: 9 additions & 0 deletions docs/src/bp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Belief propagation

Local dimensional reduction can be achieved by selectively choosing states in the clustered Hamiltonian that have the lowest local energy in the cluster. This approach aims to reduce the dimensionality of the problem by focusing on the most relevant and energetically favorable states. It can be done by truncation based on energy or truncation based on Loopy Belief Propagation.

```@docs
clustered_hamiltonian_2site
belief_propagation
truncate_clustered_hamiltonian_2site_BP
```
24 changes: 24 additions & 0 deletions docs/src/clh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Introduction
A clustered Hamiltonian is a graphical representation that allows for a convenient and intuitive way to describe the structure of a network.

The concept of a clustered Hamiltonian within `SpinGlassNetworks.jl` introduces a mechanism for organizing spins into desired geometries, facilitating a structured approach to modeling complex spin systems. Analogous to a standard factor graph, the clustered Hamiltonian involves nodes that represent tensors within the underlying network. The edges connecting these nodes in the clustered Hamiltonian correspond to the indices shared between the respective tensors in the tensor network.

```@docs
clustered_hamiltonian
```

## Simple example

```@example
using SpinGlassNetworks

# Prepare simple instance
instance = "$(@__DIR__)/../../src/instances/square_diagonal/5x5/diagonal.txt"
ig = ising_graph(instance)

# Create clustered Hamiltonian
cl_h = clustered_hamiltonian(
ig,
cluster_assignment_rule = super_square_lattice((5,5,4))
)
```
Binary file added docs/src/images/annealing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/bb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/branch_bound.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/clustering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/contract.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/explain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/graphs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/lattice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/layout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/peg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/pegasus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/peps_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/prob.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/sd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/square_cross_double.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/square_cross_single.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/square_diag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/square_double.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/square_single.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/svd_truncate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/trans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/zep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/zephyr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/zipper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions docs/src/ising.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Ising model

The Ising model is a mathematical model used to describe the behavior of interacting particles, such as atoms or molecules, in a magnetic field. In the Ising model, each particle is represented as a binary variable $s_i$ that can take on the values of either +1 or -1. The total energy of the system is given by the Hamiltonian:

$H = \sum_{(i,j) \in \mathcal{E}} J_{ij} s_i s_j + \sum_{i} h_i s_i$

where $J_{ij}$ is the coupling constant between particles $i$ and $j$, $h_i$ is the external magnetic field at particle $i$, and the sum is taken over all pairs of particles and all particles in the system $\mathcal{E}$, respectively.

In `SpinGlassPEPS.jl` package, an Ising graph can be created using the command `ising_graph`.
```@docs
ising_graph
```

## Simple example
In this simple example below we show how to create Ising graph of a instance given as txt file in a format (i, j, Jij). The resulting graph has vertices corresponding to positions of spins in the system and edges defining coupling strength between spins. Each vertex contains information about local field.

```@example
using SpinGlassNetworks
# Create Ising instance
instance = "$(@__DIR__)/../../src/instances/square_diagonal/5x5/diagonal.txt"
ig = ising_graph(instance)

# View graph properties
@show biases(ig), couplings(ig)
```
Loading
Loading