Skip to content

Commit ab3dfce

Browse files
mtfishmanachuchmala
authored andcommitted
Add write-to-disk during DMRG with SerializedElementArrays.jl (ITensor#648)
* Add write-to-disk during DMRG with SerializedElementArrays. Introduces `AbstractProjMPO` supertype for `ProjMPO` and new type `DiskProjMPO` that saves the environment tensors on disk. New keyword argument for `dmrg` called `write_when_maxdim_exceeds` to enable.
1 parent 2e536bd commit ab3dfce

File tree

22 files changed

+514
-272
lines changed

22 files changed

+514
-272
lines changed

.github/workflows/benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Install dependencies
1515
run: julia -e 'using Pkg; pkg"add PkgBenchmark [email protected]"'
1616
- name: Run benchmarks
17-
run: julia -e 'using BenchmarkCI; BenchmarkCI.judge()'
17+
run: julia -e 'using BenchmarkCI; BenchmarkCI.judge(; baseline="origin/main")'
1818
- name: Post results
1919
run: julia -e 'using BenchmarkCI; BenchmarkCI.postjudge()'
2020
env:

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Documentation
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
tags: '*'
88
pull_request:
99

.github/workflows/format_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: format-check
33
on:
44
push:
55
branches:
6-
- 'master'
6+
- 'main'
77
- 'release-'
88
tags: '*'
99
pull_request:

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Tests
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
tags: '*'
77
pull_request:
88
jobs:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.o
22
*.swp
3+
.tmp
34
benchmark/mult
45
Manifest.toml
56
test/data.h5

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1414
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
1515
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1616
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
17+
SerializedElementArrays = "d3ce8812-9567-47e9-a7b5-65a6d70a3065"
1718
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1819
Strided = "5e0ebb24-38b0-5f93-81fe-25c709ecae67"
1920
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
@@ -26,6 +27,7 @@ HDF5 = "0.14,0.15"
2627
KrylovKit = "0.4.2, 0.5"
2728
PackageCompiler = "1.0.0"
2829
Requires = "1.1"
30+
SerializedElementArrays = "0.1"
2931
StaticArrays = "0.12, 1.0"
3032
Strided = "1.1"
3133
TimerOutputs = "0.5.5"

docs/src/AdvancedUsageGuide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ because new releases may be breaking.
3535

3636
To try the "development branch" of ITensors.jl (for example, if
3737
there is a feature or fix we added that hasn't been released yet),
38-
you can do `add ITensors#master`. You can switch back to the latest
39-
released version with `add ITensors`. Using the development/master
38+
you can do `add ITensors#main`. You can switch back to the latest
39+
released version with `add ITensors`. Using the development/main
4040
branch is generally not encouraged unless you know what you are doing.
4141

4242
## Using ITensors.jl in the REPL
@@ -732,7 +732,7 @@ process more automated in the future.
732732
733733
Julia has great built-in tools for benchmarking and profiling.
734734
For benchmarking fast code at the command line, you can use
735-
[BenchmarkTools](https://github.com/JuliaCI/BenchmarkTools.jl/blob/master/doc/manual.md):
735+
[BenchmarkTools](https://github.com/JuliaCI/BenchmarkTools.jl/blob/main/doc/manual.md):
736736
```julia
737737
julia> using ITensors;
738738

docs/src/examples/DMRG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ some helper functions which
167167
return an array of bonds. Each bond object has an
168168
"s1" field and an "s2" field which are the integers numbering
169169
the two sites the bond connects.
170-
(You can view the source for these functions at [this link](https://github.com/ITensor/ITensors.jl/blob/master/src/physics/lattices.jl).)
170+
(You can view the source for these functions at [this link](https://github.com/ITensor/ITensors.jl/blob/main/src/physics/lattices.jl).)
171171

172172
The two provided functions currently are `square_lattice` and
173173
`triangular_lattice`. It is not hard to write your own similar lattice

docs/src/examples/Physics.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@ operator names into AutoMPO and it will know how to use these operators.
226226
**Further Steps**
227227

228228
See how the built-in site types are defined inside the ITensor library:
229-
* [S=1/2 sites](https://github.com/ITensor/ITensors.jl/blob/master/src/physics/site_types/spinhalf.jl)
230-
* [S=1 sites](https://github.com/ITensor/ITensors.jl/blob/master/src/physics/site_types/spinone.jl)
231-
* [Fermion sites](https://github.com/ITensor/ITensors.jl/blob/master/src/physics/site_types/fermion.jl)
232-
* [Electron sites](https://github.com/ITensor/ITensors.jl/blob/master/src/physics/site_types/electron.jl)
233-
* [tJ sites](https://github.com/ITensor/ITensors.jl/blob/master/src/physics/site_types/tj.jl)
229+
* [S=1/2 sites](https://github.com/ITensor/ITensors.jl/blob/main/src/physics/site_types/spinhalf.jl)
230+
* [S=1 sites](https://github.com/ITensor/ITensors.jl/blob/main/src/physics/site_types/spinone.jl)
231+
* [Fermion sites](https://github.com/ITensor/ITensors.jl/blob/main/src/physics/site_types/fermion.jl)
232+
* [Electron sites](https://github.com/ITensor/ITensors.jl/blob/main/src/physics/site_types/electron.jl)
233+
* [tJ sites](https://github.com/ITensor/ITensors.jl/blob/main/src/physics/site_types/tj.jl)
234234

235235

236236

docs/src/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
|**Build Status** |
88
:-----------------------------------------------------------------------------------------------:|
9-
| [![Tests](https://github.com/ITensor/ITensors.jl/workflows/Tests/badge.svg)](https://github.com/ITensor/ITensors.jl/actions?query=workflow%3ATests) [![codecov](https://codecov.io/gh/ITensor/ITensors.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/ITensor/ITensors.jl) |
9+
| [![Tests](https://github.com/ITensor/ITensors.jl/workflows/Tests/badge.svg)](https://github.com/ITensor/ITensors.jl/actions?query=workflow%3ATests) [![codecov](https://codecov.io/gh/ITensor/ITensors.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/ITensor/ITensors.jl) |
1010

1111
|**Citation** |
1212
|:-------------------------------------------------------------------------------:|
@@ -84,7 +84,7 @@ If you use ITensors.jl in your work, for now please cite the [arXiv preprint](ht
8484
## Full Example Codes
8585

8686
The ITensors.jl package contains a directory of examples, which we
87-
will continue to add to. You can find them online [here](https://github.com/ITensor/ITensors.jl/tree/master/examples).
87+
will continue to add to. You can find them online [here](https://github.com/ITensor/ITensors.jl/tree/main/examples).
8888
Additionally, once you have installed ITensors.jl you can find a local version
8989
of the examples in the directory `ITensors.examples_dir()`, and you can run them
9090
as follows from the Julia REPL:

0 commit comments

Comments
 (0)