Skip to content

Commit fa060fa

Browse files
authored
Merge branch 'main' into compathelper/new_version/2025-03-24-00-16-43-221-01806759132
2 parents 645c3b9 + 8032dda commit fa060fa

File tree

26 files changed

+92
-1043
lines changed

26 files changed

+92
-1043
lines changed

Project.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ITensors"
22
uuid = "9136182c-28ba-11e9-034c-db9fb085ebd5"
33
authors = ["Matthew Fishman <[email protected]>", "Miles Stoudenmire <[email protected]>"]
4-
version = "0.8.8"
4+
version = "0.9.1"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
@@ -29,11 +29,13 @@ Zeros = "bd1ec220-6eb4-527a-9b49-e79c3db6233b"
2929

3030
[weakdeps]
3131
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
32+
TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
3233
VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8"
3334
ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444"
3435

3536
[extensions]
3637
ITensorsHDF5Ext = "HDF5"
38+
ITensorsTensorOperationsExt = "TensorOperations"
3739
ITensorsVectorInterfaceExt = "VectorInterface"
3840
ITensorsZygoteRulesExt = "ZygoteRules"
3941

@@ -58,6 +60,7 @@ SimpleTraits = "0.9.4"
5860
SparseArrays = "<0.0.1, 1.10"
5961
StaticArrays = "0.12, 1.0"
6062
Strided = "1.1, 2"
63+
TensorOperations = "5.1.4"
6164
TimerOutputs = "0.5.5"
6265
TupleTools = "1.2"
6366
VectorInterface = "0.4, 0.5"
@@ -68,5 +71,6 @@ julia = "1.10"
6871
[extras]
6972
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
7073
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
74+
TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
7175
VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8"
7276
ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444"

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,17 @@ calculations such as DMRG, take a look at the [ITensorMPS.jl documentation](http
2828

2929
## Support
3030

31-
<img src="docs/src/assets/CCQ.png" width="20%" alt="Flatiron Center for Computational Quantum Physics logo.">
31+
<picture>
32+
<source media="(prefers-color-scheme: dark)" width="20%" srcset="docs/src/assets/CCQ-dark.png">
33+
<img alt="Flatiron Center for Computational Quantum Physics logo." width="20%" src="docs/src/assets/CCQ.png">
34+
</picture>
3235

3336
ITensors.jl is supported by the Flatiron Institute, a division of the Simons Foundation.
3437

3538
## News
3639

40+
- March 26, 2025: ITensors.jl v0.9 has been released. This is a minor breaking change since the `optimal_contraction_sequence` function now passes to the `optimaltree` function from [TensorOperations.jl](https://github.com/Jutho/TensorOperations.jl). The `TensorOperations` package therefore needs to be loaded in order for `optimal_contraction_sequence` to be used or if the flag `ITensors.enable_contraction_sequence_optimization()` is switched on.
41+
3742
- March 22, 2025: As part of the latest release of ITensors.jl (v0.8.3), all documentation related to MPS/MPO functionality has been moved to the [ITensorMPS.jl documentation](https://docs.itensor.org/ITensorMPS).
3843

3944
- February 22, 2025: Please note that there were issues installing the latest version of ITensors.jl (ITensors.jl v0.8) in older versions of Julia v1.10 and v1.11 ([https://github.com/ITensor/ITensors.jl/issues/1618](https://github.com/ITensor/ITensors.jl/issues/1618), [https://itensor.discourse.group/t/typeparameteraccessors-not-found-error-on-julia-v-1-10-0/2260](https://itensor.discourse.group/t/typeparameteraccessors-not-found-error-on-julia-v-1-10-0/2260)). This issue has been fixed in [NDTensors.jl v0.4.4](https://github.com/ITensor/ITensors.jl/pull/1623), so please try updating your packages if you are using older versions of Julia v1.10 or v1.11 and running into issues installing ITensors.jl.

docs/Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
44
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
55
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
66
Strided = "5e0ebb24-38b0-5f93-81fe-25c709ecae67"
7+
TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
78

89
[compat]
910
Documenter = "1.9.0"
1011
HDF5 = "0.17.2"
11-
ITensors = "0.8.4"
1212
Strided = "2.2.0"
13+
TensorOperations = "5.1.4"
1314
LinearAlgebra = "1.10.0"

docs/settings.jl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ using ITensors
55
# https://github.com/JuliaDocs/Documenter.jl/issues/1734
66
DocMeta.setdocmeta!(ITensors, :DocTestSetup, :(using ITensors); recursive=true)
77

8-
readme_ccq_logo = """<img src="docs/src/assets/CCQ.png" width="20%" alt="Flatiron Center for Computational Quantum Physics logo.">"""
8+
readme_ccq_logo = """
9+
<picture>
10+
<source media="(prefers-color-scheme: dark)" width="20%" srcset="docs/src/assets/CCQ-dark.png">
11+
<img alt="Flatiron Center for Computational Quantum Physics logo." width="20%" src="docs/src/assets/CCQ.png">
12+
</picture>
13+
"""
914
index_ccq_logo = """
1015
```@raw html
11-
<img src="assets/CCQ.png" width="20%" alt="Flatiron Center for Computational Quantum Physics logo.">
16+
<img class="display-light-only" src="assets/CCQ.png" width="20%" alt="Flatiron Center for Computational Quantum Physics logo."/>
17+
<img class="display-dark-only" src="assets/CCQ-dark.png" width="20%" alt="Flatiron Center for Computational Quantum Physics logo."/>
1218
```
1319
"""
1420

@@ -33,10 +39,8 @@ settings = Dict(
3339
"Documentation" =>
3440
["Index" => "IndexType.md", "ITensor" => "ITensorType.md", "QN" => "QN.md"],
3541
"Frequently Asked Questions" => [
36-
"Programming Language (Julia, C++, ...) FAQs" => "faq/JuliaAndCpp.md",
3742
"ITensor Development FAQs" => "faq/Development.md",
3843
"Julia Package Manager FAQs" => "faq/JuliaPkg.md",
39-
"High-Performance Computing FAQs" => "faq/HPC.md",
4044
],
4145
"Upgrade guides" => ["Upgrading from 0.1 to 0.2" => "UpgradeGuide_0.1_to_0.2.md"],
4246
"Advanced Usage Guide" => [
@@ -46,7 +50,8 @@ settings = Dict(
4650
"HDF5 File Formats" => "HDF5FileFormats.md",
4751
],
4852
],
49-
:format => Documenter.HTML(; assets=["assets/favicon.ico"], prettyurls=false),
53+
:format =>
54+
Documenter.HTML(; assets=["assets/favicon.ico", "assets/extras.css"], prettyurls=false),
5055
:doctest => true,
5156
:checkdocs => :none,
5257
)

docs/src/ContractionSequenceOptimization.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Contraction sequence optimization
22

3-
When contracting a tensor network, the sequence of contraction makes a big difference in the computational cost. However, the complexity of determining the optimal sequence grows exponentially with the number of tensors, but there are many heuristic algorithms available for computing optimal sequences for small networks[^1][^2][^3][^4][^5][^6]. ITensors.jl provides some functionality for helping you find the optimal contraction sequence for small tensor network, as we will show below.
4-
5-
The algorithm in ITensors.jl currently uses a modified version of[^1] with simplifications for outer product contractions and is based on the implementation in [TensorOperations.jl](https://github.com/Jutho/TensorOperations.jl).
3+
When contracting a tensor network, the sequence of contraction makes a big difference in the computational cost. However, the complexity of determining the optimal sequence grows exponentially with the number of tensors, but there are many heuristic algorithms available for computing optimal sequences for small networks[^1][^2][^3][^4][^5][^6]. ITensors.jl imports functionality from [TensorOperations.jl](https://github.com/Jutho/TensorOperations.jl) for helping you find the optimal contraction sequence for small tensor network, as we will show below.
64

75
[^1]: [Faster identification of optimal contraction sequences for tensor networks](https://arxiv.org/abs/1304.6112)
86
[^2]: [Improving the efficiency of variational tensor network algorithms](https://arxiv.org/abs/1310.8023)
@@ -64,12 +62,13 @@ display(cost2)
6462
```
6563
This example helps us learn that in the limit of large MPS bond dimension `m`, the first contraction sequence is faster, while in the limit of large MPO bond dimension `k`, the second sequence is faster. This has practical implications for writing an efficient DMRG algorithm in both limits, which we plan to incorporate into ITensors.jl.
6664

67-
Here is a more systematic example of searching through the parameter space to find optimal contraction sequences:
65+
Here is a more systematic example of searching through the parameter space to find optimal contraction sequences. Note, the TensorOperations.jl library must be loaded to use the optimal_contraction_sequence function:
6866
```julia
6967
using ITensors
7068
using Symbolics
7169

7270
using ITensors: contraction_cost, optimal_contraction_sequence
71+
using TensorOperations: TensorOperations
7372

7473
function tensor_network(; m, k, d)
7574
l = Index(m, "l")

docs/src/assets/CCQ-dark.png

70.1 KB
Loading

docs/src/assets/CCQ.png

81.6 KB
Loading

docs/src/assets/extras.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.display-light-only {
2+
display: block;
3+
}
4+
5+
.display-dark-only {
6+
display: none;
7+
}
8+
9+
.theme--documenter-dark .display-light-only {
10+
display: none;
11+
}
12+
13+
.theme--documenter-dark .display-dark-only {
14+
display: block;
15+
}

docs/src/faq/HPC.md

Lines changed: 0 additions & 88 deletions
This file was deleted.

docs/src/faq/JuliaAndCpp.md

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)